Dynamic Component "instance" attributes
-
Hello everyone,
I'm trying to design dynamic component for my design business that allows sizing in all three dimensions as well as allowing the selection of key parameters such as:
Kickheight
Kickdepth
Side thickness
Drawer Gap
Back recess and thicknessand size of drawers
All was going well until I tried replicating the drawers. Each Drawer consists of a Drawer Box and a Drawer Face. I designed the top drawer and then replicated it twice. I renamed each of them Drawer 1, Drawer 2, and Drawer 3 and made the appropriate changes to each in terms of position (z-height) and visibility based on user selectable parameters.
I then changed the references for the Drawer Box and Drawer Face for each of them to reference the appropriate parent instance.
Now the mystery for me. The size attributes of the Drawer Faces in each of the Drawer instantiations are interconnected (change in any affects all instantiations) but not so with the drawer boxes.
i.e. If I change the Drawer Face attribute LenX in Drawer 1 to "Drawer 1!Lenx" the LenX attribute in the Drawer Boxes for Drawer 2 and Drawer 3 change as well to "Drawer 1!LenX" and I get an error because "Drawer 1!LenX" is outside of the scope of either the Drawer 2 or Drawer 3 object.
I would think the same behaviour would occur in both the Drawer Boxes and the Drawer Faces but that doesn't seem to be the case.
I tried setting LenX, LenY, and LenZ in the Drawer Box definition to Width, Depth, and Height custom variables and then use those variables to reference the parent size but with no luck.
I've attached the model in question. It's unfinished and a little rough with no error checking yet (no checks on the cumulative height of the drawers not being greater than the carcase height for instance).
I know could solve this with Make Unique for the second and third drawers but I'd like to understand this behaviour.
Thoughts anyone?
Thanks,
Mike
-
OK. Well, the response to that was deafening...
Perhaps this question will get more responses: How do I define a Dynamic Component and then make a unique copy of it so I don't get the aforementioned interactions??
-
As with normal component - make unique.
-
@dedmin said:
As with normal component - make unique.
Hmmmm.... when I do that, the "Make Unique" option is greyed out. Each instance of a dynamic component is already unique, hence the "#n" suffix. (Where n is an integer)
-
Hi Mike -
Will the number of drawers change based on user input? I know this doesn't really get at your question of the DC behavior for component copies generated using the COPY function (I'm interested in that response, too).
If the DC will always have the same amount of drawers, I would suggest making them unique components from the beginning.
If the DC will have changing numbers of drawers, I would suggest creating the max possible drawers, each as a unique component, and hiding or revealing them based on user input. This option seems a little sloppy to me, as it would bother me to have a hidden drawer floating in space when it wasn't used.
Have you made any headway on getting unique control over the component copies?
-
@danbig said:
Have you made any headway on getting unique control over the component copies?
Hi Dan,
Yes I have. I've attached the new and improved Drawer Cabinet. Take a look at the Component Options and you'll see a number of things that are programmable. Regarding the drawers, it's programmable with 1 to 4 and each drawer is programmable in size. If you use the Interact tool, you'll see each drawer box is different depending on whether it is a top, bottom, or middle drawer. Specifically the top and bottom clearances change.
As you can guess, the copy command wouldn't have worked due to the programmability of each of the drawers. I did use selective hiding instead.
Cheers,
MikeEDIT: Replaced the DRAWER CAB.SKP file with an updated one.
Advertisement