高级会员
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
|
【转帖】用objectarx时,先选择后执行有没有问题?
用objectarx时,先选择后执行有没有问题?
用objectarx时,先选择后执行有没有问题?
我是用vb的,对objectarx不了解。
在用vb时,如先选择实体后执行命令,常常会产生接口错误,
即时用vb获得autocad的pickfirst选择集时,产生错误。
不知道用objectarx时有没有这种问题?
应该没有这种问题
肯定没有的啦.
床,钱,明月,光;衣,失地,上,爽!
运行了以下的程序,没有发现问题。
看来,今后还是要用objectarx c++来开发autocad的应用程序。
static void test_pickfirst(void)
{
ads_name ssname, ent;
long nssmem, i;
struct resbuf *ebuf, *eb;
// get the current pickfirst set, if there is one;
// otherwise, ask the user for a general entity selection.
if (acedssget(null, null, null, null, ssname)!= rtnorm) {
return;
}
if (acedsslength(ssname, &nssmem) != rtnorm) {
return;
}
acutprintf(_t("\n %ld\n"),nssmem);
for (i=0; i<nssmem; i++){
if (acedssname(ssname, i, ent) != rtnorm){
acdbfail(_t("\nfail\n"));
return;
}
ebuf = acdbentget(ent);
for (eb = ebuf; eb != null; eb = eb->rbnext) {
printdxf(eb); //1. to print the dxf code of the entity(defined in other file.cpp)
}
acutrelrb(ebuf);
}
acedssfree(ssname);
}
|