高级会员
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
|
【转帖】from oddbstub to layer number
from oddbstub* to layer number
from oddbstub* to layer number
ok, i must be missing something stupid, but how does one convert from oddbstub*layer to an actual layer number?
oddbstub is internal dd structure and it is not defined in public headers. probably you mean oddbobjectid?
having layer id you can get pointer to oddblayer:
code:
oddbobjectid idlayer = ...;
oddblayerptr player = idlayer.openobject();
sergey slezkin
ok, i will explain better:
i am trying to use the odgisubentitytraitsdata class. i can access color and line weight with no problem, but layer() returns a oddbstub*. i don't know what to do with that. am i trying to use effectivetraits wrong?
you can assign the oddbstub* result to a oddbobjectid and then you can open the layer:
oddbstub* pstub = traits.layer();
oddbobjectid idlayer(pstub);
oddblayertablerecordptr player = idlayer.safeopenobject(...);
...
or shorter:
oddblayertablerecordptr player = oddbobjectid(traits.layer()).safeopenobject();
hope this helps
best regards
chudomir
thanks, that worked perfectly.
scott
|