Chris -
The answer to my question and then some. Thanks Chris!
So how did you discover this undocumented mystery?
Chris -
The answer to my question and then some. Thanks Chris!
So how did you discover this undocumented mystery?
So if Sketchup.active_model.rendering_options["ExtendLines"] lets me toggle the Window->Styles->Extension checkmark box, what is the secret password ( Sketchup.active_model.rendering_options["secret password"] ) for changing the 'Endpoints' checkmark in the same location? I've looked here http://code.google.com/apis/sketchup/docs/ourdoc/renderingoptions.html but to no avail.
TIG-
I am on a PC though trying to do a similar thing for the mac. I'll try some observer fun but am sure to be splatted into oblivion Thanks for your thoughts.
best,
Justin
Gaieus - Please do move this to the Ruby thread, I didn't mean to post here, I think I saw "Sketchup" which, combined with the late hour, must have sent me into a state of overly reactive decision making and I posted...
TIG - I get the feeling that you have tried this before Would there be any way to use an observer on exit which over-writes the reg entry? I guess it depends if the observer fires before or after whatever Sketchup is automatically firing on the open/close.
best,
Justin
@tig said:
@ruski_canuk said:
I'm using this to open the component browser:
UI.show_inspector "Components"
However, I want to open a custom folder that I have made within the the components directory. Does anyone know how to direct the components browser to open that specific folder to browse through?
Here is the path of the folder I'm trying to browse:
C:\Program Files\Google\Google SketchUp 7\Components\custom_folderYou need to change the registry values [for PC]
HKEY_CURRENT_USER\Software\Google\SketchUp6\File Locations >>> key ComponentBrowser1 REG_SZ value >>> C:\Program Files\Google\Google SketchUp 7\Components\custom_folder
You could try to do it this way:
folder="C;\\Program Files\\Google\\Google SketchUp 7\\Components\\custom_folder\\"
> Sketchup.write_default("File Locations","ComponentBrowser1",folder)
Notes: the correct method is 'write_default' as v7 API and NOT 'write_defaults' or 'write_defults' as the v6 API incorrectly says ! Also the folder separators \ have been 'escaped' with \ otherwise you'll get error messages - I also added an ending \ though it's not strictly necessary as the system adds it anyway...
So this sounds good so far... Sorry, but it's NOT !
After you run this code the registry entry does indeed change to match the folder path given - however, you need the folder path to be inside '..' or ".." to make the SUp method work and these are added to the registry value too which then makes it un-readable by the system, so it's ignored, BUT in any case [even if you did manage to hack the right value into the registry key] SUp has already read the initial registry values when it started, so it opens the Components Browser using those - giving the folder that was open when SUp was last closed. Running the code doesn't change the value that's now in memory. Worse is to come - unless you change the folder manually, when you close SUp it remembers the current folder as that registry entry for use next time - undoing your code-driven / hacked changes. This means you can't even try to re-write the registry, save the model, close to model and reopen the model, as the close will simply re-make or remember the old the registry settings and use those on the re-open...The only use of SUp's read/write registry value tools is to save/update data that isn't automatically overwritten by SUp on open/close - like web-dialog details etc...
Sorry! I can't see how you can do it ? Any other suggestions ???
hey guys,
I'm using this to open the component browser:
UI.show_inspector "Components"
However, I want to open a custom folder that I have made within the the components directory. Does anyone know how to direct the components browser to open that specific folder to browse through?
Here is the path of the folder I'm trying to browse:
C:\Program Files\Google\Google SketchUp 7\Components\custom_folder
Thanks!
Guys,
The Waybe plugin is real (not a magician's trick) and we are just about to enter the beta testing phase of the project. We have tried to keep it low profile while developing it and apologize for not being very responsive to inquiries. Hopefully version 1 will be ready in June. Please email me at ruski.canuk[at]gmail.com if you are interested in other details.