I'm doing something similar. Use the dynamic components, and then automate them. Much easier to make changes in a dynamic component than having to hard code everything.
Posts made by filcole
-
RE: Can i draw the whole building structure with code?
-
Long running Dynamic Components
Greetings All,
I'm inserting dynamic components via ruby, which is all working fine and dandy, except that when a dynamic component redraw takes a long time the user keeps getting prompted with the following question:
This operation seems to be taking a long time. Would you like to continue?
Is there any way this can be elimated? (apart from getting a faster PC!)
-
RE: Automating Sketchup from Excel
OK. This is what I've come up with:
- Export a file to the users profile (c:\documents and settings) with a standard name.
- Start Sketchup via VBA
- Sketchup has an ruby that checks for the existence of the file created in step 1.
- Create dynamic components according to the contents of the file
- Delete the file so that it's not re-processed next time sketchup is opened.
It's a bit annoying in that the users has to run a further ruby script inside Sketchup because the $dc_observers variable is not setup with the dynamic components are being inserted in step 4.
-
RE: Sketchup registry key ?
I used WiX (http://wix.sourceforge.net) to create an MSI installer for Sketchup. It can detect the registry setting HKLM\Software\Google\Google Sketchup 7\InstallLocation and install the plugin in the plugins sub-folder.
WiX is a pain in the arse to learn and use, but it's the only open source installer that creates MSIs that I could find.
-
Automating Sketchup from Excel
Hi All,
I'm wondering if anyone has managed to automate Sketchup from Excel. I have a list of components and dimensions thereof in Excel, and I want to click a button in Excel and start Sketchup automatically where a new model is created that inserts dynamic components with the correct dimensions as specified in MS Excel.
I've automated Excel from Sketchup (with Win32OLE), but not managed find a way to automate Sketchup from Excel. Is this possible?
Phil
p.s. Ideally I'd like to avoid the user having to start Sketchup (and run a ruby where they have to pick the Excel file which is then interrogated from a Sketchup ruby)
-
RE: Hiding Outliner Window
Hi Tig (and all others),
Thanks for the responses, fixed my problem wonderfully. Kudos.
I did try using start_operation() with the second parameter set to true, but the Outliner window is still redrawn when each dynamic component is redraw using $dc_observers.get_latest_class.redraw_with_undo(compInst).
-
Hiding Outliner Window
Is there a programmatic way to turn OFF the outliner window?
I have a ruby script that is inserting many dynamic components. When each dynamic component is added Sketchup refreshes and redraws the Outliner view automatically, which causes the ruby script to run slowly. If the outliner winder is hidden then the script runs faster?
p.s. 1st post! Thanks for all the useful help on this forum.