Filling an instance shared parameter with sequence number for each different family type

Hi all,
I am trying to fill a shared parameter with sequence number for all of the instances inside each family type in the project (i will give a sequence number for all of the instances inside each family type). I want to organize this sequencing by level which means that the first instance of the first family type located in level 1 will be number 1 till the end of the levels and till the end of the instances of this type in the project.
Can anyone support with that?

Hi Tony, can you please post an image of your script, indicating where you are stuck? Thanks

1 Like


Dear Azubike, here is a snapshot from the script, but as you can see the highlighted part it is reading null!

Next time come back early if anyone ask you to provide images who is trying to help. Follow the guidelines How to get help on the Dynamo forums

2 Likes

I don’t see why you need the list.create node coming from the AllElementOfCategories node. I think it is throwing your list structure off in the set parameter node.

i needed to make them two lists so that each item from the list would read from the equivalent list

I have made some modifications to the script but now all of the values for the elements have the same value!!!

Dear Erfajo,
Thanks, your script seems much easier

The only problem is that i am trying to give a sequence number to each element of the family type.

I tried using your script and modifying the first part to read all of the family types like this:

but now in revit, each family type is reading the same sequence number like this:

I have mentioned in red how i want the result

How can i solve this?

You always have the solution :slight_smile:

But excuse my ignorance as i am still a beginner with dynamo
Sequence parameter Trials.dyn (19.6 KB)

This is my script, i have placed the “GroupByKey” but i couldn’t know which node to use for the “Element.ElementName” :frowning:

Thanks Erfajo :slight_smile:

Any chance 3 years later i can get help with this same topic, i just want to be able to add a sequence number to each family as per @erfajo first should an example of… however i wish to run this within an assembly so each assembly starts from 1… meaning the same family instance could have a different number in each assembly?

Please start a new topic for a new question.

Sorry will do.