- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm trying to get all layers from a file. But I get all layers from the referenced files as well, and I don't know how to distinguish them from one and other.
using (Transaction transaction = db.TransactionManager.StartTransaction())
{
var layerTable = transaction.GetObject(db.LayerTableId, OpenMode.ForRead) as LayerTable;
foreach (var layer in layerTable)
{
var currentLayer = layer.GetObject(OpenMode.ForRead) as LayerTableRecord;
// Check if layer is from current file or referenced file...
}
transaction.Commit();
}
How can I know if a layer belongs to an external reference and not the opened file?
Solved! Go to Solution.
Link copied