Message 1 of 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I thought I was going about this the correct way, but since I am here and posting, it isn't working out the way I thought it should.
I have a class storing the ElementId and bool value for the visiblity of imported DWG layers. That class is below
public class CategoryVis
{
public ElementId Id { get; set; }
public bool Visibility { get; set; }
}
The tranaction I am using to update the View Template is:
using (Transaction transaction = new Transaction(this.doc, "Transfer DWG Visibility Settings"))
{
transaction.Start();
foreach (importedDWG imp in sourceImports)
{
foreach (CategoryVis categoryVis in imp.categoryVis)
{
view.SetCategoryHidden(categoryVis.Id, categoryVis.Visibility);
}
}
transaction.Commit();
}
In the code above, view is the View Template. When I run this code, nothing happens. There is no command listed in the undo list, and the view template has not been modified. What am I missing to update this view template?
Solved! Go to Solution.