Example Ruby
-
would any kind master give me a script code example of something basic like the pushpull or move tool?
i would like to create a custom toolbar with my favourites - Thanks.
-
Hi cadFather !
Native Su tools are NOT basic! It's hard to create completely re-create them in Ruby..However, you can start them via a send_action function !
Like this :
Sketchup.send_action "selectPushPullTool;"This is the code you will put in your icon code...
cmd = UI;;Command.new("Push pull") { Sketchup.send_action "selectPushPullTool;" } cmd.small_icon = 'nameOfYourIcon' cmd.large_icon = 'nameOfYourIcon' cmd.tooltip = cmd.status_bar_text = "Push-Pull" tb.add_item(cmd) -
Thanks Matt, will put your help to good use with a basic toolbar - if i can!

-
Yes you can ! And we're here to help you !

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