public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements) { try { _activeUIDocument = commandData.Application.ActiveUIDocument; _application = commandData.Application.Application; _elementsSet = new ICollection <ElementId> [SetCount]; for (int x = 0; x < SetCount; x++) { _elementsSet[x] = new List <ElementId>(); } var frm = new ViewDepthOverrideForm(); var result = frm.ShowDialog(); if (result == DialogResult.OK) { if (frm.LineWeightSettings != null) { _lineWeightSettings = frm.LineWeightSettings; ViewDepthOverride(); return(Result.Succeeded); } } } catch (Exception e) { } return(Result.Failed); }
public ViewDepthOverrideForm() { InitializeComponent(); LineWeightSettings = new LineWeightSettings(); }