I’m working on a woodworking project. I have created a bunch of roughed up mockup components for a few things, such as furniture legs, boards, etc, with custom attributes and behaviour for scaling.
In the libarary model, I right-clicked the component used save as and saved it into a components folder.
In the actual product model I used the components view to open the local collection pointiing to the components folder, and placed a bunch of them into the model, 4 furniture legs, a bunch of boards, etc,
scaled them accordingly, and specified the custom attributes.
Now I would like to make the legs a bit nicer, and add a few extra options, but it seems like whenever I replace the DC either using rightlick → replace, or righclick → dynamic components → swap, I get a warning that the component has been edited. But it hasn’t, although the attributes have been modified using the component options view.
If I carry out the reload / swap, all the attributes are forgotten, and the values from the component are loaded.
Is there a way to avoid this?
This is my first post, I’m happy to share the model, so you can take a look at it, but not sure how to do that.
You can ‘double wrap’ your DC by making a new component within. By refering to ‘Parent’ attributes and keeping the Options to choose on the highest level Component, the values will be kept.
This will need some preparation/altering your components etc.
The one you “save as” should have
=current(“lenx”)*2.54 in value box of lenx attribute. The 2.54 is just for inch conversion, not needed for those in the USA
like wise for the other sizes
=current(“leny”)*2.54
=current(“lenz”)*2.54
Then the values will be matched to the one swapped, Do not worry about overwriting these formulas whilst working in the model, so long as the saved component has them
Hello pcmoor, I may be having a similar issue as the OP. I have two DCs that have a “Left” or “Right” attribute saved to my component library with the direction set to “Right”. If one is set to “Left” in the model and I try to reload it with one from the library the direction flips. So, now “Right” has become “Left” and vice versa. Is there a way to have reloaded components take up the attributes of the one they are replacing?Dynamic Component Saved Scene.skp (316.2 KB)
on windows
=current(“lenx”)*2.54 works
0.0 not found error is not same as circular reference. Likely the " " is not recognized, they may be smart quotes on your machine
Yeah, it was those annoying smart quotes. Thanks, turning them off seems to have fixed the issue with the errors, however the replaced components are losing their attributes again now…
I’ll try @MikeWayzovski’s suggestion a bit later today, although I’m not 100% on what he is suggesting. It seems to me that I do have this wrapper component already, but I’ll to wrap it again.
Okay, so the solution seems to be to NOT use the LenX, LenY and LenZ in the outermost component (the one exported) as inputs. If I create three other custom attributes, say SizeX, SizeY, and SizeZ, and then use the formulas =SizeX, =SizeY and =SizeZ for the LenX, LenY, and LenZ respectively, then it works nicely after using rightclick → dynamic components → swap, but not the right-click, reload.
Hi, Thank you for the reply. I think I finally understand “Wrapping” of components. Now I have to go redo all or most of my DCs. Thanks again for the help!
I thought I had it figured out, but there is still an issue. When I change the Height attribute in the model you posted the Axis does not follow the DC. I need the height parameter to be relative to the drawing origin. In other words, if I set the height to be 700 mm it needs to be 700 mm up from the drawing origin. If I set a height in the dialog, say 500 mm, and then move it with the “Move” tool the dialog remains at 500 mm instead of showing the new height of the DC.