查看单个帖子
旧 2009-04-18, 06:16 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】用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);
}
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)