Message 1 of 12
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello everyone!
I face two options here to create/edit layers in AutoCAD using C#. Which one is the better thinking about the good practices:
Access my LayerTable direct for write, like this:
LayerTable lytab = trans.GetObject(db.LayerTableId, OpenMode.ForWrite) as LayerTable;
....Create or update my layer
Or access my LaterTable for read, and use the instruction lytab.UpgradeOpen(), like this:
LayerTable lytab = trans.GetObject(db.LayerTableId, OpenMode.ForRead) as LayerTable;
lytab.UpgradeOpen();
....Create or update my layer
I know that result of both is equals, but one is better of other? (thinking about erros, performance and etc...)
Thanks in advance.
Solved! Go to Solution.