public void CMD_PosLength() { if (!CheckLicense.Check()) { return; } PromptSelectionResult selresult = DWGUtility.SelectAllPosUser(); if (selresult.Status != PromptStatus.OK) { return; } PromptKeywordOptions opts = new PromptKeywordOptions("L boyunu [Göster/giZle]: ", "Show Hide"); opts.AllowNone = false; PromptResult result = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor.GetKeywords(opts); if (result.Status == PromptStatus.OK) { switch (result.StringResult) { case "Show": ShowPosLength(selresult.Value.GetObjectIds(), true); break; case "Hide": ShowPosLength(selresult.Value.GetObjectIds(), false); break; } } }
public void CMD_IncludePos() { if (!CheckLicense.Check()) { return; } PromptSelectionResult selresult = DWGUtility.SelectAllPosUser(); if (selresult.Status != PromptStatus.OK) { return; } PromptKeywordOptions opts = new PromptKeywordOptions("Metraja [Dahil et/metrajdan Cikar]: ", "Add Remove"); opts.AllowNone = false; PromptResult result = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor.GetKeywords(opts); if (result.Status == PromptStatus.OK) { switch (result.StringResult) { case "Add": IcludePosinBOQ(selresult.Value.GetObjectIds(), true); break; case "Remove": IcludePosinBOQ(selresult.Value.GetObjectIds(), false); break; } } }
public void CMD_BOQEdit() { if (!CheckLicense.Check()) { return; } Autodesk.AutoCAD.EditorInput.Editor ed = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor; // Edit entity if there is a pickset PromptSelectionResult selectionRes = ed.SelectImplied(); if (selectionRes.Status != PromptStatus.Error && selectionRes.Value.Count > 0) { ObjectId id = selectionRes.Value[0].ObjectId; ed.SetImpliedSelection(new ObjectId[0]); ItemEdit(id, MonitoredPoint); return; } PromptEntityOptions opts = new PromptEntityOptions("Select entity: "); opts.AllowNone = false; PromptEntityResult result = ed.GetEntity(opts); if (result.Status == PromptStatus.OK) { ItemEdit(result.ObjectId, result.PickedPoint); } }
public void CMD_TableStyle() { if (!CheckLicense.Check()) { return; } TableStyles(); }
public void CMD_DrawBOQ() { if (!CheckLicense.Check()) { return; } DrawBOQ(); }
public void CMD_PosUpgrade() { if (!CheckLicense.Check()) { return; } PosUpgrade(); }
public void CMD_FindReplace() { if (!CheckLicense.Check()) { return; } FindReplace(true); }
public void CMD_PosShapes() { if (!CheckLicense.Check()) { return; } PosShapes(); }
public void CMD_CopyPosDetail() { if (!CheckLicense.Check()) { return; } CopyPosDetail(); }
public void CMD_CopyPosNumber() { if (!CheckLicense.Check()) { return; } CopyPosNumber(); }
public void CMD_EmptyBalloons() { if (!CheckLicense.Check()) { return; } EmptyBalloons(); }
public void CMD_NumberPos() { if (!CheckLicense.Check()) { return; } NumberPos(); }
public void CMD_NewPos() { if (!CheckLicense.Check()) { return; } NewPos(); }
public void CMD_PosGroups() { if (!CheckLicense.Check()) { return; } PosGroups(); }
public void CMD_PosExplode() { if (!CheckLicense.Check()) { return; } PosExplode(); }
public void CMD_HideShapes() { if (!CheckLicense.Check()) { return; } ShowShapes = false; DWGUtility.RefreshAllPos(); }
public void CMD_ToggleShapes() { if (!CheckLicense.Check()) { return; } ShowShapes = !ShowShapes; DWGUtility.RefreshAllPos(); }
public void CMD_LastPosNumber() { if (!CheckLicense.Check()) { return; } PromptSelectionResult sel = DWGUtility.SelectAllPosUser(); if (sel.Status != PromptStatus.OK) { return; } ObjectId[] items = sel.Value.GetObjectIds(); int lastNum = GetLastPosNumber(items); if (lastNum != -1) { MessageBox.Show("Son poz numarası: " + lastNum.ToString(), "RebarPos", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
public void CMD_Pos() { if (!CheckLicense.Check()) { return; } Autodesk.AutoCAD.EditorInput.Editor ed = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor; // Edit entity if there is a pickset PromptSelectionResult selectionRes = ed.SelectImplied(); if (selectionRes.Status != PromptStatus.Error && selectionRes.Value.Count > 0) { ObjectId id = selectionRes.Value[0].ObjectId; ed.SetImpliedSelection(new ObjectId[0]); ItemEdit(id, MonitoredPoint); return; } bool cont = true; while (cont) { PromptEntityOptions opts = new PromptEntityOptions("Poz secin veya [Yeni/Numaralandir/Kopyala/kOntrol/Metraj/bul Degistir/numara Sil/Acilimlar/Tablo stili/ayaRlar]: ", "New Numbering Copy Check BOQ Find Empty Shapes Table Preferences"); opts.AllowNone = false; PromptEntityResult result = ed.GetEntity(opts); if (result.Status == PromptStatus.Keyword) { switch (result.StringResult) { case "New": NewPos(); break; case "Numbering": NumberPos(); break; case "Empty": EmptyBalloons(); break; case "Copy": CopyPos(); break; case "Check": PosCheck(); break; case "BOQ": DrawBOQ(); break; case "Find": FindReplace(false); break; case "Shapes": PosShapes(); break; case "Table": TableStyles(); break; case "Preferences": PosGroups(); break; } cont = false; } else if (result.Status == PromptStatus.OK) { ItemEdit(result.ObjectId, result.PickedPoint); cont = true; } else { cont = false; } } }