Message 1 of 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I am trying to get the name of the Design Option that is set as Default in Active views VG overrides.
But the GetElement returns null.
What could be the problem?
UIApplication uiapp = commandData.Application;
UIDocument uidoc = uiapp.ActiveUIDocument;
Application app = uiapp.Application;
Document doc = uidoc.Document;
// Get the active view
View activeView = uiapp.ActiveUIDocument.Document.ActiveView;
// Get the design option set for the view
ElementId designOptionId = activeView.get_Parameter(BuiltInParameter.DESIGN_OPTION_ID).Id;
//returns ID
TaskDialog.Show("design option ID", designOptionId.ToString());
// returns null
Element designOptionElement = doc.GetElement(designOptionId);
DesignOption designOption = designOptionElement as DesignOption;
Solved! Go to Solution.