DirectShapeLibrary is used to store pre-created geometry for further referencing via the definition/instance mechanism.
It is not persistent: the scope of a library object is usually a single data creation session.
DirectShape::createGeometryInstance and DirectShape::CreateElementInstance will use the current DirectShapeLibrary to
look up the definitions.
store a collection of GNodes as definition
end class DirectShapeDefinition
Namespace: Autodesk.Revit.DBAssembly: RevitAPI (in RevitAPI.dll) Version: 21.0.0.0 (21.1.1.109)
Since: 2015
Syntax
C# |
---|
public class DirectShapeLibrary : IDisposable |
Visual Basic |
---|
Public Class DirectShapeLibrary _ Implements IDisposable |
Visual C++ |
---|
public ref class DirectShapeLibrary : IDisposable |
Remarks
There are two ways to add a definition to the library. The first is to add the definition as an array of geometry objects.
A DirectShape created as an instance of that definition will hold a copy of predefined geometry, transformed as requested.
If the definition was added as a DirectShapeType, a DirectShape object created as an instance of that definition will reference the type.
Its geometry would be an instance of type geometry.
Inheritance Hierarchy
System..::..Object
Autodesk.Revit.DB..::..DirectShapeLibrary
Autodesk.Revit.DB..::..DirectShapeLibrary