几何尺寸与公差论坛------致力于产品几何量公差标准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)
-   -   【转帖】how to set dwgcodepage in new toolki (http://www.dimcax.com/hust/showthread.php?t=16774)

yang686526 2009-05-06 03:15 PM

【转帖】how to set dwgcodepage in new toolki
 
how to set dwgcodepage in new toolkit?
how to set dwgcodepage in new toolkit?
in the old toolkit i set the drawing codepage by setting the header variabel of the dwg file:
ad_dwghdr
*phdr;
:
phdr->dwgcodepage=mycodepage;
in the new toolkit i find:
ro_var_def(odcodepageid, dwgcodepage, (cp_ansi_1252), (cp_ansi_1252), (), (oda::kvalidate_none))
ro_ sounds like "read only" too me, but documentiation on such details is difficult to find.
can i replace the my old code with...
od_db_databaseptr pdb;
odcodepageid mycodepage;
pdb->setdwgcodepage(mycodepage);
...or does the ro_ indicate that it can only be read?
i see there is a odcodepageid oddbhostappservices::systemcodepage(), but i assume this is for telling what code page the running system is using? you can create new db's with codepages different from oddbhostappservices::systemcodepage()?
-rune jorgensen
www.dds.no
new drawings are created with codepage returned by oddbhostappservices::systemcodepage(). it's default implementation returns code page of system running on your computer. to create drawing with other code page you need to override this function.
sergey slezkin
for existing drawings: we frequently receive dwgs with wrong codepage setting. we fix that by changing the codepage and doing a regen. can we do that in the new toolkit by...
pdb->setdwgcodepage(mycodepage);
...and then regen the drawing?
-rune jorgensen
www.dds.no
dwgcodepage is read only variable. altering drawing's code page requires translating strings in database (symbol table record names, texts etc.)
sergey slezkin


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