Autocad: Plugin Entwicklung

using (Transaction tr = db.TransactionManager.StartTransaction())

<?xml version="1.0" encoding="utf-8"?> <ApplicationPackage SchemaVersion="1.0" AutodeskProduct="AutoCAD" Name="LayerManager" Description="Automated layer tools"> <Components> <RuntimeRequirements OS="Win64" Platform="AutoCAD" SeriesMin="R24.0" SeriesMax="R25.0" /> <ComponentEntry AppName="LayerManager" ModuleName="./LayerManager.dll" LoadOnAutoCADStartup="true" /> </Components> </ApplicationPackage> End of Paper autocad plugin entwicklung

[CommandMethod("DRAWDOOR")] public static void DrawDoor() using (Transaction tr = db

BlockTable bt = tr.GetObject(db.BlockTableId, OpenMode.ForRead) as BlockTable; BlockTableRecord btr = tr.GetObject(bt[BlockTableRecord.ModelSpace], OpenMode.ForWrite) as BlockTableRecord; // ... create entities tr.Commit(); ?xml version="1.0" encoding="utf-8"?&gt