"hashtag" sets of parameters in an object

Issue.

I need to produce a parameter compiled from all chosen parameters of an object. It’s easier to describe on simple example below:

I have number of 3d boxes in model. Boxes are characterized by 3 basic parameters (width, lenght and height). Now I want to give each of these boxes a shared parameter with value - say: 1,1,1 where 1st number gives me a variant of width, 2nd number gives a variant of lenght and 3rd number gives a variant of height.

If all my boxes have equal lenght then there is a single variant of lenght (1), but if one of my boxes has lenght different than other boxes, then this should be regarded as variant 2, and so on.

So if my boxes have say: 3 different widths, 5 different lenght, and 2 different heights, my string should take any form of [1 to 3,1 to 5,1 to 2]. Then each of my boxes get 3 digit “hashtag”, for ex. 1,3,2 or 2,5,1 and so on.

Summarizing - script should take each parameter, then compare its values with same parameters of all analyzed objects and assign a number (tag) to each differing value.
At the end all those numbers/tags should be concatenated into single string and written to a special parameter in that object

The purpose of this is to enable grouping and sorting objects that have more than 4 differing paramters and thus cannot be properly sorted/grouped with revit tables. This may be usefull to group for ex. doors in proper tables, as doors can have more than 4 differing paramters while still being single type of door. Such script then could produce something like “parameter hashtag” that could summarize many different parameter values into single string.

Thank You for Your help. I think this may help many people with their schedules.

Not sure whether this is quite what you are after, but first a simple example concatenating some dimension parameters (Length, Width and Height) from a basic box family into a single string and pushing it into the Comment field of the instance in Revit

A more complex example involving different types of parameters (dimensions, levels, materials) where instead of concatenating the values directly, I have mapped each value to a “reference” value with a user-defined prefix, so the smallest Length is 230, so all length values of 230 get mapped to L1, 300 becomes L2 and so on. The first material becomes M1 etc.

The five reference values get concatenated, and again pushed to Comments (but that could be to a different parameter of your choosing.

The boxes with the parameters and the concatenated Comments field

And a schedule grouped by Comments

The downside is that the parameter “references” (L1, L2 etc) are not stable in that as different values are added to the model they will be recalculated. If a box with a length of 200 is added, then 230 would become L2 for example with 200 being L1. If the “reference” stability is important then you could use dictionaries for lookups or similar. Dyn attached below.

Hope this helps,
Thomas

39278.dyn (58.8 KB)

2 Likes

Thank You Thomas_Corrie.

This is exactly what i’m looking for. The ‘stability’ of those ‘tags’ is not entirely important, because those tags are always different based on a number of parameters analyzed. This is enough to sort elements in revit tables based on many differing parameters that exceed revit’s limit of 4 level sorting.

This is an quite elegant solution allowing to sort objects that have a lot of parameters, based on those parameters and giving You all unique ones.

By myself I was able to make a simple script tagging one parameter and giving it unique tag, but your solution is much better and produces elegant output.

Thank You again.

1 Like