Creating parameter based on another parameters value

Hi everyone, this is my first post here.

I’m working with a family that have different cut lengths, and I’m trying to create a script that adds a “tag” name to another parameter based on the cut length values.

For example, I have 10 beams that are 100 cm long and 3 beams that are 200 cm long. My goal is to add the tag “FS1” to the 10 beams and “FS2” to the 3 beams.

However, I’ve hit a bit of a roadblock. Any help would be appreciated! :blush:

Evening @Mheftholm687CH ,
Not entirely sure what you are after but this may be of use.
In this case im just using a mark value to tag to write to combined parameters together.


TestWallTag.dyn (38.2 KB)
image
cheers KS

Thanks for the reply! it might be useful.

Im gonna try to explain a little better.
lets say we got 10 of each of the A200mm. i want to add FS1 in the parameter “Mark” to the 6100mm FS2 to the 8100mm and FS3 on the 5000mm and so on.

Hope that explains it better :slight_smile:

Hi @Mheftholm687CH
you could us GroupByKey to do this ,similar to below :thinking:


TestWallTagTake2.dyn (36.7 KB)

Cheers KS
image

1 Like

Sounds like you just want GroupByKey. That will group your beams based on length. Then you just need to create a value for each group and assign it back to the elements.

You might try searching the forums for similar topics, as this is a fairly common workflow.

1 Like

Thank you very much it works really well ! :smiley:

1 Like