TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started by: hendie on February 10, 2005, 10:24:48 AM
-
Anyone give me a clue as to which reactor I should be using for this.
I assumed that a (:vlr-modified . ln-callback) would cover it ~ when the block is modifed, I want to move a couple of items and recalculate something for another attribute value (separate from the block).
It works when I move the block, rotate it etc, but not when I edit an attribute value within the block.
Unfortunately, there is no :vlr-attributechanged :P
Can someone give me some pointers forward ?
-
okay, I think I've found it ~ :vlr-subObjModified
-
Hey, why don't you use a :vlr-subObjModified? :P
-
nice try Stig, but I still can't get it to work :lol:
-
this is making my head mince !
Does anyone have any experience using :vlr-subObjModified ?
I just can't seem to get it working at all.
What I am doing in the lisp is inerting a block with two attributes. ( L & W)
Once the attribute values are inserted, another block with only one attribute is inserted
I then get the first two values, multiply them and stick the result (m2) in the second block attribute.
No problems that works fine.
The problem comes when I modify one of the original attribute values ~ The m2 attribute won't update. ~ but if I move the block, it updates fine.
I've tried using vlr-subObjModified to update the attribute ~ no go !, tried it to move the block ~ no go !
I ended up inserting acad alerts all through the code so I could check what was happening and it goes through the code ok it just doesn't apply the code to the object.
Even done a web search on it and could only find about 4 references, none any use. The autodesk forum only has 4 topics, again, none any use and the Acad help is naff all use in this area.
the only thing that seemed of any relevance was something mentioning that vlr-subObjModified doesn't work ! :(
-
GOT IT !
finally ~ I had to create another function to do the calulation and call that function in the :vlr-subObjModified reaction
-
I just do it. Exactly, the reactor have been launch when attribute was changed.But i'm puzzle how to get the new attribute in reactor procedure.