This sample demonstrates how to bridge AutoCAD® entities and Platform features, specifically:
- How to convert AcDbEntity to MgGeometry, and add to layer as a feature.
- How to convert MgGeometry to AcDbEntity, and delete the feature from layer.
To load the sample application:
- At the
Command:
prompt in AutoCAD Map 3D, enter the command . - Choose in the file browser.
To run the sample application:
- RunAutoCAD Map 3Dand load the .
- Add one or more vector layers into AutoCAD Map 3D.
- Draw one or more entities.
- Run the command ToFeature to convert Entity to Feature.
- When prompted, select a layer in which to add the new feature. Enter the property values in the form provided.
- Run the command ToEntity to convert Feature to Entity.
- Select one or more Features.
NoteThis sample is not intended to support all entity types. For demonstration purposes, it currently supports AcDbPoint, AcDbLine, AcDbPolyLine, and AcDbMPolygon conversion.