Revit 2025 API
Shape |
A utility class that supports conversion of geometry stored in an external format into a Revit geometry objects.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntax
The ShapeImporter type exposes the following members.

Name | Description | |
---|---|---|
![]() | ShapeImporter | Default constructor. Initializes an instance of ShapeImporter that will automatically recognize the file format from its extension (ShapeImporterSourceFormat.Auto). |

Name | Description | |
---|---|---|
![]() | DefaultLengthUnit | The length unit to be used if not specified when the input is a unitless SAT file. |
![]() | InputFormat | The format of the incoming data. |
![]() | IsValidObject | Specifies whether the .NET object represents a valid Revit entity. |

Name | Description | |
---|---|---|
![]() | Convert | Converts the geometry stored in the external format into a collection of Revit geometry objects. |
![]() | Dispose | Releases all resources used by the ShapeImporter |
![]() | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object) |
![]() | GetHashCode | Serves as the default hash function. (Inherited from Object) |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object) |
![]() ![]() | IsServiceAvailable | Checks whether the data conversion service is available. |
![]() | SetDefaultLengthUnit | Sets the length unit to be used when the input is a unitless SAT file. |
![]() | ToString | Returns a string that represents the current object. (Inherited from Object) |

See ShapeImporterSourceFormat for the list of supported formats.

public void ReadSATFile(Document revitDoc) { // Allow the user to select a SAT file. OpenFileDialog ofd = new OpenFileDialog(); ofd.Filter = "SAT Files (*.sat)|*.sat"; if (DialogResult.OK == ofd.ShowDialog()) { ShapeImporter shapeImporter = new ShapeImporter(); shapeImporter.InputFormat = ShapeImporterSourceFormat.SAT; IList<GeometryObject> shapes = shapeImporter.Convert(revitDoc, ofd.FileName); if (shapes.Count != 0) { using (Transaction tr = new Transaction(revitDoc, "Create a DirectShape")) { tr.Start(); DirectShape dsImportedSat = DirectShape.CreateElement(revitDoc, new ElementId(BuiltInCategory.OST_Walls)); dsImportedSat.SetShape(shapes); tr.Commit(); } } } }
Public Sub ReadSATFile(revitDoc As Document) ' Allow the user to select a SAT file. Dim ofd As New OpenFileDialog() ofd.Filter = "SAT Files (*.sat)|*.sat" If DialogResult.OK = ofd.ShowDialog() Then Dim shapeImporter As New ShapeImporter() shapeImporter.InputFormat = ShapeImporterSourceFormat.SAT Dim shapes As IList(Of GeometryObject) = shapeImporter.Convert(revitDoc, ofd.FileName) If shapes.Count <> 0 Then Using tr As New Transaction(revitDoc, "Create a DirectShape") tr.Start() Dim dsImportedSat As DirectShape = DirectShape.CreateElement(revitDoc, New ElementId(BuiltInCategory.OST_Walls)) dsImportedSat.SetShape(shapes) tr.Commit() End Using End If End If End Sub
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
See Also