Hey Glenn
OK, I figured it out and you were partially right.
Absolutely, I had to use the layer.name method to get the layer name
However, the layr.name code must remain in the loop for AutoCAD to grab the name of each layer in the layer collection.
As far as The Writeline method; it will do precisely that; it will write a line for each in layer in the layer collection
Also, as you add layers, you can re run the macro and it will overwrite the existing file with the new layers.
So, here is the working code:
Thank you for the help!
Mark
Sub WriteLayersToATextFile()
Dim FSO, MyFile As Variant
Dim Layr As AcadLayer
Dim Layrs As AcadLayers
Dim Dwgname As String
Set FSO = CreateObject("Scripting.FileSystemObject")
Set Layrs = ThisDrawing.Layers
Dwgname = UCase(Left$(ThisDrawing.GetVariable("Dwgname"), Len(ThisDrawing.GetVariable("Dwgname")) - 4))
Set MyFile = FSO.CreateTextFile("C:\Path\Path\Path\" & Dwgname & ".TXT", True)
For Each Layr In ThisDrawing.Layers
MyFile.WriteLine Layr.Name
Next Layr
MyFile.Close
End Sub