Message 1 of 2
Import Layers from Filter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hey All,
How would you go about importing layers from a layer filter in a dws file??
public void MyCommand() // This method can have any name
{
string standardsFile = @"C:\Temp\Layers.dws";
using (Database db = new Database(false, false))
{
db.ReadDwgFile(standardsFile, FileShare.Read, true, "");
LayerFilterTree lft = db.LayerFilters;
LayerFilterCollection lfc = db.LayerFilters.Root.NestedFilters;
foreach (LayerFilter lf in lfc)
{
Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor.WriteMessage(lf.Name + "\n");
}
}
}This is where I am stuck. Any one have any pointers?
Cheers
Brent