Create Curtain System

Create Curtain System

Anonymous
Not applicable
763 Views
2 Replies
Message 1 of 3

Create Curtain System

Anonymous
Not applicable

I am new to Revit. I want to create a Curtain System for the selected faces. To create, I can call the method

CurtainSystem cs = document.Create.NewCurtainSystem() which takes two parameters. I can get the facearray from the user selection. But I am not knowing how to create a CurtainSystemType which is the second parameter. Is there any sample code for this?

Also, can i colour the curtain system with multiple colors (different color for each grid) ?

Thanks,

0 Likes
Accepted solutions (1)
764 Views
2 Replies
Replies (2)
Message 2 of 3

aignatovich
Advisor
Advisor
Accepted solution

Hi!

 

You can use FilteredElementCollector to retrieve all CurtainSystemTypes or you can use doc.GetDefaultElementTypeId(ElementTypeGroup.CurtainSystemType)

 

1)

var collector = new FilteredElementCollector(doc);
var cst = collector.OfClass(typeof(CurtainSystemType)).OfType<CurtainSystemType>().FirstOrDefault(x => <your condition>);

2)

var cstId = doc.GetDefaultElementTypeId(ElementTypeGroup.CurtainSystemType);
var cst = (CurtainSystemType)doc.GetElement(cstId);
0 Likes
Message 3 of 3

aignatovich
Advisor
Advisor

About your second question. You can get curtain system curtain grids, then for each curtain grid get panels, and override graphics for specific views

0 Likes