Notifications
Clear all

[Closed] Maxscript getting selection set help

I have a copy and paste routine written in Autolisp for copying and then a paste routine written in maxscript. I also wrote other maxscripts that that does stuff (mainly my text object maniulator code) to the pasted objects.
The issue is that when I need to paste objects that I need to run the addtional script too in Max I have to do it in a new project, then export then merge into the actual project.

Is there any way code wise to to get a marker of the last entity in the drawing, then make a selection set of all entities that follow ?

The paste code I wrote simply imports a specific Autocad file name that Autocad has written.
it all works fine, I just wish Max highlighted all the objects after insertion.

Thanks for reading.
Chuck

1 Reply

The easiest way is to get objects.count before the import and then get all the new nodes (in the range objects[previous count + 1] to objects[objects.count]; metioned several times on this forum if you need some further reference).