马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
问题:
Audit API - New in AutoCAD 2015
解答:
From AutoCAD 2015, you can programmatically audit the drawing file using the new Database API “Audit” . You can also try fixing the issues in the drawing file using API’s argument. This API is present in ObjectARX and .NET.
In ObjectARX – use Acad::ErrorStatus acedAudit(AcDbDatabase* , bool , bool ) API.
- [CommandMethod("AuditTest")]
- publicvoid AuditTest() // This method can have any name
- {
- Document doc = Application.DocumentManager.MdiActiveDocument;
- Editor ed = doc.Editor;
- try
- {
- //to fix the error or not
- bool bFixErrors = true;
- //to show the message in commandline or not
- bool becho = true;
- //call audit API
- doc.Database.Audit(bFixErrors, becho);
- }
- catch
- {
- ed.WriteMessage("Unable to audit the drawing\n");
- }
- }
|