几何尺寸与公差论坛------致力于产品几何量公差标准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-06, 07:06 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】odamfcapppdfexport sample

odamfcapp:dfexport sample
odamfcapp:dfexport sample
hi,
i was trying to test sample for pdfexport. but whenever i unselect "zoom to extents mode", i get pdf error: error number 0x10008. what is expected behaviour when zoom to extents mode is switched off?
thx.
there are two mode in pdf export. first is zoom to extents. export will scale drawing by extents on paper and use user defined paper size. if you disable zoom to extents mode, export will try to get settings from layout (see page setup dialog in autocad). export output effect should be like print preview in autocad. but some times dwg\dxf doesn't containe valid plotsettings information in layout, pdf export return error in that case.
try to load your dxf\dwg to autocad, call page setup and select something - for example select window mode (for all layouts), save it. i hope, that export will work without errors.
zoom to extents is 'always work' mode. so it used by default.
error code 0x1 on pdf export
hi,
i am trying to export the attached file with pdfexport toolkit with "layout to export selected as all".
i am getting pdf error with error number : 0x1. this is reproducible in odamfcapp too.
what does error number : 0x1 refers to? and how can i avoid this error?
thx.
attached files (20.9 kb, 5 views)

hi
this is bug in the pdf export. the last layout is free and getgeomextents return box with height & width = 0. it is not valid for poverallview->setview operation. the sources of pdfexport are open, so you can fix it on your side. look at pdfexportimpl.cpp
cpdfexportimpl::drawzoomed2extents method. add next code to the end of method
code:
odgsviewptr poverallview;
poverallview = bmodel ? odgsmodellayouthelperptr(m_pdevice)->activeview()
: odgspaperlayouthelperptr(m_pdevice)->overallview();
if (odzero(fieldwidth)) // new code
fieldwidth = 1.;
if (odzero(fieldheight)) // new code
fieldheight = 1.;
poverallview->setview(viewtarget + viewdir, viewtarget, upv, fieldwidth, fieldheight, isperspective ? odgsview::kperspective : odgsview::kparallel);
odgsdcrect outputrect;
thanks for bug report.
that is very helpful. thanks alexander.
project file for pdfexport missing
hi alexander,
where is project file for pdfexport is located? is it missing?
thx.
project file for pdfexport
hi alexander,
i am running in another bug that creates empty pages in pdf when trying to export. it would be really helpful if i can get the project file for pdfexport. i looked again in the 1.*14.*02 release but couldn't find the project file.
thx.
hi,
please, look in projectfiles\win32\msvc6\exports\pdfdll\dd_pdfexpo rt_dll.dsp and projectfiles\win32\msvc6\examples\odamfcappdll\oda mfcappdll.dsp
thx.
i deleted vc6 directories since long ago and forgot about it. grabbed it back to convert to vc8.
thx again.
note: there is small bug in pdfexport. when all layouts are selected to export, the drawing's current active layout is changed by pdfexport to the last layout converted. i fixed it outside pdfexport to preserve the active layout but just in case if somebody is wondering.
hi
vc8 and vc2003 also has pdfexport project files.
thx for problem report. i think that transaction brackets will prevent any database changes...
code:
m_pdb->starttransaction();
oduint32 errcode = exportpdf(params);
m_pdb->aborttransaction(); // to prevent any database changes.
i have also include it inside exportpdf.
project file for pdfexport
hi alexander,
i tried to find vc8 project file for pdfexport but still couldn't find it in any ./opendesign/projectfiles/win32/msvc8/ directories. is it possible for you to email me the project file? i tried to convert the .dsp of vc6 project file into vc8 project file but having some trouble with release version of project file.
it would be very helpful if you can email vc8 project file.
thanks.
hi
i have checked existence vc8 project file in our last 14.xx releases - it is in ddsrcwin.exe\projectfiles\win32\msvc8\exports\pdf or pdfdll. give me please your email, if you still have problems. my is
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)
回复


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

高级搜索
显示模式

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

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

相似的主题
主题 主题发起者 论坛 回复 最后发表
【转帖】new sample - odgetgeome yang686526 DirectDWG 0 2009-05-06 06:28 PM
【转帖】how to make opopengl sample work yang686526 DirectDWG 0 2009-05-06 02:59 PM
【转帖】hatch loop with one edge will not give sample points yang686526 DirectDWG 0 2009-05-05 11:53 AM
c++ opengl sample that works yang686526 SolidWorks二次开发 0 2009-04-12 05:42 PM


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


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