Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

vlr-acdb-reactor and :vlr-objectappended even non-graphical additions.

1 REPLY 1
Reply
Message 1 of 2
mdhutchinson
380 Views, 1 Reply

vlr-acdb-reactor and :vlr-objectappended even non-graphical additions.

Vlr Object appended I would have assumed would fire once for every object added to the drawing file.

 

In the case of pasting from windows clipboard it seems to run twice for every object.

So... say I paste 3 circles taken from another drawing file... vlr-objectappended looks to fire 6 times.

 

How can I condition to bypass the three I do not need but process the three circles that I do need?

1 REPLY 1
Message 2 of 2
dbroad
in reply to: mdhutchinson

Try to avoid using the vlr-acdb-reactor or using its intermediate results if possible.  You could add the object to a list in your reactor data and then work on them after the command has ended. You would need to check to see if the extra objects still existed(or were erased) or you could work within a vl-catch-all-apply expression to ignore errors.

 

Rather than to use that event, I suggest you use a vlr-command-reactor and two events, :vlr-command-will-start and :vlr-command-ended.  In the callback for the will start reactor you could get the last entity.  Then in the commandended event callback you could loop from the last entity before the paste to the last entity after the paste.

Architect, Registered NC, VA, SC, & GA.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost