AutoCAD mechanical 明细表读取
AutoCAD mechanical 明细表 请教论坛伙伴们有没有用c#.net 方式读取明细表的经验。手册上查到了vba的方式, 对应的dll在com里有,但是如果使用.net的话转类型遇到了困难, 请教下高手。SelectionSet sSet = acSSPrompt.Value;
ObjectId[] Ids = sSet.GetObjectIds();
for (int i = 0; i < Ids.Length; i++)
{
//Entity ent = Ids.GetObject(OpenMode.ForWrite) as Entity;
var mybom = new Object();
mybom = Ids.GetObject(OpenMode.ForWrite);
string bomName = string.Empty;
var BOM = new McadBOM();
//BOM = bommgr.GetBOMTable(mybom, out bomName) as McadBOM;
foreach (McadBOMItem bomItem in BOM.Items)
{
editor.WriteMessage(bomItem.Data);
}
}
这个选择集里的对象就是一个明细表,但是转换完后对象就是dll了
查到一个例子了,贴出来希望对大家有帮助
https://forums.autodesk.com/t5/net/autocad-mechanical-automatic-parts-list-extraction-c/m-p/6521686#M49916
页:
[1]