查看单个帖子
旧 2009-05-05, 10:24 AM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】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
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)