public ExternalCommandResult Execute(Application excelApp, ref string errorMessage, ref Range errorRange) { var s = new CppDocExtracter(); return(AddinManagerDebuger.DebugInAddinManager(s.ExtractCppDoc, excelApp, ref errorMessage, ref errorRange)); }
public ExternalCommandResult Execute(Application excelApp, ref string errorMessage, ref Range errorRange) { var s = new A3PageSetup(); return(AddinManagerDebuger.DebugInAddinManager(s.SetupA3Page, excelApp, ref errorMessage, ref errorRange)); }
public ExternalCommandResult Execute(Application excelApp, ref string errorMessage, ref Range errorRange) { var s = new 规范数据源(); return(AddinManagerDebuger.DebugInAddinManager(s.QuantityList, excelApp, ref errorMessage, ref errorRange)); }
public ExternalCommandResult Execute(SelectionSet impliedSelection, ref string errorMessage, ref IList <ObjectId> elementSet) { var sp = new InfosGetter_Substitution(); return(AddinManagerDebuger.DebugInAddinManager(sp.SubstituteSoil, impliedSelection, ref errorMessage, ref elementSet)); }
public ExternalCommandResult Execute(SelectionSet impliedSelection, ref string errorMessage, ref IList <ObjectId> elementSet) { var sp = new InfosGetter_FillCutInters(); return(AddinManagerDebuger.DebugInAddinManager(sp.ExportFillCutIntersections, impliedSelection, ref errorMessage, ref elementSet)); }
public ExternalCommandResult Execute(SelectionSet impliedSelection, ref string errorMessage, ref IList <ObjectId> elementSet) { var s = new ClosedAreaSumup(); return(AddinManagerDebuger.DebugInAddinManager(s.SumupClosedArea, impliedSelection, ref errorMessage, ref elementSet)); }
public ExternalCommandResult Execute(SelectionSet impliedSelection, ref string errorMessage, ref IList <ObjectId> elementSet) { var s = new Polyface_SubDMesh_Convertor(); return(AddinManagerDebuger.DebugInAddinManager(s.ConvertPolyfaceToSubDMesh, impliedSelection, ref errorMessage, ref elementSet)); }
public ExternalCommandResult Execute(SelectionSet impliedSelection, ref string errorMessage, ref IList <ObjectId> elementSet) { var s = new PolylineVerterxesExtracter(); return(AddinManagerDebuger.DebugInAddinManager(s.Polyline2Point, impliedSelection, ref errorMessage, ref elementSet)); }
public ExternalCommandResult Execute(SelectionSet impliedSelection, ref string errorMessage, ref IList <ObjectId> elementSet) { var s = new CopyColumns(); return(AddinManagerDebuger.DebugInAddinManager(s.CopyColumnsFromClipboard, impliedSelection, ref errorMessage, ref elementSet)); }
public ExternalCommandResult Execute(SelectionSet impliedSelection, ref string errorMessage, ref IList <ObjectId> elementSet) { var s = new ReverseCurve(); return(AddinManagerDebuger.DebugInAddinManager(s.ReverseCurveEnds, impliedSelection, ref errorMessage, ref elementSet)); }
public ExternalCommandResult Execute(SelectionSet impliedSelection, ref string errorMessage, ref IList <ObjectId> elementSet) { var s = new BlockRefAttStyleEditor(); return(AddinManagerDebuger.DebugInAddinManager(s.EditBlockRefAttStyles, impliedSelection, ref errorMessage, ref elementSet)); }
public ExternalCommandResult Execute(SelectionSet impliedSelection, ref string errorMessage, ref IList <ObjectId> elementSet) { var s = new PerpendicularLine(); return(AddinManagerDebuger.DebugInAddinManager(s.DrawPerpendicularLine, impliedSelection, ref errorMessage, ref elementSet)); }
public ExternalCommandResult Execute(SelectionSet impliedSelection, ref string errorMessage, ref IList <ObjectId> elementSet) { var s = new SlopeProtTextModifier(); return(AddinManagerDebuger.DebugInAddinManager(s.ModifySlopeProtText, impliedSelection, ref errorMessage, ref elementSet)); }
public ExternalCommandResult Execute(SelectionSet impliedSelection, ref string errorMessage, ref IList <ObjectId> elementSet) { var s = new PolylineRemesh2(); return(AddinManagerDebuger.DebugInAddinManager(s.CreatePolylineFromCurveByIntervals, impliedSelection, ref errorMessage, ref elementSet)); }
public ExternalCommandResult Execute(SelectionSet impliedSelection, ref string errorMessage, ref IList <ObjectId> elementSet) { var s = new ExtensionGetter(); return(AddinManagerDebuger.DebugInAddinManager(s.GetExtension, impliedSelection, ref errorMessage, ref elementSet)); }
public ExternalCommandResult Execute(SelectionSet impliedSelection, ref string errorMessage, ref IList <ObjectId> elementSet) { var s = new SectionInfosPlayer(); return(AddinManagerDebuger.DebugInAddinManager(s.AllSectionsInfo, impliedSelection, ref errorMessage, ref elementSet)); }
public ExternalCommandResult Execute(SelectionSet impliedSelection, ref string errorMessage, ref IList <ObjectId> elementSet) { var s = new InfosGetter_HighFill(); return(AddinManagerDebuger.DebugInAddinManager(s.HighFillDeepCut, impliedSelection, ref errorMessage, ref elementSet)); }
public ExternalCommandResult Execute(SelectionSet impliedSelection, ref string errorMessage, ref IList <ObjectId> elementSet) { var s = new DBTextsToMText(); return(AddinManagerDebuger.DebugInAddinManager(s.ConvertDBTextsToMText, impliedSelection, ref errorMessage, ref elementSet)); }
public ExternalCommandResult Execute(SelectionSet impliedSelection, ref string errorMessage, ref IList <ObjectId> elementSet) { var tdg = new TableDataGetter(); return(AddinManagerDebuger.DebugInAddinManager(tdg.GetVectorFromText, impliedSelection, ref errorMessage, ref elementSet)); }
private void button_ContentRowHeight_Click(object sender, RibbonControlEventArgs e) { Application app = Globals.ThisAddIn.Application; // var ps = new PrintingFormat.RowHeightSetter(); AddinManagerDebuger.ExecuteInRibbon(ps.SetContentRowHeight , app, ref _errorMessage, ref _errorRange); }
/// <summary> 将工程数量表的工作簿中的多个工程数量表拆分为单独的工作簿 </summary> private void btn_SepFiles_Click(object sender, RibbonControlEventArgs e) { Application app = Globals.ThisAddIn.Application; // var sf = new SepFilesHandler(); AddinManagerDebuger.ExecuteInRibbon(sf.SepFiles , app, ref _errorMessage, ref _errorRange); }
/// <summary> 提取C++文档信息 </summary> private void btn_ExtractCppDoc_Click(object sender, RibbonControlEventArgs e) { Application app = Globals.ThisAddIn.Application; // var ps = new CppDoc.CppDocExtracter(); AddinManagerDebuger.ExecuteInRibbon(ps.ExtractCppDoc , app, ref _errorMessage, ref _errorRange); }
private void btn_UnLockSheet_Click(object sender, RibbonControlEventArgs e) { Application app = Globals.ThisAddIn.Application; var operateOnAllSheet = GetBool(EditBox_p3.Text); app.ScreenUpdating = false; // var sf = new SheetLocker() { OperateOnAllSheets = operateOnAllSheet }; AddinManagerDebuger.ExecuteInRibbon(sf.UnLockSheet , app, ref _errorMessage, ref _errorRange); }
// 开始具体的调试操作 private ExternalCmdResult CreateViewport(DocumentModifier docMdf, SelectionSet impliedSelection) { _docMdf = docMdf; //// var vp1 = AddinManagerDebuger.PickObject<Entity>(docMdf.acEditor); //var hd = Utils.ConvertToHandle("AA07"); //var vp2 = hd.GetObjectId(docMdf.acDataBase).GetObject(OpenMode.ForRead) as Viewport; //vp2.UpgradeOpen(); //var lot = LayoutManager.Current.GetLayoutId("NewLayout4011").GetObject(OpenMode.ForRead) as Layout; //vp2.RotateViewport(_docMdf, lot, new Point2d(0, 0), 30.0 / 180 * Math.PI); //return ExternalCmdResult.Commit; // 从模型空间中获取视口裁剪框 var pl_Model = AddinManagerDebuger.PickObject <Curve>(docMdf.acEditor); Point3d bottomLeftPt = default(Point3d); Point3d bottomRightPt = default(Point3d); double bottomLength = 0; var succ = GraphicalElementsSelector.GetPoint(docMdf.acEditor, "选择图纸的左下角点", out bottomLeftPt); if (!succ) { return(ExternalCmdResult.Cancel); } succ = GraphicalElementsSelector.GetPoint(docMdf.acEditor, "选择图纸的右下角点", out bottomRightPt); if (!succ) { return(ExternalCmdResult.Cancel); } succ = GraphicalElementsSelector.GetDouble(docMdf.acEditor, "图纸宽度(布局空间的单位)", out bottomLength, defaultValue: 420, allowNegative: false); if (!succ) { return(ExternalCmdResult.Cancel); } var modelUcs = docMdf.acEditor.GetCurrentView().Ucs; // 打开布局 var lm = LayoutManager.Current; Layout layout; ObjectId layoutId; Form_LayoutLister f = new Form_LayoutLister(docMdf); f.ShowDialog(); if (f.CreateNewLayout) { var layoutName = "NewLayout" + DateTime.Now.Minute + DateTime.Now.Second; layoutId = lm.GetLayoutId(layoutName); if (!layoutId.IsValid) { // 重启事务 docMdf.RestartTransaction(commitCancel: false); // layoutId = LayoutUtil.CreateLayout(layoutName); layout = layoutId.GetObject(OpenMode.ForRead) as Layout; // LayoutUtil.SetPlotSettings(layout, "A3", "monochrome.ctb", "交通院道路室 121"); } else { layout = LayoutManager.Current.GetLayoutId(name: layoutName).GetObject(OpenMode.ForRead) as Layout; } } else if (f.Layout != null) { layout = f.Layout; } else { return(ExternalCmdResult.Cancel); } // 创建视口 lm.SetCurrentLayoutId(layout.Id); CreateViewport(docMdf, modelUcs, layout, pl_Model, bottomLeftPt, bottomRightPt, bottomLength); // LayoutUtil.SwitchLayout(); return(ExternalCmdResult.Commit); }
/// <summary> <seealso cref="CommandDescription"/> </summary> public ExternalCmdResult EditEntityAnnotation(DocumentModifier docMdf, SelectionSet impliedSelection) { _docMdf = docMdf; // var ent = AddinManagerDebuger.PickObject <Entity>(docMdf.acEditor, "查看任意一个元素的注释"); if (ent == null) { return(ExternalCmdResult.Cancel); } // AnnotationEntity.SetAppName(docMdf); var annoEnt = new AnnotationEntity(ent); var annots = annoEnt.ExtractAnnotsFromXdata(); // annoEnt.WriteAnnotationsOnEditor(docMdf); // 如果只有一行注释信息,则直接在Editor中编辑即可 if (annots.Count <= 1) { bool clearAnnot = false; bool editInForm = false; bool setNewValue = false; string newAnno = null; var succ = GetAnnotationsKey(docMdf.acEditor, out clearAnnot, out editInForm, out setNewValue, out newAnno); if (!succ) { return(ExternalCmdResult.Cancel); } // if (clearAnnot) { annoEnt.ClearAnnotations(); } else if (editInForm) { } else if (setNewValue) { newAnno = annots.Count == 0 ? "" : annots[0]; succ = GetAnnotations(docMdf.acEditor, ref newAnno); if (!succ) { return(ExternalCmdResult.Cancel); } annoEnt.SetAnnotsToXdata(newAnno); } else { // 输入的为一般性的字符 // 如果为空,则保持原属性不变 if (!string.IsNullOrEmpty(newAnno)) { annoEnt.SetAnnotsToXdata(newAnno); } } // 新的属性值 annoEnt.WriteAnnotationsOnEditor(docMdf); } else { // 要创建出一个窗口以进行编辑 } // return(ExternalCmdResult.Commit); }