查看单个帖子
旧 2009-05-06, 07:51 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】oddbleader question

oddbleader question
oddbleader question
hi,
i'm trying to get de spline from a oddbleader with the getspline but when i try to do anything with the oddbsplineptr that i get from that method i get an memory error "traiying to read or write into a restricted memory segment".
this is code where i get the oddbsplineptr
oddbsplineptr pspline;
pleader->getspline(&pspline);
is there something wrong with it??
how can i get the oddbsplineptr from that oddbleader then ?
checking pointer returned from a function for null might be useful before trying to do anything with it.
oddbcurve functions are implemented via oddbcurvepe protocol extension. if the protocol extension is not registered oddbcurve functions return null or enotimplemented.
examples/odcurvefunctions folder contains sample implementation of this protocol extension for a few entities. but it contains no implementation for oddbleader.
sergey slezkin

thanks, sergey you are right the pointer was null.
how do i register the protocol extencion for the oddbcurve functions?
last edited by germanhl36; 19th december 2007 at 07:39 amfff">.
our samle implementation of oddbcurvepe contains implementation for a couple of entities only.
it's a drx module which being loaded adds protocol extension oddbcurvepe to a couple of classes like oddbline and oddbarc.
the module loading:
code:
:drxdynamiclinker()->loadapp(dd_t("odcurvefunctions"));for dll version this requires corresponding .drx file in your application folder.
for using modules in statically linked applications see developers guide/working with applications/creating custom applications.
sergey slezkin
another question
hello,
i have got another question about an oddbleader entity.
i have a .dwg file (new_drawing.dwg - see attachment) that contains oddbleader entity (there are two line segments, and mtext).
i'm trying to extract a geometry from oddbleader entity. i use oddbentity::worlddraw() function.
i derive a new class from odgiworldgeometry and overload all virtual function (stub).
but i have got only two segments of polyline.
library does two call polyline() function ( polyline( odint32 nbpoints, const odgepoint3d * pvertexlist,const odgevector3d * pnormal, odint32 lbasesubentmarker ) ).
why i haven't got text. could you tell me what i do wrong?
i'm using dwgdirext 2.4.1 and vc6.0.
andrey
attached files (51.3 kb, 5 views)

mtext is a separate entity.
sslezkin, thank you for your attention.
it is strange for me.
when i dump the contents of the database, i won't go through mtext entity too.
maby i made a mistake.
best regards,
bye
where are many methods to determine if where is mtext entity or not in it:
- odamfcapp (in tree control expand the model space)
- odreadex
- arxdebug in autocad
- saving file to dxf in autocad
- opening the file in autocad and clicking the text
all of them show 2 entities in model space: leader and mtext.
i'm not sure how you dump the database :-)
thank you.
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)