Autodesk.Revit.DB.GeometryObject
Inheritance Hierarchy
| GraphicsStyleId | The ElementId of the GeometryObject's GraphicsStyle | |
| IsElementGeometry | Indicates whether this geometry is obtained directly from an Element. | |
| IsReadOnly | (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; } } } }
免责声明:本文系网络转载或改编,未找到原创作者,版权归原作者所有。如涉及版权,请联系删