How I can get Structural aspect aka PropertySetElement from Material?

How I can get Structural aspect aka PropertySetElement from Material with Python script?

2015-09-16 20-43-25 Скриншот экрана

example for Color:

OUT = UnwrapElement(IN[0]).Color


You can get the materials with clockwork’s excellent “FamilyType.CompoundStructureLayers” node. After that, you can unwrap a material and query its parameters as usual:



Dimitar , I know it

How I can get Structural aspect aka PropertySetElement from Material ? See screenshot

Ultimately, I want to get the density material

Oh, then you could try something along the lines of this:





Tho I’m not sure about the internal units that revit uses.

Dimitar, thank you.

You very helpful!
I did not know about and StructuralAssetId and GetStructuralAsset ()

Revit has this odd kind of internal units, which is totally ridiculous, but nevertheless. units need to be converted: density result * 35.31466680911273 = SI unit (kg/m3)


I’m trying to code this:

Input = a list of materials

Output = a list of these materials’ density:

I’m quite new to coding in Python, so maybe I made a very basic mistake. I read about the use of “Transaction manager” but I don’t know what it is and if I try to copy it in my code as got an error “unknown Transaction Manager”.

Thanks a lot for your help !

I solved my error (coding synthax). This is the final code:

import clr

# Import RevitAPI
import Autodesk
from Autodesk.Revit.DB import ReferencePointArray

# Import DocumentManager
import RevitServices
from RevitServices.Persistence import DocumentManager

doc= DocumentManager.Instance.CurrentDBDocument

for i in IN[0]:

for i in range(len(elements)):
Density= doc.GetElement(elements[i].StructuralAssetId).GetStructuralAsset().Density
DensitySI= Density*35.31466680911273

OUT = outlist


1 Like