How make a window like the components window
-
how make a window like the components window as an interface to represent a new class i made called Buildings
-
@morci429 said:
class i made
New plugin? Or new Dynamic Component?
The Dynamic Component Properties window is made using the Webdialog class:
http://code.google.com/apis/sketchup/docs/ourdoc/webdialog.htmlIf you've not used that class before it's worth reading this thread: http://forums.sketchucation.com/viewtopic.php?f=180&t=23445
-
They would have to be Components or DynamicComponents.. as we cannot create custom
Drawingelement
subclasses. (There are no methods to add custom classes to the model's entites. In addition, none of the manipulation methods accept subclasses. They are hard-coded to test the arguments for specificSketchup::Drawingelement
subclasses, such as Face, Edge, etc.) -
thanks for the help guys, so far i managed to create a new class called buildings what I’m trying to do is while I’m working on a model of 40 buildings i can then highlight any shape i like and right click on it and set it as a building. Therefore i would have a window like the "Entity info" window which can be displayed from the window menu that would have a drop down menu with a list of the buildings i made so far.
Does that make any sense? i know it's a bit ambitious but i guess it would help a lot of people -
Reread my previous post.
Then readup on Components and Dynamic Components (which are actually Components with special Attribute Dictionaries.)
What you really need to do is create a Building Component Manager plugin. But the buildings themselves will have to be Components, and/or Dynamic Components (which will likely have a "Building" Attribute Dictionary attached to them, with keys and values that your manager will use to keep track of and organize them.)
Now.. it IS possible that within your manager namespace, you can have aclass Building
, whose instances hold a reference (instance variable,) to a Component Instance that is actually in the model.The SKP file format has an embedded thumbnail image, which if you have that file in a link in the browser (I'm talking webdialog,) then the thumbnail should display just as if you had any other image filetype on a webpage. It may be possible to drag and drop from the webdialog into the Sketchup client area. (We know we can do this from a folder explorer window.)
Do a search for other topics on "Warehouse" as others have discussed making a webdialog or website similar to Google's 3DWarehouse. You may pick up some ideas in those threads.
Advertisement