I see, no worries hope they fix it soon. Thanks
Posts made by simonstaton
-
RE: If Toolbar is true make it false
-
Remove In Model from Components
Hi,
in the components panel you have a drop down of In Model and Components is there anyway to remove In Model and have it load up straight onto the Components Folder?
Simon
-
RE: If Toolbar is true make it false
@thomthom said:
UI.toolbar_names
http://code.google.com/apis/sketchup/docs/ourdoc/ui.html#toolbar_names@unknownuser said:
The toolbar_names method is used to returns the name of all the available toolbars (this differs between PC and Mac).
> UI.toolbar_names ["Standard", "Principle", "Camera", "Drawing", "Edit", "Construction", "Walk", "DisplayMode", "StandardViews", "Section", "Google", "GettingStarted", "VCB"]
I dont suppose you know what the toolbar name would be for the large toolset do you?
Thanks,
Simon -
RE: If Toolbar is true make it false
haha excellent guys, it works thanks the all the help!
-
RE: If Toolbar is true make it false
I still seem to be getting this error:
C;/Users/Simon/Documents/Action Design Your Own v2/Action 3D 3/Plugins/Utilities/Toolbar.rb;309; syntax error if @compress == "yes" {Morisdov.att_get} ^ C;/Users/Simon/Documents/Action Design Your Own v2/Action 3D 3/Plugins/Utilities/Toolbar.rb;310; syntax error if @compress == "no" {UI.messagebox("Before Viewing Your Cart Make Sure You Have Compressed Your Climbing Frame\n\nNote; You Only Need to Compress Once")} ^ C;/Users/Simon/Documents/Action Design Your Own v2/Action 3D 3/Plugins/Utilities/Toolbar.rb;310; syntax errorError Loading File LoadToolbar.rb C;/Users/Simon/Documents/Action Design Your Own v2/Action 3D 3/Plugins/Utilities/Toolbar.rb;309; syntax error if @compress == "yes" {Morisdov.att_get} ^ C;/Users/Simon/Documents/Action Design Your Own v2/Action 3D 3/Plugins/Utilities/Toolbar.rb;310; syntax error if @compress == "no" {UI.messagebox("Before Viewing Your Cart Make Sure You Have Compressed Your Climbing Frame\n\nNote; You Only Need to Compress Once")} ^ C;/Users/Simon/Documents/Action Design Your Own v2/Action 3D 3/Plugins/Utilities/Toolbar.rb;310; syntax error
-
RE: If Toolbar is true make it false
I seem to be getting errors am I doing this right:
@compress = "no" # EXPLODE TOOL model=Sketchup.active_model cmd = UI;;Command.new("Explode"){ result = UI.messagebox "This will Compress your Climbing Frame meaning you cannot edit past this point!\n\n Would you like to continue?\n\nNote; Only Do This Once Per Model", MB_YESNO if result == 6 # Yes model.entities.to_a.each{|e|e.explode if e.class==Sketchup;;Group or e.class==Sketchup;;ComponentInstance} Morisdov.att_get @compress = "yes" end } cmd.small_icon = "finished.png" cmd.large_icon = "finished.png" cmd.tooltip = "Compress | Compress your Climbing Frame" cmd.status_bar_text = "Compressing your Climbing Frame" cmd.menu_text = "Compress" toolbar = toolbar.add_item cmd toolbar.show # VIEW CART model=Sketchup.active_model cmd = UI;;Command.new("Explode"){ if compress == "yes" {Morisdov.att_get} if compress == "no" {UI.messagebox("Before Viewing Your Cart Make Sure You Have Compressed Your Climbing Frame\n\nNote; You Only Need to Compress Once")} } cmd.small_icon = "check.png" cmd.large_icon = "check.png" cmd.tooltip = "View Cart | View a List of Items Used" cmd.status_bar_text = "Loading Cart" cmd.menu_text = "View Cart" toolbar = toolbar.add_item cmd toolbar.show
Thanks for the help by the way guys, much appreciated
-
RE: If Toolbar is true make it false
excellent, works like a dream thanks dude. I can now finally say SOLVED
now I know this isnt related to my initial question however you guys know your stuff and I dont want to go making yet another topic. is there anyway to set a variable in ruby like you can in javascript.
in my toolbar I have two tools that rely on each other, a compress tool and a checkout tool before you checkout you need to compress.
is there anyway that only my tools even I can have it so that when you click compress it sets a variable like:
compress = trueand my default have compress = false then on my checkout tool have:
if (compress = true){
event
}
else {
alert
} -
RE: If Toolbar is true make it false
I think you are right! if its working from the ruby console and its working on the toolbar and its not working on load it must be because the toolbar is false until it has loaded.
anyway to add a delay onto the .rb file and have it only run once sketchup is fully loaded?
-
RE: If Toolbar is true make it false
it is so that the user can see only my toolbar which is explained when they download, what is so bloody confusing is that when I put the event:
UI.set_toolbar_visible("GettingStarted", false)
inside of a toolbars tool event it works fine and hides it however when I put it lose inside the .rb file nothing happens!
this is driving me crazy I might just leave it as they have to click a button on my toolbar to hide it.
Simon
-
RE: If Toolbar is true make it false
Ok, neither of the methods worked I also tried it using v7 and its still not working.
it is defiantly doing something as when all the plugins are disabled it will disable the toolbar then on the next reopen the toolbar will open so it just seems to be toggling it :s
-
RE: If Toolbar is true make it false
@dan rathbun said:
@simonstaton said:
..., is it as simple as making a file called hidetool.rb then inside there putting
No.. name the FILE --> !Defaults.rb
> # defaults for Sketchup Startup > begin > # hide the GettingStarted toolbar > Sketchup.send_action(21992) if UI.toolbar_visible?('GettingStarted') > end
P.S. the send action line is all 1 line in the above example.
legend that seems to be working however each time I load sketchup it seems to toggle it on and off, so the first time I load it it turns it off then I close and reopen then its turned on.
-
RE: If Toolbar is true make it false
I see so how would I load up a new .rb file to have this in, is it as simple as making a file called hidetool.rb then inside there putting
!Defaults.rb if UI.toolbar_visible?('GettingStarted') Sketchup.send_action(21992) end
-
RE: If Toolbar is true make it false
ok I have got:
if UI.toolbar_visible?('GettingStarted'); Sketchup.send_action(21992); end
working in my v6 through the ruby console however how come when I put it inside of my .rb file it does not work?
could there be errors?
-
RE: If Toolbar is true make it false
great that worked in sketchup 7, however when I put it inside of my .rb file it dosnt work. to test it out could I simply just add a new .rb file inside of the plugins folder and inside there put:
status = if UI.toolbar_visible?('GettingStarted') Sketchup.send_action(21992) end
-
RE: If Toolbar is true make it false
ok will do thanks dan, sorry just new to forums, well not new joined 2 years ago but not used to it.
-
RE: If Toolbar is true make it false
ok through the ruby code I recieve the following method after ive just installed sketchup 7 and tryed it in there:
(eval):894: syntax error
status = if UI.toolbar_visible?('GettingStarted') Sketchup.send_action(21992) end
^>
(eval):894
status = if UI.toolbar_visible?('GettingStarted') Sketchup.send_action(21992) end
Error: #<SyntaxError: (eval):894: compile error
(eval):894: syntax error
status = if UI.toolbar_visible?('GettingStarted') Sketchup.send_action(21992) end
^
(eval):894: syntax error
status = if UI.toolbar_visible?('GettingStarted') Sketchup.send_action(21992) end
^>
(eval):894 -
RE: If Toolbar is true make it false
hmm that method didnt work either it must be somthing to do with my .rb code. any chance either of you could quick put the following in a .rb file in your plugins and see if closes the toolbar when sketchup loads:
status = if UI.toolbar_visible?('GettingStarted')
Sketchup.send_action(21992)
endif it does then it must be somthing to do with my sketchup
Thanks,
Simon -
RE: If Toolbar is true make it false
some of the features I am using on my toolbar dont want to work in sketchup 7 such as my checkout system,
is it ok if I try detecting the toolbar being open? any chance you know any code that I could use to see if it is visible then using an if statement have it send the action.
-
RE: If Toolbar is true make it false
I just tested this out in sketchup 7 and it does work fine so it must just be sketchup 6
-
RE: If Toolbar is true make it false
no still nothing changes when I use that code either in the ruby console or in the .rb files and after doing what you said I am however using sketchup 6 if that could stop this from working?