Use this procedure to export layer standards from the current drawing to a new drawing or to an existing drawing.
AutoCAD.NET:: How To Export Layers Names To Excel May 19, 2011. I want to export the layers names to Excel, as I used in VBA. I'm using AutoCAD 2011 (64b), VB Express 2010, Office 2003 (32b). I ran this routine in XP 64b and W7 64 with the same problem. No problem in building the DLL, or loading it to AutoCAD.
- If necessary, open the Layer Properties Manager by clicking Home tabLayers panelLayer Properties.
- Click .
- Click Import/Export.
- Export the layer standards:
If you want to… Then… export layer standards to a new drawing click New, enter a name for the new drawing, and click Save. export layer standards to an existing drawing click Open, select a drawing, and click Open. - Select the layer standards that you want to export, and click Export.
You can select more than one item in a list by holding down Ctrl while you select the additional items. If you export a layer standard that already exists in the target drawing, a message is displayed asking if you wish to overwrite the existing layer standard. Click Yes to overwrite the existing layer standard, or click No to cancel.
- Click OK two times.
Autocad Lisp Export Layer State-restore
Related Concepts
Related Tasks
Related Reference
Autocad Layer Lisp Routine
I'm trying to set up an easy way to import layers from a certain dwt. file with a shortcut.
Now I found this code, which kind of works, but doesn't do the whole trick. It works with a Popup where I have to insert the dwt. file. It's also annoying that it opens this file than and I have to close it manually.
I would like to have this without any import options and automatically takes this one file always for the layers.
My file would be located here:
'I:AutoCAD BlöckeTemplate__Bürostandard'
(defun c:IL (/ oAcad oCurDoc strFile oOpenDoc oOpenDocLayers lstObj oLayer array)
(setq oAcad (vlax-get-acad-object))
(setq oCurDoc (vla-get-ActiveDocument oAcad))
(setq strFile (getfiled 'choose file:' (getvar 'DWGPREFIX') 'dwt' 0))
[code]........