F.e as an sample case to make it clear what I need.
I’am creating a concrete foundation with insulation like EPS. I want to make it so that the user can set the thickness of the front insulation, the under ( between dirt and beam ) insulation, the back side ( inner ) insulation and so on.
This means I have to make 3 or more lists where the user can choose from the different thickness and pressure ( like EPS100, EPS150 or EPS 250 e.t.c ). That means I will be two hours typing with unless someone has a great tip, on how to copy that.
However, In the meantime I was try to do so in code, but…
so far, I came up with ( for this sample I did use Stacy in a new model )
UI.menu("Plugins").add_item('add a list') {
mydc = Sketchup.active_model.entities[0]
fnd_def = mydc.definition
fnd_def.set_attribute 'dynamic_attributes', 'fndeps', '5'
fnd_def.set_attribute 'dynamic_attributes', '_fndeps_label', 'Thickness2'
fnd_def.set_attribute 'dynamic_attributes', '_fndeps_formlabel', 'Thickness3'
fnd_def.set_attribute 'dynamic_attributes', '_fndeps_units', 'CM'
fnd_def.set_attribute 'dynamic_attributes', '_fndeps_access', 'List'
fnd_def.set_attribute 'dynamic_attributes', '_fndeps_options' , '50 mm=5'&'100 mm=10'&'200 mm=20'
}
I got an error ( however it looks like a Component options window error ) and also no list.
ERROR: Error: Callback function error: undefined is not an object (evaluating ‘conv.unitsHash[units].template’) @ /dcbridge.js[601].
What do I wrong?
Also how can I directly search for a named component using the name of the component?
Thank you