几何尺寸与公差论坛------致力于产品几何量公差标准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)
-   -   【转帖】oddbmtextsetverticalmode is throwing exception enotapplica (http://www.dimcax.com/hust/showthread.php?t=17565)

yang686526 2009-05-06 07:56 PM

【转帖】oddbmtextsetverticalmode is throwing exception enotapplica
 
oddbmtext::setverticalmode is throwing exception enotapplica
oddbmtext::setverticalmode is throwing exception enotapplicable
hi all!
i am receiving an exception from setverticalmode in the following code
cautocaddrawing* pdraw = cautocaddrawing::getinstance();
oddbdatabaseptr pdb = pdraw->getdatabaseinstance();
oddbblocktablerecordptr pblock = pdraw->getcurrentblockid().safeopenobject(oddb::kforwrit e);
oddbobjectid layerid = pdraw->getcurrentlayerid();
pmtext = oddbmtext::createobject();
id = pblock->appendoddbentity(pmtext);
//setting attributes for mtextline
pmtext->setlayer(layerid);
pmtext->setlocation((*iter).m_position);
pmtext->sethorizontalmode(oddb::ktextleft);
pmtext->setverticalmode(oddb::ktextbase);
if i remove setverticalmode the code working fine. but i want to set verticalmode property. do you have any idea why it is throwing exception.
is setting attributes order incorrect.
one more question
i am converting multiple oddbtext elements to one oddbmtext element.
is there any functions in oddbmtext which is equivalent to oddbtext mirrorinx,mirroriny
thanks
help me !
baseline vertical mode can be applied only to single line text (oddbtext). the documentation contains mistake. thank you for pointing this out.
you can use oddbmtext::setattachement() which sets both horizontal and vertical modes.
instead of oddbtext::mirrowinx/y you can try to use oddbmtext::setnormal() and setdirection()
sergey slezkin
same thing happens to me...
sounds like a bug.
------
edited...
thanks to sergey for the explanation.
--------
last edited by pete rimkus; 18th october 2006 at 01:34 pmfff">.
hi sergey!
thanks a lot!
hi sergey!
i have a doubt on above questions.
i don't know how to convert mirrorinx and mirroriny to vectors.
i have two bool variables which denote mirrorinx and mirroriny.
how to find equivalent vectors which can be applied to setnormal and setdirection.
i think in mirroriny effect is acheived by setting(0,0,-1) as normal.
please give your comments.
thanks
ashwin
hi!
i am actually converting dbtext elements to dbmtext elements.
i have mirrorinx and mirroriny properties in dbtext. how to get equivalent
settings for dbmtext
thanks
ashwin
see example attached.
attached files (9.9 kb, 3 views)

sergey slezkin


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