vl-layerstates function missing
Hello,
I'm glad to use the new vl-layerstates commands in Lisp. But I miss a command returning a list of all existing Layerstates. Does anybody Know a way to get such a list?
Stefan
0
Comments
-
Something like this:
[code](defun LayerStatesInDwg ( / layersObject)
(setq layersObject (vla-get-layers (vla-get-activedocument (vlax-get-acad-object))))
(if
(and
(vla-get-hasextensiondictionary layersObject)
(member
"ACAD_LAYERSTATES"
(mapcar
'strcase
(mapcar
'vla-get-name
(vla-collection->list (vla-getextensiondictionary layersObject))
)
)
)
)
(mapcar
'vla-get-name
(vla-collection->list (vla-item (vla-getextensiondictionary layersObject) "ACAD_LAYERSTATES"))
)
)
)[/code]0 -
Thank You, that's exactly what I was missing.
Greetings from Kirchen, Germany
Stefan
0 -
thanks you both :-)
Seems, I should add a fucntion like (vl-layerstates-list) ?
Not a problem at all, will add that soon.
Many thanks for the hints !0 -
I wrote functions to controll Bonus Layerstates years ago. With this I was able to create Layerstates with one click. Also I can walk through the Layerstates by clicking on a toolbar. Now I changed it to Layerstates with the help of the VL-layerstates functions. But I needed the layerstates list because I often used the funktion "bns_get_layerstates".
Stefan
0 -
I just added (vl-layerstates-list) ... hope to get it included in public
Bricscad versions soon :-)
Greetings to all !0
This discussion has been closed.