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_classwould return the latest observer for the model.And that you can feed
.redraw_with_undo(...)with the DC's you want.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better π
Register LoginAdvertisement