高级会员
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
|
【转帖】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
|