Custom toolbar in main toolbar

Quick question. Is this possible from extension level to force custom toolbar to appears always in main toolbar at the start of plugin?

I doubt it’s possible on either platform…

my questions in response are…

should you be forcing the user to accept where you want the extension to ‘live’…

is your extension for ‘public’ or ‘in house’ use…

what platforms does it need to target…

john

1 Like

@john_drivenupthewall

Regarding platform: PC and Mac

Extension for ‘in house’ use

what do you mean by “where you want the extension to ‘live’”?

for ‘in house’ it’s fine to dictate where and when the User access’s the resource, but that’s not ok for ‘public’ ones, where the user may only want to access occasionally…

on a mac, you cannot modify the default toolbar at all and the extension will need a UI::Command.new('') and a UI::Toolbar.new('') for it to be available in the ‘Customize Toolbar’ on top of the viewport …

you can then inject it into the plist and do a restart for it to show…

to see what’s already there use this in Ruby Console…

%x[defaults read ~/Library/Preferences/com.sketchup.SketchUp.2018 "NSToolbar Configuration SketchUpToolbar18" "TB Item Identifiers"]

you can add them in using defaults write

%x[defaults write ~/Library/Preferences/com.sketchup.SketchUp.2018 "NSToolbar Configuration SketchUpToolbar18" "TB Item Identifiers"  "TB Name<.>TB Item"]

you would make this ‘run once’ conditional code…

john

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.