1
如何選擇圖形中的所有對象?。使用AutoCad的.Net界面 - 如何進行選擇
Sometthing相關
AcadSelectionSet select = _acadCurrentDocument.SelectionSets.Add("my");
select.Select(AcSelect.acSelectionSetAll);
但不能讓它的工作。
如何選擇圖形中的所有對象?。使用AutoCad的.Net界面 - 如何進行選擇
Sometthing相關
AcadSelectionSet select = _acadCurrentDocument.SelectionSets.Add("my");
select.Select(AcSelect.acSelectionSetAll);
但不能讓它的工作。
在現實.NET AutoCAD的API(在過程中,不C#/ COM就像你爲例):
Document doc = Application.DocumentManager.MdiActiveDocument;
Database db = doc.Database;
Editor ed = doc.Editor;
PromptSelectionResult psr = ed.GetSelection();
if (psr.Status != PromptStatus.OK) return;
using (Transaction tr = db.TransactionManager.StartTransaction())
{
foreach (SelectedObject so in psr.Value)
{
var dbo = tr.GetObject(so.ObjectId, OpenMode.ForRead);
//...
}
tr.Commit();
}
如果你想要做的選擇在一個獨立的可執行文件,AutoCAD的COM互操作是當你試着去的路上。如果AutoCAD已打開或未打開,並且它是您喜歡的版本,則可能需要。
如果需要,您可能還需要激活AutoCAD窗口。