- 积分
- 5966
- 明经币
- 个
- 注册时间
- 2003-1-7
- 在线时间
- 小时
- 威望
-
- 金钱
- 个
- 贡献
-
- 激情
-
|
发表于 2004-8-12 09:47:00
|
显示全部楼层
把你的代码贴上来看看。
另外,可以参考下面的代码(来自帮助文件中的例子):
AcDbObjectId transId; AcDbDatabase* pDb; char *fname; struct resbuf *rb;
// Get a dwg file from the user. // rb = acutNewRb(RTSTR); int stat = acedGetFileD("Pick a drawing", NULL, "dwg", 0, rb); if ((stat != RTNORM) || (rb == NULL)) { acutPrintf("\nYou must pick a drawing file."); return; }
// Allocates a region of memory large enough to hold an object whose // size is returned by acad_msize(). fname = (char*)acad_malloc(strlen(rb->resval.rstring) + 1); strcpy(fname, rb->resval.rstring); acutRelRb(rb); // Open the dwg file. // pDb = new AcDbDatabase(Adesk::kFalse); if (pDb->readDwgFile(fname) != Acad::eOk) { acutPrintf("\nSorry, that draing is probably already open."); return; } |
|