Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Perimeter closed loop of beams

1 REPLY 1
Reply
Message 1 of 2
bthatcher
348 Views, 1 Reply

Perimeter closed loop of beams

How can I get the closed loop sketch created by the perimeter beams. I want to automate floor creation. Thanks.

1 REPLY 1
Message 2 of 2
saikat
in reply to: bthatcher

Does this help?

 

UIApplicationuiApp = commandData.Application;

 

UIDocumentuiDoc = uiApp.ActiveUIDocument;

 

String coords = String.Empty;

 

foreach (Element ele in

uiApp.ActiveUIDocument.Selection.Elements)

{

BeamSystem beamSys = ele asBeamSystem;

 

if (beamSys != null)

{

foreach (Line line inbeamSys.Profile)

{

coords = coords +

"StartPoint : " + line.get_EndPoint(0).X.ToString() + ", "+

line.get_EndPoint(0).Y.ToString() +

", " + line.get_EndPoint(0).Z.ToString() + ");"+

 

"EndPoint : " + line.get_EndPoint(1).X.ToString() + ", "+

line.get_EndPoint(1).Y.ToString() +

", " + line.get_EndPoint(1).Z.ToString() + ");" + "\n";

}

}

}

TaskDialog.Show("Coords", coords);



Saikat Bhattacharya
Senior Manager - Technology Consulting

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Rail Community