Handtrail Material

Hi,

I need to get the material in my hantrail.

I tried by ELEMENT.GETMATERIALS, but didn’t work.

image

Try using the Family Types node. The handrail in question could have multiple Types and thus multiple materials.

Think it’s deeper than that, as the railing innqueation can actually have many materials, as railings have a compound structure just like a wall or ceiling, but with the added headache of the layers having a profile. Compound layer structure maybe?

I did this once for a railing top rail:

1 Like

More difficult for the non-continuous rail elements though. It could be rebuilt to be a handrail or top rail to make things easier to access though.

Could be interesting to mention here:

2 Likes

@daniel.petrin, those parameters under the Edit... menus have the storage type none, which means that they are not accessible via the API:

Trying to query builtin parameter STAIRS_RAILING_RAIL_STRUCTURE doesn’t work either:

https://knowledge.autodesk.com/search-result/caas/CloudHelp/cloudhelp/2016/ENU/Revit-API/files/GUID-FD067FA5-623D-474B-98FB-686C096F0165-htm.html

Some material properties contained in other compound parameters are not accessible from the API. As an example, in the following figure, for System Family: Railing, the Rail Structure parameter’s StorageType is StorageType.None. As a result, you cannot get material information in this situation.

3 Likes

Top rail and handrail look to be accessible though. You could try those.

Isolating the railing in a clipped axon, locking the view, placing a material tag on surfaces, reading the material tags value, and looking up the material with the matching mark may also work. It would be a lot of coding and has a lot of pitfalls.