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

event handler

4 REPLIES 4
Reply
Message 1 of 5
insiaiftiqhar
742 Views, 4 Replies

event handler

Is it possible to write an event handler for an autocad event/ command like insert new block ? I want the event to trigger the execution of an update routine . something like this post

http://forums.autodesk.com/t5/Visual-Basic-Customization/comand-event-listener/td-p/2149719

 

how do I access the autocad object in autolisp?

Thanks,

Insia

 

4 REPLIES 4
Message 2 of 5
Moshe-A
in reply to: insiaiftiqhar

Insia,

 

that's depand on what you are planning to do when insert command is fired?

can you clarify?

 

Moshe

 

 

Message 3 of 5
insiaiftiqhar
in reply to: Moshe-A

I have a DCL window where I let the modeller specify a value type for each attribute of each block in the drawing and I store it in a nested association list . The association list is as follows 

((blockName1 attributeAssociationList1) (blockName2 attributeAssociationList2)

where attributeAssnList is another association list like

((attributeTagName1 attributeValueType1) ((attributeTagName2 attributeValueType2) 

 

I have an updateAssociationList function which updates this data structure by comparing it against the state of the current drawing.

I was hoping to call this function when a block/attribute is inserted /deleted /edited.

 

Thank you ,

Insia

Message 4 of 5
Moshe-A
in reply to: insiaiftiqhar

Hi,

 

if i understand you right? you have some blocks attribute data list that store where? in an external file?

and you got some dwg files that you want to update their attributes value?

 

i do not think that this should be done with Reactors, all you need is to run your update routine on the blocks

to update their attributes and attributes values as a batch and that it?

 

Moshe

 

 

Message 5 of 5
insiaiftiqhar
in reply to: Moshe-A

I wasn't aware of the concept of reactors..seems to me that is what I was looking for. I think I agree with you though, It might not be worth the overhead. I have to look into reactors a bit more.thank you for pointing me in the right direction.

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

Post to forums  

Autodesk Design & Make Report

”Boost