AnalyticalModel.GetPoint
Description:
Retrieves point of the Analytical Model.
Retrieves point of the Analytical Model.
public XYZ GetPoint()
XYZ
Point of the Analytical Model.
// retrieve and iterate current selected element
UIDocument uidoc = commandData.Application.ActiveUIDocument;
ICollection<ElementId> selectedIds = uidoc.Selection.GetElementIds();
Document document = uidoc.Document;
foreach (ElementId id in selectedIds)
{
Element e = document.GetElement(id);
// if the element is structural footing
FamilyInstance familyInst = e as FamilyInstance;
if (null != familyInst && familyInst.StructuralType == StructuralType.Footing)
{
AnalyticalModel model = familyInst.GetAnalyticalModel();
// structural footing should be expressable as a single point
if (model.IsSinglePoint() == true)
{
XYZ analyticalLocationPoint = model.GetPoint();
}
}
}
-
This AnalyticalModel cannot be expressed as a single point. -or- Disabled Analytical Model can't be used.