高级会员
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
|
【转帖】get vertices from an entity
get vertices from an entity
get vertices from an entity
hi sergey
thanks for your answer. but my problem is i don't know how to cast or how to get an oddbline from oddbentityptr. if there is any idea please let me know it.
thanks a lot
a.gaamouz
oddbentityptr pent = .... ;
oddblineptr pline = oddbline::cast(pent);
if (pline.isnull()
{ // it was not oddbline or pent was null
}
else
{ // it is realy oddbline
odgepoint3d pstart = pline->startpoint();
...
}
if pobj is not null, you also can check object type like this:
if (pobj->iskindof(oddbline:: desc()))
{
// it's oddbline or its inheritor
}
or
oddbline * pline = (oddbline*)pobj->queryx(oddbline:: desc());
if (pline)
{
// it's oddbline or its inheritor
}
[ january 30, 2003: message edited by: sergey slezkin ]</p>
sergey slezkin
thanks sergey
i will try it and make you up to date.
a.gaamouz
hi sergey
thanks for your last answer sergey.. i will ask you to help me again... in fact i create a sample application using appwizard with the standard classes with document/view architecture support. i include all the necessay header files in my view class, and then add a method that read a dwg file. rigth now evrything is ok ..i read the file without problems. but the sample crash when i tried to create a new document. could you please tell where i failed.
thanks in advance sergey.
a. gaamouz
hi,
to say what is the reason it's necessary to know what kind of crash, in what function etc.
maybe dwgdirect is not initialized, maybe database is created without default objects ...
btw, odamfcapp is a sample mfc application which reads/writes files and creates new database too.
try to look at it.
sergey slezkin
|