Hi,
Currently, it is not possible to access the detail object through the API.
We will add an issue to make this workflow possible in the future.
A workaround will be to get the extents from the model object then calculate the bottom and the top level.
Sample code:
Autodesk.AdvanceSteel.DocumentManagement.DocumentManager.lockCurrentDocument();
Autodesk.AdvanceSteel.CADAccess.TransactionManager.startTransaction();
Autodesk.AdvanceSteel.CADLink.Database.ObjectId objectId = UserInteraction.SelectObject();
FilerObject pObject = DatabaseManager.Open(objectId);
if(pObject.IsKindOf(FilerObject.eObjectType.kAtomicElem))
{
AtomicElement pAtomic = (pObject as AtomicElement);
Autodesk.AdvanceSteel.Geometry.Point3d minPoint = pAtomic.GeomExtents.MinPoint;
Autodesk.AdvanceSteel.Geometry.Point3d maxPoint = pAtomic.GeomExtents.MaxPoint;
double objectBottomLevel = minPoint.z;
double objectTopLevel = maxPoint.z;
}
Autodesk.AdvanceSteel.CADAccess.TransactionManager.endTransaction();
Autodesk.AdvanceSteel.DocumentManagement.DocumentManager.unlockCurrentDocument();
Constantin T
Principal Engineer