I created new entities in a file using WBlockCloneObjects from a different file.
I have a collection of objectids from the source file.
Once I pass this collection to the WBlockCloneOjbects is there a way to get to the objectids (or handles) of the objects cloned into the new file? I need to change the layer on each new object.
Thanks in advance,
Mike
Solved! Go to Solution.
Solved by michael.robertson. Go to Solution.
Is this where you meant to post?
http://forums.autodesk.com/t5/Visual-LISP-AutoLISP-and-General/bd-p/130
If you are wanting to change them all to the same layer (whatever that layer might be) you can trap them all in a selection set. To do this, set the last entity as a marker, proceed with the wblock, cycle through the new entities to create your selection set, and then do what you want with them.
(setq Marker (entlast))
;wblock, copy, or whatever here
(setq tempSS (ssadd))
(while (setq Marker (entnext Marker))
(setq tempSS (ssadd Marker tempSS))
)
(command ".chprop" tempSS "" "layer" "whateverlayer" "")
Sorry for posting in the wrong forum.
I was thinking I would have to do something like you suggest.
I'll give that a try.
Found I could use the "GetAllObjects" method of the current TransactionManager to retrieve these objects.