How get material from split face?

How get material from split face?

Anonymous
Not applicable
820 Views
2 Replies
Message 1 of 3

How get material from split face?

Anonymous
Not applicable

Hello!

 

I try to get meterial from split face, with next code, but it not work:

 

Dim elements As FilteredElementCollector = New FilteredElementCollector(doc)
        Dim lstFaceSplitter As List(Of FaceSplitter) = elements.OfClass(GetType(FaceSplitter)).Cast(Of FaceSplitter)().Where(Function(a) a.SplitElementId = WW.Id).ToList
        Dim opt As New Options
        opt.View = CurrView
        opt.IncludeNonVisibleObjects = True

        For i = 0 To lstFaceSplitter.Count - 1

            Dim PaintMaterialIds As List(Of ElementId) = lstFaceSplitter(i).GetMaterialIds(True)
next

 

изображение_2021-03-19_144813.png

0 Likes
821 Views
2 Replies
Replies (2)
Message 2 of 3

architect.bim
Collaborator
Collaborator

Hi!

You can get what you need with the following steps:

  1. Get wall solid;
  2. get list of all faces for that solid;
  3. check each face with GetRegions method; if it returns two of more faces - than it is splitted;
  4. get material using MaterialElementId property;

I've checked this algorithm - it works fine, I can see material of painted split region in Revit Lookup.

210319_1811_012.jpg


Maxim Stepannikov | Architect, BIM Manager, Instructor
Message 3 of 3

helias.zografopoulos
Explorer
Explorer

Hey, I haven't figured a way to report painted Material of Split faces. 
Could maybe explaine a bit more on your method? is this within Dynamo?

0 Likes