@ryan.moore
Thanks for the effort sharing this. I’ll look it over.
If you use dynamic components a lot or if others here have any interest, I have created a plugin for our millwork/cabinet work that I may make public. I created a 2-way bridge that lets you program them via yaml text files. Here’s an example of one of mine:
---
component_name: __Toe Kick Config
schema_version: 1
opencutlist:
tags: [Exclude]
attributes:
a10_class:
value: __Toe Kick Config
units: STRING
access: TEXTBOX
formlabel: Class
a11_setback:
value: '3'
units: INCHES
access: TEXTBOX
formlabel: Setback
a19_line_break:
value: ________________________________________
units: STRING
access: VIEW
formlabel: ___Returns____________________
a20_left_return:
value: '0'
units: STRING
access: LIST
formlabel: Add Left Return
options:
No - default: '0'
Yes: '1'
a21_right_return:
value: '0'
units: STRING
access: LIST
formlabel: Add Right Return
options:
No - default: '0'
Yes: '1'
a22_nudge_left:
value: '-0.25'
units: INCHES
access: TEXTBOX
formlabel: Left Return Nudge
a23_nudge_right:
value: '-0.25'
units: INCHES
access: TEXTBOX
formlabel: Right Return Nudge
hidden:
formula: IF(Parent!hidden=1, 1, IF(Parent!a31_zone_bottom<=0, 1, a99_hide_self))
units: STRING
a99_hide_self:
value: '0'
units: STRING
access: LIST
formlabel: Hide
options:
Show - default: '0'
Hide: '1'
lenx:
formula: gross_width
units: INCHES
leny:
formula: base_depth
units: INCHES
lenz:
formula: zone_bottom
units: INCHES
a12_tk_trim_thickness:
value: '0.75'
units: INCHES
access: TEXTBOX
formlabel: TK Trim Thickness
material:
formula: IF(a94_material_override="auto", Parent!material_case, a94_material_override)
units: STRING
x:
formula: '0'
units: INCHES
y:
formula: '0'
units: INCHES
z:
formula: '0'
units: INCHES
zone_left:
formula: Parent!a20_zone_left
units: INCHES
zone_right:
formula: Parent!a21_zone_right
units: INCHES
case_width:
formula: Parent!a22_case_width
units: INCHES
base_depth:
formula: Parent!a01_case_depth - a11_setback
units: INCHES
gross_width:
formula: Parent!a02_gross_width
units: INCHES
case_depth:
formula: Parent!a01_case_depth
units: INCHES
zone_back:
formula: Parent!a41_zone_back
units: INCHES
zone_bottom:
formula: Parent!a31_zone_bottom
units: INCHES
children:
- class: TK Trim
transform:
rotate:
x: 90
flip: z
- class: __EZ Level
id: ez_left
transform:
rotate:
x: 180
z: 90
flip: [x, y]
attributes:
x:
formula: IF(Parent!a20_left_return=1, IF((Parent!zone_left+Parent!a22_nudge_left-Parent!a12_tk_trim_thickness)<0,
-Parent!a22_nudge_left+Parent!a12_tk_trim_thickness, Parent!zone_left),
Parent!zone_left)
units: INCHES
- class: __EZ Level
id: ez_right
transform:
rotate:
x: 180
z: 90
flip: x
attributes:
x:
formula: IF(Parent!a21_right_return=1, IF((Parent!zone_right+Parent!a23_nudge_right-Parent!a12_tk_trim_thickness)<0,
Parent!gross_width+Parent!a23_nudge_right-Parent!a12_tk_trim_thickness,
Parent!gross_width-Parent!zone_right), Parent!gross_width-Parent!zone_right)
units: INCHES
- class: __EZ Level
id: ez_center
transform:
rotate:
x: 180
z: 90
flip: [x, y]
attributes:
x:
formula: Parent!zone_left + Parent!case_width/2 - 0.375
units: INCHES
hidden:
formula: IF(Parent!hidden=1, 1, IF(Parent!case_width>36, a99_hide_self, 1))
units: STRING
- class: TK Return Trim
id: tk_return_l
transform:
rotate:
x: 90
y: 90
attributes:
x:
formula: -Parent!a22_nudge_left
units: INCHES
hidden:
formula: IF(Parent!hidden=1, 1, IF(Parent!a20_left_return=1, a99_hide_self,
1))
units: STRING
- class: TK Return Trim
id: tk_return_r
transform:
rotate:
x: 90
y: 90
flip: z
attributes:
x:
formula: Parent!gross_width + Parent!a23_nudge_right
units: INCHES
hidden:
formula: IF(Parent!hidden=1, 1, IF(Parent!a21_right_return=1, a99_hide_self,
1))
units: STRING
I got frustrated with how difficult and error prone it was to create and maintain DCs using the dynamic attributes dialog so I thought this would be an easier method. It ended up creating pretty long text files but the real benefit was that I kind of incidentally created a LLM dynamic component protocol. It’s enabled us to create some pretty complex DC systems that, due to just being based on plain text are far more maintainable than skps and can be tracked easily with Git.
If there are people here who are more code savvy than me who would be interested in improving it, I’ll make the repo public. It would be worth it to me just to improve the plugin. It is definitely AI slop but it pretty stably and reliably stamps and modifies DCs and I’ve added extra functionality like sketchup tagging and adding opencutlist dictionary values.