Setting the dynamic component's definition depending on selected options

Hi there, first time poster here!

Wondering if there is a way to change my dynamic component’s definition, depending on what options i chose. We need to export parts lists, and if the definition would be set prior to exporting, it would be way more efficient

I am getting used to dynamic components, so there are still lots of lingo i don’t understand. For an example, let’s say I have a 2x2x2 cube with definition “cube222”. If i set my cube to 3x3x3 with dynamic options, i want the name definition to reflect the change, so “cube333”

thanks in advance if anyone can help me understand how to do this!

The instance name is the ideal way of nominating members of a family and any specific identifications.
So for the definition Cube, you would set up an attribute that automatically generates the desired id. you would then transfer (copy) this to the that instance name, then if you have not used the Name attribute nor the changed the attribute header/title, then both dialogs update to suit any changes to the instance name,
The attached file is of a cube DC that after being created and saved as a component it is brought into a clean (that is the original definition has been purged) or new file, the instance connection will work.
cubes.skp (27.4 KB)
although this require a manual copy of the description to the info, instance name, you can set up a script to fill it for you, the instance can have the same name for different component#numbers, which are inevitable when using nested DCs so much better than manually or script changing the definition name.

1 Like

Ok thank you, i will try and see how it is done, and replicate it in my work. Much appreciated

may I ask what is the DCs to be used for?
if you creating a collection of building materials, or packages,

as you are aware the size, Len attributes are the outer bounds of the object, so creating a simple base component at a common size, with the most likely attributes and those you wish to use in reports can act as a template.
So copying, resize is likely then, so its important to make or confirm unique and scale definition via the right click menu. In the same working file before saveas a component to be used later.

If you decide to use the instance method, for children (nested levels) after you have created the DC, change the references to their parents from the title to the generic parent! so that any changes to the instance name later will not cause an error

like if you got a parent called Box, with children that have references like =box!lenY/2 you would eventually change this to = parent!lenY/2, then if you change the instance name to box24, then the children do not suffer