![]() |
【转帖】explode问题
explode问题
explode问题 请问一下斑竹兄: 此前在此论坛里看到您给的一个关于炸开实体的例子,我基本上照做,但是却出现了如下问题:” 1、无法从“acdbvoidptrarray”转换为“acdbentity *” 没有可用于执行该转换的用户定义的转换运算符,或者无法调用该运算符 2、“appendentity”: 找不到标识符 代码如下: void creanent:stexplode() { ads_name ment,ent; ads_point pt1,pt2; if(acedssget(_t("w"),pt1,pt2,null,ment)==rtnorm) { acdbobjectid objid; acedssname(ment,0,ent);//ent为实体名称,ment问选择集名称。 if(acad::eok!=acdbgetobjectid(objid,ent)) { afxmessagebox(_t("不能获得实体id!")); acedssfree(ent); return; } acdbentity *pent; if(acad::eok!=acdbopenacdbentity(pent,objid,acdb::kforwrite)) { afxmessagebox(_t("打开实体失败!")); return; pent->close();//获得实体对象 } acdbvoidptrarray pexps; if (pent->explode(pexps) == acad::eok) { for (int i = 0; i < pexps.length(); i++) { acdbentity *pexpent = (acdbentity*)pexps; acutprintf(_t("\n分解后的对象类型名是: %s"), (pexpent->isa()->name())); appendentity(pexpent); } pent->erase(true); } else { afxmessagebox(_t("实体不能分解!")); pent->close(); return; } pent->close(); } } 不知何故,非常感谢 谢谢斑竹兄 |
所有的时间均为北京时间。 现在的时间是 04:07 AM. |