TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started by: velasquez on July 03, 2009, 03:57:07 PM
-
I am not getting to work with the syntax for (mapcar ´vla-put-layer ...
with Safearray and SafeArray value
Does anybody can me to help?
Thanks
-
Post what you have tried so far.
-
(if (ssArray
(= (type ssArray) 'safeArray)
;;;is the safeArray made of vlax-object's
(= (vlax-safeArray-type ssArray) 9)
) ;_ fim de and
(mapcar 'vla-put-layer
(car (safeArray-value ssArray))
"TestLayer"
) ;_ fim de mapcar
) ;_ fim de if
-
Would you mind explaining the bigger picture?
Most of the time a safearray is not needed, only a list.
-
HI CAB
I got to work with vla-put-layer using SSGET.
But I need to learn more on Safearray.
Does the function below use ' vla-delete how to work with vla-put-layer or vla-put-color?
;;;delete objects
(if (and flag
ssArray
(= (type ssArray) 'safeArray)
;;;is the safeArray made of vlax-object's
(= (vlax-safeArray-type ssArray) 9)
) ;_ fim de and
(mapcar 'vla-delete (safeArray-value ssArray))
) ;_ fim de if
Thank you.