.NET
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Import Layers from Filter
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
65 Views, 1 Replies
12-03-2012 12:02 AM
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.D ocumentManager.MdiActiveDocument.Editor.WriteMessa ge(lf.Name + "\n");
}
}
}This is where I am stuck. Any one have any pointers?
Cheers
Brent
Re : Import Layers from Filter
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
12-03-2012 12:17 AM in reply to:
BrentBurgess1980
Hi,
Look at the WblockCloneObjects() method.
Gilles Chanteau
