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

yang686526 2009-05-05 10:24 AM

【转帖】export dwf
 
export dwf
export dwf
i have a problem about exporting dwf:in odamfcapp, i use page setup to set the value of plot oject lineweight is false,set plotstyle is monochrome.ctb, and export dwf file. i view the dwf file in autodesk dwfview 6, and find it that the plotstyle is not apply in dwf, and polyline's lineweight display in orginal lineweight. why?
thanks.
plot style support is not implemented in dwf export.
to add it, you need to add following function to dwf export device
code:
void cpdfexportimpl::loadplotstyletable(odgicontextfordbdatabaseptr pctx,oddbdatabase* pdb)
{
oddblayoutptr playout;
oddbblocktablerecordptr playoutblock = pdb->getactivelayoutbtrid().safeopenobject();
playout = playoutblock->getlayoutid().safeopenobject();
bool bplotplotstyle = playout->plotplotstyles();
if (pctx->isplotgeneration() && bplotplotstyle)
{
odstring pssfile(playout->getcurrentstylesheet());
if(!pssfile.isempty())
{
odstring testpath = pdb->appservices()->findfile(pssfile);
if(!testpath.isempty())
{
odstreambufptr pfilebuf
= odsystemservices()->createfile(testpath);
if(pfilebuf.get())
{
pctx->loadplotstyletable(pfilebuf);
}
}
}
}
};
and call it in cdwfexportimpl::createdevice(), after oddbgsmanager::setuplayoutviews
vladimir


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