public static DlxMeasure Instance() { if (instance == null) { instance = new DlxMeasure(); } return(instance); }
public Result Execute( ExternalCommandData commandData, ref string message, ElementSet elements ) { UIApplication uiApp = commandData.Application; Document _doc = uiApp.ActiveUIDocument.Document; DlxMeasure mx = DlxMeasure.Instance(); // this cleaned up the text display problem // Application.SetCompatibleTextRenderingDefault(false); using (TransactionGroup tg = new TransactionGroup(_doc, "AO delux measure")) { tg.Start(); mx.Measure(uiApp); tg.RollBack(); } return(Result.Succeeded); }