Dynamic profile creation

Hi everybody. I need to create a serie of Dynamic Component but I’m not quite sure how to do it. I have a set of profiles that have different sections (E.g. 2x2”, 3x3” and 2x1”) and for each one of these types I have a stock of units in different lengths. For example, the 2x2” profile comes lengths of 50, 130, 255, 455, 500 and 900 millimeters. Is there a way to create a component that allows me to place it in the model and then pick it’s length from, let’s say, a drop-down list?

I would like to be able to quickly change the length of any instance (by picking from a list for example), avoiding having to do it manually, having the risk of making mistakes with the length.

I hope to make sense. Thanks in advance.

Update: I’ve finally had the chance to pick up this comment and try. @Ryan.moore I played with the components you handover for a while trying to learn, then I started to create my own.

I didn’t know there were this many posibilities, and I’m still trying and learning.

Thanks a lot

Here you go:

Examples.skp (518.7 KB)

I included an example of something a bit more complex for you to play with too. Don’t know about you but I learn best by pulling stuff apart. It changes name description and quantity based on the drop down selections. I adjust the length with the scale tool, you could make it a drop down set of choices for LenX.

You can reference all the DC functions here.

And ther’s a list of DC gotcha’s here.

And for learning purposes any and all of @pcmoor Philip’s posts are very helpful.

EDIT: Oh ya you have to do the mm conversions to inches, or the other way. You can’t have cm and inches active in the DC at the same time.

1 Like

@ryan.moore … what a useful, helpful post! Bravo! Thank you!

There should be separate “Dynamic Component” category … with a permanent link to your post at the top.

And where has this list of Dynamic Component gotcha’s been hiding? No telling how many hours this could have saved me … if I had been smart enough to find it.

And then … here is one more “gotcha” you can add to the list … best as I can remember it.

NEVER divide by a trig function … because it could be zero … and dividing by zero is not allowed.

As I remember it, the DC was blowing up because, even though it was in a branch where the function could NOT be zero (because of the branch) … it still blew up … because of the “possibility” of dividing by zero.

One would expect an error if an equation resulted in dividing by zero … but this was the case of the DC blowing up because of the “possibility” of dividing by zero … if the function had gone to zero … which it would not have not done (because this was tested for in the branch). Think I have been bit by this twice now … but each time I was in the middle of debugging a DC that included a bunch of math … so I simply rearranged some equations and kept moving. Might be interesting to see if I could construct a simple demonstration of the problem.

Regardless … thank you for your helpful post … us DC users/developers need to stick together.

2 Likes

Thanks a lot. I didn’t have the chance yet to look into the links you’ve shared. But I’ll let you know.

Cheers

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.