![]() |
【转帖】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 |
所有的时间均为北京时间。 现在的时间是 04:15 PM. |