几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量  


返回   几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量 » 仿射空间:CAX软件开发(三)二次开发与程序设计 » CAD二次开发 » AutoCAD二次开发 » DirectDWG
用户名
密码
注册 帮助 会员 日历 银行 搜索 今日新帖 标记论坛为已读


 
 
主题工具 搜索本主题 显示模式
旧 2009-05-05, 10:31 AM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】exporting dwg layouts to dwf problem

exporting dwg layouts to dwf problem
exporting dwg layouts to dwf problem
after exporting dwg layouts to dwf, same entities appear in each
dwf layout, although in the dwg file the layout contents are different.
tried using the publish feature in the odamfcapp but it gave the same result.
with dwgdirect c++ 1.13, used the following code:
params.format = dw_ascii;
params.version = ndwf_v60;
oddbobjectid ldictid = this->getlayoutdictionaryid();
oddbdictionaryptr pdic = ldictid.safeopenobject(oddb::kforwrite);
dwfpagedata pagedata;
int nnumentries = pdic->numentries();
if (nnumentries > 0)
{
// get a dictionary iterator.
oddbdictionaryiteratorptr piter = pdic->newiterator();
for (; !piter->done(); piter->next())
{
dwfpagedata pagedata;
odstring slayoutname = piter->name();
pagedata.slayout = slayoutname;
params.arpagedata.append(pagedata);
}
}
you can look at the code in publishfiledlg.cpp and odamfcappdoc from odamfcapp sample where publish call was implemented.
misha kuzinets
quote:
originally posted by misha kuzinets
you can look at the code in publishfiledlg.cpp and odamfcappdoc from odamfcapp sample where publish call was implemented.
i have the same problem with odamfcapp publish feature. same entities exported in each layout in dwf.
located the code the publishfiledlg.cpp:
void cpublishsheets:nok()
{
updatedata(); // true - data is being retrieved
// process getting data
if (m_sfilename.find(".dwf") == -1)
{
m_sfilename += ".dwf";
}
m_pparams->sdwffilename = m_sfilename;
switch (m_radioformat)
{
case enbinary:
m_pparams->format = dw_uncompressed_binary;
m_pparams->version = ndwf_v60;
break;
case enascii:
m_pparams->format = dw_ascii;
m_pparams->version = ndwf_v60;
break;
default:
oda_assert(false);
}
//m_pparams->spassword = m_spassword;
// to add page stuff if there is...
for (uint i = 0; i < m_arpagedata.size(); i++)
{
dwfpagedata pagedata = m_arpagedata[i];
m_pparams->arpagedata.append(pagedata);
}
please, send a source and result (dwg & dwf) files.
misha kuzinets
attached dwf & dwg file.
attached files (57.6 kb, 5 views)

quote:
originally posted by marc
attached dwf & dwg file.
you are exporting lines layout every time. you can use odamfcappdll for publishing and look at a correct result.
misha kuzinets
the attached dwf file was created using odamfcapp (dwg direct 1.13),
using the default publish options. therefore there may a bug in the odamfcapp?
i tried with odamfcappdll and i get the following error message:
"unexpected error is happened during exportdwf."
the file published correctly for you?
don't know why it's not working here. any other other suggestions are welcome.
i guess you know dwf 6.0 file is a package. i've found out that in your dwf file every layout references to the same geometry file. 'descriptor.xml' for every layout keeps the same ' title="marcus~1.w2d" ' property. it is a fault. every new temporary geometry file erases previous one. the name should be unique in package. i think the problem is in unique name generation.
what environment do you use? under _win32 the functions as gettemppath() and gettempfilename() are used for unique filename creation.
misha kuzinets
i am running the the odamfcapp under windows 2000 professional.
thanks that has given a few clues. i'll see if i can debug the dwf export source.

there is a problem with the dwf layout export in windows 2000.
only the current layout is exported to dwf when there is "." in the temp file name path.
i checked the temp file name on my computer and it was set to:
c:\documents and settings\marc.office\temp\
the dd_dwfexport.lib returns the wrong filename from this path.
see dwfexportimpl.cpp
function: gettempfile
line: sfilename = stmpfilename.left( stmpfilename.find('.') );
as a work around i changed the temp & tmp environment variables on my computer from:
%userprofile%\local settings\temp
%userprofile%\local settings\tmp
to
c:\tmp\
c:\temp\
after the change i could publish all layouts to a single dwf file.
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)
 


主题工具 搜索本主题
搜索本主题:

高级搜索
显示模式

发帖规则
不可以发表新主题
不可以回复主题
不可以上传附件
不可以编辑您的帖子

vB 代码开启
[IMG]代码开启
HTML代码关闭

相似的主题
主题 主题发起者 论坛 回复 最后发表
【转帖】export to dwf v6.0 not working in oddwfexportex - dd rel 2.2 yang686526 DirectDWG 0 2009-05-05 10:27 AM
【转帖】dwf printing problems yang686526 DirectDWG 0 2009-05-05 07:51 AM
【转帖】dwf file import contains extra layouts yang686526 DirectDWG 0 2009-05-04 08:22 PM
【转帖】dwf export problem yang686526 DirectDWG 0 2009-05-04 08:19 PM
【转帖】converting attached dwg to dwf fails yang686526 DirectDWG 0 2009-05-04 06:14 PM


所有的时间均为北京时间。 现在的时间是 05:59 PM.


于2004年创办,几何尺寸与公差论坛"致力于产品几何量公差标准GD&T | GPS研究/CAD设计/CAM加工/CMM测量"。免责声明:论坛严禁发布色情反动言论及有关违反国家法律法规内容!情节严重者提供其IP,并配合相关部门进行严厉查处,若內容有涉及侵权,请立即联系我们QQ:44671734。注:此论坛须管理员验证方可发帖。
沪ICP备06057009号-2
更多