Author Topic: Reactor for Block attribute modified  (Read 3046 times)

0 Members and 1 Guest are viewing this topic.

hendie

  • Guest
Reactor for Block attribute modified
« 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 ?

hendie

  • Guest
Reactor for Block attribute modified
« Reply #1 on: February 10, 2005, 10:43:19 AM »
okay, I think I've found it ~ :vlr-subObjModified

SMadsen

  • Guest
Reactor for Block attribute modified
« Reply #2 on: February 10, 2005, 11:03:50 AM »
Hey, why don't you use a :vlr-subObjModified? :P

hendie

  • Guest
Reactor for Block attribute modified
« Reply #3 on: February 10, 2005, 11:33:07 AM »
nice try Stig, but I still can't get it to work :lol:

hendie

  • Guest
Reactor for Block attribute modified
« Reply #4 on: February 11, 2005, 05:59:46 AM »
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 ! :(

hendie

  • Guest
Reactor for Block attribute modified
« Reply #5 on: February 11, 2005, 06:34:50 AM »
GOT IT !

finally ~ I had to create another function to do the calulation and call that function in the :vlr-subObjModified reaction

wo321123

  • Guest
Reactor for Block attribute modified
« Reply #6 on: March 10, 2005, 09:24:15 PM »
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.