Ruby request: Redraw function for multiple selected DCs ..
-
Hi all,
Here is one little request for those ruby masters out there:
Can someone come up with a good way to achieve the "redraw" function for multiple selected dynamic components?
Any ideas would be greatly appreciated..
cheers!
ddcddc -
Looks like this sample code redraws a DC. You can modify that to iterate over multiple.
http://forums.sketchucation.com/viewtopic.php?f=180&t=17888&p=145437&hilit=+dynamic+component+#p145120 -
@thomthom said:
Looks like this sample code redraws a DC. You can modify that to iterate over multiple.
http://forums.sketchucation.com/viewtopic.php?f=180&t=17888&p=145437&hilit=+dynamic+component+#p145120Thanks for the info thomthom
Excuse my noobness, but it seems to me that
$dc_observers.get_latest_class.redraw_with_undo(Sketchup.active_model.entities[0])
is only gonna work for the first and the only first component that I chose to "redraw" by using this script.
I am no where near a good ruby script writer, would u mind pointing me to a clearer way of doing this ?
Cheers!
-
The way I read it was that
$dc_observers.get_latest_class
would return the latest observer for the model.And that you can feed
.redraw_with_undo(...)
with the DC's you want.
Advertisement