Autodesk.Revit.DB.GeometryObject
Inheritance Hierarchy
- Autodesk.Revit.DB.Curve
- Autodesk.Revit.DB.Edge
- Autodesk.Revit.DB.Face
- Autodesk.Revit.DB.GeometryElement
- Autodesk.Revit.DB.GeometryInstance
- Autodesk.Revit.DB.Mesh
- Autodesk.Revit.DB.Point
- Autodesk.Revit.DB.PolyLine
- Autodesk.Revit.DB.Profile
- Autodesk.Revit.DB.Solid
GraphicsStyleId | The ElementId of the GeometryObject's GraphicsStyle | |
IsElementGeometry | Indicates whether this geometry is obtained directly from an Element. | |
IsReadOnly | Identifies if the object is read-only or modifiable. (Inherited from APIObject.) | |
Visibility | The visibility. |
// find the name of the GraphicsSytleCategory for every geometric primitive in a family instance
Options options = app.Create.NewGeometryOptions();
GeometryElement geomElem = element.get_Geometry(options);
foreach (GeometryObject geomObj in geomElem)
{
GeometryInstance geomInst = geomObj as GeometryInstance;
if (geomInst != null)
{
foreach (Object obj in geomInst.SymbolGeometry)
{
GeometryObject geomObject = obj as GeometryObject;
//The ElementId of the GeometryObject's GraphicsStyle
GraphicsStyle gStyle = doc.GetElement(geomObject.GraphicsStyleId) as GraphicsStyle;
if (gStyle != null)
{
string gstyleName = gStyle.GraphicsStyleCategory.Name;
}
}
}
}