Joined: Dec 29, 2014
Post Count: 1
Status:
Offline
Adding custom properties to the model objects
I am developing a pligin (as well as a model of electrical objects) that uses the lamps and other electrical model objects to calculate the wiring requirements. for this purpose I need to add some extra attributes like power consumption, generated heat, complying standard and so on. or to add the max ampere to a wall mount plug. How is it possible to edit the current furniture items? and also how can I use other free tools to construct such model objects. A concrete instruction would be highly appreciated.
If you create your own models, note that in addition to LIGHT_SOURCE and other properties, you can also add PLAN_ICON to use electrical symbols for each item to change their display in the 2D view.
France
Joined: Nov 7, 2005
Post Count: 9420
Status:
Offline
Re: Adding custom properties to the model objects
Okh, I don't think that javadch wants to imports models, but rather he wants to store additional data.
javadch, you could store your data in the description property of a piece of furniture which is not displayed in the user interface at the moment. Or if you want to organize your data differently, you could use setVisualProperty / getVisualProperty methods in Home class to store and retrieve a map with furniture as key and some serializable data as value. If you want something better, you'll have to to create a derived version of Sweet Home 3D something more complicate than programming a plug-in, but then you'll have the choice through customized controllers to override what you want.
See also this thread
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator
Joined: May 12, 2013
Post Count: 1545
Status:
Offline
Re: Adding custom properties to the model objects
Okh, I don't think that javadch wants to imports models, but rather he wants to store additional data.
Ah yes, commendable wish . Sorry if I confused things. Just a question of wishful thinking on my part, I guess. Sat with an electrician yesterday to calculate electric requirements, wire-diameters, voltage-drop and fuses for a 12V solar system (I did make models of standard batteries and solar panels for the project). Would be interesting to see any related work. ok