Dynamic Component rotation through Ruby code
-
Hi all,
I am trying to write a Ruby tool that needs to access a dynamic component's attributes.
I created two attributes within my component : two rotation angles along two different axes.First issue I had : the name I gave to the attributes wasn't the good one for the ruby code.
So I downloaded the AttributeManager to see the real name of the attribute.Then, I tried to actually make my component rotate through the ruby code.
But it seems like the value of the attribute has changed, but not the view in the design.
So my component stays exactly at the same position and doesn't rotate at all.How can I do the refresh the value or refresh the view in my code, in order to make my component move each time I compute my code ?
Thanks every one for your help,
Marie
-
After you have set the attributes in code you need a line like this to force the update...
$dc_observers.get_latest_class.redraw_with_undo(dc_instance)
-
Thank you TIG !
It works perfectly.
Advertisement