几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量

几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量 (http://www.dimcax.com/hust/index.php)
-   DirectDWG (http://www.dimcax.com/hust/forumdisplay.php?f=89)
-   -   【转帖】iter 9method seek0 get error (http://www.dimcax.com/hust/showthread.php?t=16978)

yang686526 2009-05-06 04:27 PM

【转帖】iter 9method seek0 get error
 
iter (method seek) get error
iter (method seek) get error
hi,
how we find the linetypename from a spec. layer with seek-method ?
++++++++++++++++++++++++++++++
//iterate layertbl
...
//sep. c++block in func because equal variablename piter
{
oddblayertableptr plinetypes =
pdb->getlinetypetableid().safeopenobject();
oddbsymboltableiteratorptr piter = plinetypes->newiterator();
piter->seek(player->linetypeobjectid());
oddblayertablerecordptr plinetype =
piter->getrecordid().safeopenobject();
os << plinetype->getname() << ";";
}
....
++++++++++++++++++++++++++++++
we get follow message:
"unknown software exception" (0x80000003) at (0x01020ae23)
what is wrong ?
thanks fo help
ralph

hi,
probably you get exception because you are assigning linetype table pointer oddblayertableptr.
you need not use seek method you can open linetype table record directly having obtained its object id from layer.
oddblinetypetablerecordptr plinetype = player->linetypeobjectid().safeopenobject();
out << plinetype->getname();
[ august 23, 2002: message edited by: sergey slezkin ]</p>
sergey slezkin

hi sergey,
thanks for help, your was right ).
for other people here the right code sequend:
++++++++++++++++++++++++++++
oddblinetypetablerecordptr plinetype = player-&gt;linetypeobjectid().safeopenobject();
cout &lt;&lt; plinetype-&gt;getname().c_str();
++++++++++++++++++++++++++++
best regards to st.peterburg
ralph


所有的时间均为北京时间。 现在的时间是 07:48 AM.