[ARX.NET]注册XData

public static ErrorStatus RegisterApp(Transaction trans, Database pDb, string pAppName)
        {
            RegAppTable appTbl = trans.GetObject(pDb.RegAppTableId, OpenMode.ForWrite) as RegAppTable;
            if (!appTbl.Has(pAppName))
            {
                Autodesk.AutoCAD.DatabaseServices.RegAppTableRecord appTblRcd = new Autodesk.AutoCAD.DatabaseServices.RegAppTableRecord();
                appTblRcd.Name = pAppName;
                appTbl.Add(appTblRcd);
                trans.AddNewlyCreatedDBObject(appTblRcd, true);
            }
            return ErrorStatus.OK;
        }

此条目发表在ObjectArx.Net分类目录。将固定链接加入收藏夹。

发表评论