How can I get the closed loop sketch created by the perimeter beams. I want to automate floor creation. Thanks.
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);