- 积分
- 1423
- 明经币
- 个
- 注册时间
- 2003-8-7
- 在线时间
- 小时
- 威望
-
- 金钱
- 个
- 贡献
-
- 激情
-
|
lilin,网上邮箱打不开!(arx2000)
通过检索“printdxf”得到一份帮助代码,但我在调试时报错:
An ObjectARX application could retrieve and print the definition data for an entity by using the following two functions. (The printdxf() function does not handle extended data.)
void getlast()
{
struct resbuf *ebuf, *eb;
ads_name ent1;
acdbEntLast(ent1);
ebuf = acdbEntGet(ent1);
eb = ebuf;
acutPrintf("\nResults of entgetting last entity\n");
// Print items in the list.
for (eb = ebuf; eb != NULL; eb = eb->rbnext)
printdxf(eb); //printdxf此函数没有类型定义????报错一
// Release the acdbEntGet() list.
acutRelRb(ebuf);
}
int printdxf(eb)
struct resbuf *eb; //这句就更不清楚是怎么回事了?又是int,又是struct
//而且一个指针*eb没有赋值
{
int rt;
if (eb == NULL)
return RTNONE;
if ((eb->restype >= 0) && (eb->restype <= 9))
rt = RTSTR ;
else if ((eb->restype >= 10) && (eb->restype <= 19))
rt = RT3DPOINT;
else if ((eb->restype >= 38) && (eb->restype <= 59))
rt = RTREAL ;
else if ((eb->restype >= 60) && (eb->restype <= 79))
rt = RTSHORT ;
else if ((eb->restype >= 210) && (eb->restype <= 239))
rt = RT3DPOINT ;
else if (eb->restype < 0)
// Entity name (or other sentinel)
rt = eb->restype;
else
rt = RTNONE;
switch (rt) {
case RTSHORT:
acutPrintf("(%d . %d)\n", eb->restype,
eb->resval.rint);
break;
case RTREAL:
acutPrintf("(%d . %0.3f)\n", eb->restype,
eb->resval.rreal);
break;
case RTSTR:
acutPrintf("(%d . \"%s\")\n", eb->restype,
eb->resval.rstring);
break;
case RT3DPOINT:
acutPrintf("(%d . %0.3f %0.3f %0.3f)\n",
eb->restype,
eb->resval.rpoint[X], eb->resval.rpoint[Y],
eb->resval.rpoint[Z]);
break;
case RTNONE:
acutPrintf("(%d . Unknown type)\n", eb->restype);
break;
case -1:
case -2:
// First block entity
acutPrintf("(%d . <Entity name: %8lx>)\n",
eb->restype, eb->resval.rlname[0]);
}
return eb->restype;
}
我傻了,能帮我解答一下吗?我想提取形位公差的数据信息,还有其他样例吗?
形位公差的restype =1 |
|