查看单个帖子
旧 2009-05-06, 02:46 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】how to get the objectid with the entityname

how to get the objectid with the entityname?
how to get the objectid with the entityname?
is there any function that similar to "acdbgetobjectid"?
but what is entityname (ads_name) in dd environment?
if you mean handle, where is oddbdatabase::getoddbobjectid()
and if you have pointer to object you can use oddbobject:bjectid()
sergey slezkin
thanks
i'm a freshman in opendwg, and i think it's different with objectarx.
there isn't entityname(ads_name) in the dd envirement, right?
in dwgdirect environment an entity (object) can be identified by:
- handle (which is unique in single database and is preserved while loading/saving database to file). different databases can have different objects with the same handle.
- object id. it's unique for all objects from all databases. exists at run-time only for database-resident objects. while saving to file object ids are converted to handles.
- pointer to object. can be used to call object's functions. can be obtained from object id by oddbobjectidenobject() function.
the pointer can point to both database-resident and non-database-resident objects.
sergey slezkin
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)