AutoCAD.
Is it possible to launch the layer manager form Autolisp .lsp?
(command ".-layer")
Not the desired result.
Any idea?
![]() |
|
![]() |
|
![]() |
|
![]() |
AutoCAD.
Is it possible to launch the layer manager form Autolisp .lsp?
(command ".-layer")
Not the desired result.
Any idea?
You can do anything you want with layers using lisp but you're using the wrong command.
Try (command ".LAYERPALETTE") https://www.cadtutor.net/forum/topic...comment-555676
(command ".-layer") in 2022 version returns:
Current layer: "0"
Enter an option [?/Make/Set/New/Rename/ON/OFF/Color/Ltype/LWeight/TRansparency/MATerial/Plot/Freeze/Thaw/LOck/Unlock/stAte/Description/rEconcile/Xref]:
(command ".+layer") in 2022 version returns:
Specify filter [All/All Used Layers/Unreconciled New Layers/Viewport Overrides] <All>:
Command options vary depending on what version of AutoCAD you're using but using lisp instead is more consistent between versions.
Thank you Tom, the best solution! This is also an option: (initdia 1)(command "_LAYER") to start the dialog. But just start, no other control is possible this way. But not so stable.