编组问题,请高手指点
www.dimcax.com
编组问题,请高手指点
请问如何通过一个实体的id得到该实体所在组词典的id号先
怎么没有人跟啊?斑竹也不知道吗? 在细说一遍:比如在数据库database中的词典中的n个group中有“*a1”的组,组中有abcd等n个元素;我现在知道a元素的id,但不知道是哪个组的,用什么方法可以找到“*a1”的id号呢?????
学如逆水行舟,不进则退!
建议!
感觉你说的很复杂~所以只能根据我的理解提一下建议. 如果是使用字典的话,那么在图元的扩展数据中附加字典名和组名就可以解决了~ 获取图元时同时获取它的扩展数据,根据扩展数据得到字典名和组名~ 还不知道有直接的去获取上一级扩展记录的办法~也希望有高人能指点一二.
impossible is nothing
一个实体应该可以同时属于多个组
如题
遍历组字典,找哪个组含有这个实体的objectid
c++代码: int getobjgroup(acdbobjectid id,acdbobjectidarray &gids) { int n=0; acad::errorstatus retstat; acdbentity *pent; if ((retstat = acdbopenacdbentity(pent, id, acdb::kforread))!= acad::eok) { ads_printf(_t("\nfailure for openacdbobject: retstat==%d\n"),retstat); return rtnorm; } acdbvoidptrarray *preactors; void *psomething; acdbobjectid persobjid; preactors = pent->reactors(); pent->close(); if (preactors != null) { for (int i = 0; i < preactors->length(); i++) { psomething = preactors->at(i); if (acdbispersistentreactor(psomething)) { persobjid = acdbpersistentreactorobjectid(psomething); gids.append(persobjid); n++; } } } return n; }
非常棒,谢谢!
学如逆水行舟,不进则退!