![]() |
【转帖】how to get the system variable dimtxsty
how to get the system variable "dimtxsty"
how to get the system variable "dimtxsty" i want to set the dimtxsty value using "setdimtxsty",but there is nothing to display in the property dialog, so,how can i succeed to set the value? there is the progress concering the problem: thanks very much. peter " void setdimtextwidthfactor( oddbobjectid& objid, oddbdatabaseptr pdb ) { oddbdimensionptr pdim = objid.safeopenobject( oddb::kforwrite ); oddbobjectid olddimtextstylerecid = pdim->dimtxsty(); oddbobjectid newdimtextstylerecid; oddbtextstyletablerecordptr ptextstyletblrcd; oddbtextstyletablerecordptr pnewtextstyletblrcd; if ( oddbobjectid::knull != olddimtextstylerecid ) { oddbtextstyletablerecordptr pcurrdimtxtstyle = olddimtextstylerecid.safeopenobject(oddb::kforread ); odstring strtemp; strtemp = pcurrdimtxtstyle->getname(); ptextstyletblrcd = olddimtextstylerecid.safeopenobject( oddb::kforwrite ); oddbtextstyletableptr ptextstyletbl = pdb->gettextstyletableid().safeopenobject( oddb::kforwrite ); if ( ptextstyletbl->has(odstring("dimtextstyle")) ) { pnewtextstyletblrcd = ptextstyletbl->getat(odstring("dimtextstyle"), oddb::kforwrite); pnewtextstyletblrcd->setxscale( g_textwidthratio ); newdimtextstylerecid = pnewtextstyletblrcd->objectid(); } else { pnewtextstyletblrcd = oddbtextstyletablerecord::createobject(); //get the "standard" text style olddimtextstylerecid = ptextstyletbl->getat( "standard" ); ptextstyletblrcd = olddimtextstylerecid.safeopenobject( oddb::kforwrite ); //clone textstyle's properties to new style ( char* ptypeface=null; bool bold; bool italic; int charset; int pitchandfamily; odstring pfilename = ""; odstring bigfontfilename = ""; bool bisupsidedown = false; bool bisbackwards = false; bool bisvertial = false; bool isshapfile; bool isvertical; double obliquingangle; double priorsize; double xscale; double textsize; ptextstyletblrcd->font( odstring(ptypeface), bold, italic, charset, pitchandfamily ); bisupsidedown = ptextstyletblrcd->isupsidedown(); bisbackwards = ptextstyletblrcd->isbackwards(); bisvertial = ptextstyletblrcd->isvertical(); isshapfile = ptextstyletblrcd->isshapefile(); isvertical = ptextstyletblrcd->isvertical(); obliquingangle = ptextstyletblrcd->obliquingangle(); priorsize = ptextstyletblrcd->priorsize(); xscale = ptextstyletblrcd->xscale(); textsize = ptextstyletblrcd->textsize(); pnewtextstyletblrcd->setname( "dimtextstyle" ); pnewtextstyletblrcd->settextsize( textsize ); pnewtextstyletblrcd->setfont( ptypeface, bold, italic, charset, pitchandfamily ); pnewtextstyletblrcd->setfilename( pfilename ); pnewtextstyletblrcd->setbigfontfilename( bigfontfilename ); pnewtextstyletblrcd->setisupsidedown( bisupsidedown ); pnewtextstyletblrcd->setisbackwards( bisbackwards ); pnewtextstyletblrcd->setisvertical( bisvertial ); pnewtextstyletblrcd->setisshapefile( isshapfile ); pnewtextstyletblrcd->setisvertical( isvertical ); pnewtextstyletblrcd->setobliquingangle( obliquingangle ); pnewtextstyletblrcd->setpriorsize( priorsize ); pnewtextstyletblrcd->setxscale( g_textwidthratio ); newdimtextstylerecid = ptextstyletbl->add( pnewtextstyletblrcd ); } } pdim->setdimtxsty( newdimtextstylerecid ); " if the question is "what to display for dimtxsty object id on the screen?" you can dispay text style name. sergey slezkin |
所有的时间均为北京时间。 现在的时间是 05:17 AM. |