Question about palettes
-
I've added a 'windowIsVisible(name)' test to the toggleWindows code.toggleWindows.rb This code below does what you want...
require 'toggleWindows.rb' def toggleLayersWindow() if @toggle==1 if windowIsVisible('Layers') closeWindow('Layers') else Sketchup.send_action(21354) end @toggle=0 else if windowIsVisible('Layers') if not @toggle ### 1st go if isRolledUp('Layers') toggleRollUp('Layers') else closeWindow('Layers') end else closeWindow('Layers') end else Sketchup.send_action(21354) end @toggle=1 end#if end#def
-
Along with a
require 'toggleWindows.rb'to ensure it's loaded before accessing the code. -
that's not fair TIG - you're hacking your own code!

i'll give it a spin..
ok folks, seriously what the heck have you got in those brains...i'm thinking of early retirement..

Thank You
-
Ain't no backing out now!

-
you must be joking, i'm going out for a drink to forget!
-
You'll be drinking binary
-
Note that TIG's current example works on English Sketchup only. It needs a bit of work to retrieve the localized window titles from the exe's resources, in order to work for all language locale editions.
-
that's true.. it works fine, but it greys out many context commands on starting SU...

-
How are you making the commands? - make one only attached to the toolbar.
The reason for the grey-outs is 'too many commands'.
It's possible to accidentally create a new command every time it's used... -
i went through most plugins commands, numbered them all differently (e.g. cmd1, cmd2, etc)
also got rid of some plugins - right now it works - but i'm keeping an eye...
many thanks again TIG... i owe you quite a few pints!

-
ok, updated version with better commands and icons. works fine on my pc
-
yes, maybe i'm better at it after a few guinness...
meantime here's the result - i don't have a mac so do not know whether it works there.
only thing is that upon reopening, the windows always dock at the bottom of the stack..

Cheers
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