Dear Paul,
Thank you for your renewed prompt and the pointer to the DynamoBIM discussion thread.
Just as you say, ‘Then what’, indeed.
I took a look at the dynamo discussion thread and am sorry to say that that is all gobbledygook to me.
I therefore implemented a new test command in The Building Coder samples that executes the calls to GetAllStairsIds and GetSubelements.
Now I understand the problem you are facing.
My rather horrid multistory stair looks like this:

The code looks like this:
- Select element
- Print out number of multistory stairs selected
- For each multistory stair:
- Call GetAllStairsIds
- Print out number of stair instances
- For each instance:
- Call GetSubelements
- Print out number of subelements
I added this code to The Building Coder samples in the new module CmdMultiStoryStairSubelements.cs, so you can refer to that for the exact implementation:
https://github.com/jeremytammik/the_building_coder_samples/blob/master/BuildingCoder/BuildingCoder/C...
The printout generated by this instance looks like this:
1 multi story stair selected:
Multi story stair 'MultistoryStairs Multistory Stairs <305957 Multistory Stairs>' has 1 stair instance:
Multi story stair instance 'Stairs Stairs <305678 Stair>' has 2 subelements:
Subelement a1358810-6f42-4442-aef0-4196d1c4e84f-0004aa0e=00000000 of type 204881
Subelement a1358810-6f42-4442-aef0-4196d1c4e84f-0004aa0e=00000001 of type 204881
By looking at this, we see that both of the two stair parts contained in the multistory stair are considered one single instance.
The two subelements are obviously the two stair parts.
The subelement unique id is valid, but differs from a normal document element unique id:
se.UniqueId = "a1358810-6f42-4442-aef0-4196d1c4e84f-0004aa0e=00000000"
No corresponding document element can be retrieved for that unique id, since no valid document element exists at that level.
To access the subelements that you are asking for, i.e., stair runs, landings, etc., we apparently need to access the sub-subelements.
Now that this is understood, I'll ask the development team again for further guidance.
Best regards,
Jeremy