Modifying Default Component Attributes via Text Box


#1

I am trying to create components that describe products my cabinet shop produces.

I want to create a Master_Attributes component to use as a point of reference when developing calculations for other component attributes. For example:

Base_Cabinet_Faceframe_Height = Countertop_Height - Countertop_Thickness - Toekick_Height.

If this was a Filemaker database I would create a number field called “Countertop_Height”.
Filemaker gives me the option to stipulate a value for this field upon record creation.
I have an additional option to make this a “calculated field”.

Using these tools the Countertop_Height could be 36 inches high by default.
Because this is a “Calculated Field” I have the option to override 36 inches and make this particular record field any height I want.

This flexibility creates a lot of speed because I can launch the equation with standard parameters and only amend the parameters as necessary.

Is there a way to set up the Dynamic Components in a way that populates a default attribute value upon creation but which can be subsequently modified by a user with a Component Option Textbox?

I would like to be able to drag a component out of the component library and have default values already assigned yet still modifiable from a text box entry.

Is this do-able in Sketchup Pro?


#2

Yes, consider the file “kitchen layout”, its a simple 12 foot square with one attribute “bench height”, you can down load and open this. Now the other two files are component files, I call them orphans, as they refer to a parent. Do not open these, even for editing, rather save them to a folder (maybe in your component folders). you will need to either locate them though your component broswer, or file explorer. Now with the kitchen layout component open, place say the square top somewhere on the floor plan, it will automatic go to the default 36" to top, you have an over ride in this component, now change the size and position in the options. Now right click this top, from menu dynamic components, swap this with the round edge top. it should update with size match.

So what are the concepts
1, Parent with orphans that can be inserted, simply create sub components that reference the parent, then right click save them to as components to a folder
good idea to use the generic term “parent” in lieu of the actual parents name so can be used in other named layouts
2,note any new DCs built from copies must in all levels be made unique, so I created a copy of the square top, to build the round, I made it any sub component or group unique.
3, I made the geometry within the simple square top a component, this is required for the swap and update to work (it does not work on components that have no nesting, though a scale technique does). I refer this as double wrapping, it is a way of preserving contents so they are not influenced by SU updates (concept is used in multi rotations in other DCs I’ve made)
I use the “current” formulas to achieve this. If say the component to be swapped was a knob, then current is not required as each knob size is different and not needed to match sizes, but doors, units…do
4, To edit an orphan component, place into a parent, change then re-save through the right click menu

the file:-
kitchen layout.skp (18.6 KB)

the components (important to know the different method of saving)
bench_top_square.skp (21.7 KB)
bench_top_round.skp (30.0 KB)


#3

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.