以下是我的程序,可以执行成功改变线型为fenceline,但是需要在AutoCAD里手动将线型加载为fenceline,只有这样程序才能成功执行。请问如何通过程序实现自动加载线型为fenceline。我是用C#开发,最好用.net实现。 PromptSelectionOptions selectionOp = new PromptSelectionOptions(); PromptSelectionResult result = ed.GetSelection(selectionOp); if (result.Status == PromptStatus.OK) { SelectionSet set = result.Value; ObjectId[] ID = set.GetObjectIds(); foreach (ObjectId id in ID) { Entity ent = (Entity)trans.GetObject(id, OpenMode.ForWrite); ent.Linetype = "FENCELINE1"; ed.WriteMessage("操作成功!!"); } } trans.Commit(); 还请各位老大帮忙解决啊,呵呵 |