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

want to use dd_t
want to use dd_t
which header file is required to use dd_t(" ") call?
i have older version of help file.
regards,
ravindra ghetia
dd_t(s) macro is not very useful in user code.
it was used while porting dd to unicode.
now it is inconditionally defined as l ## s (in odplatformsettings.h)
vladimir
i found it in one post for define layout settings.
found in one post for define the settings for layout...
*********************************
case 1: // page setup name
presb->setstring(dd_t(""));
break;
case 2: // name of system printer or plot configuration file
presb->setstring(dd_t("none_device"));
break;
case 4: // paper size
presb->setstring(dd_t("none_user_media"));
break;
case 6: // plot view name
presb->setstring(dd_t(""));
break;
***************************
so how can i replace it?
it is also in code as part of condition..
***************************
odresbufptr presb = oddbentget(playout);
odresbufptr pstart = presb;
while(presb.get() && !(presb->restype() == 100 && presb->getstring() == dd_t("acdbplotsettings")))
***************************
regards ,
ravindra ghetia
dd_t("")
is the same as
l""
vladimir
got an error....
i got an error when i used it in the code.
toolkit_export odresbufptr oddbentget( const oddbobject* pobj )
{
odsmartptr<odbagfilermodule> pmodule = odrxdynamiclinker()->loadapp(l"odbagfiler");
if(pmodule.isnull())
throw oderror(enointerface);
return pmodule->entget(pobj);
}
***************
error c2664: 'loadapp' : cannot convert parameter 1 from 'unsigned short [11]' to 'const char *'
[info] types pointed to are unrelated; conversion requires reinterpret_cast, c-style cast or function-style cast
***************
which dd version are you using?
vladimir
version
i am using 2.0.3.
want to set layout parameters
i want to set different layout parameters. for that i am using routine ...
*********************
int cdwgwrap::addlayout(const char *name)
{
oddbobjectid layoutid = pdb->createlayout(name);
if (layoutid.isnull())
{
return 0;
}
oddblayoutptr playout = layoutid.safeopenobject(oddb::kforwrite);
if (playout.isnull())
{
return 0;
}
pdb->setcurrentlayout(playout->objectid());
odresbufptr presb = oddbentget(playout);
odresbufptr pstart = presb;
while(presb.get() && !(presb->restype() == 100 && presb->getstring() == l"acdbplotsettings"))
presb = presb->next();
// skip 100 "acdbplotsettings"
if (presb.get())
presb = presb->next();
while(presb.get())
{
int restype = presb->restype();
switch(restype)
{
case 100:
// stop all
presb = 0;
continue;
case 1: // page setup name
presb->setstring(l"");
break;
case 2: // name of system printer or plot configuration file
presb->setstring(l"none_device");
break;
case 4: // paper size
presb->setstring("none_user_media");
break;
case 6: // plot view name
presb->setstring(l"");
break;
case 40: // size, in millimeters, of
// unprintable margin on the left side of the paper
presb->setdouble(0.);
break;
case 41: // size, in millimeters, of unprintable
// margin on the bottom of the paper
presb->setdouble(0.);
break;
case 42: // size, in millimeters, of unprintable
// margin on the right side of the paper
presb->setdouble(0.);
break;
case 43: // size, in millimeters, of unprintable
// margin on the top of the paper
presb->setdouble(0.);
break;
case 44: // plot paper size: physical paper width in millimeters
presb->setdouble(1000.);
break;
case 45: // plot paper size: physical paper height in millimeters
presb->setdouble(2000.);
break;
case 46: // plot origin: x value of origin offset in millimeters
presb->setdouble(0.);
break;
case 47: // plot origin: y value of origin offset in millimeters
presb->setdouble(0.);
break;
case 48: // plot window area: x value of lower left window corner
presb->setdouble(0.);
break;
case 49: // plot window area: y value of lower left window corner
presb->setdouble(0.);
break;
case 140: // plot window area: x value of upper right window corner
presb->setdouble(0.);
break;
case 141: // plot window area: y value of upper right window corner
presb->setdouble(0.);
break;
case 142: // numerator of custom print scale: real world (paper) units
presb->setdouble(1.);
break;
case 143: // denominator of custom print scale: drawing units
presb->setdouble(1.);
break;
case 70: // plot layout flag:
/* 1 = plotviewportborders
2 = showplotstyles
4 = plotcentered
8 = plothidden
16 = usestandardscale
32 = plotplotstyles
64 = scalelineweights
128 = printlineweights
512 = drawviewportsfirst
1024 = modeltype
2048 = updatepaper
4096 = zoomtopaperonupdate
8192 = initializing
16384 = prevplotinit */
presb->setint16(16);
break;
case 72:
/* plot paper units:
0 = plot in inches
1 = plot in millimeters
2 = plot in pixels */
presb->setint16(1);
break;
case 73:
/* plot rotation:
0 = no rotation
1 = 90 degrees counterclockwise
2 = upside down
3 = 90 degrees clockwise */
presb->setint16(0);
break;
case 74:
/* plot type (portion of paperspace to output to the media):
0 = last screen display
1 = drawing extents
2 = drawing limits
3 = view specified by code 6
4 = window specified by codes 48, 49, 140, and 141
5 = layout information */
presb->setint16(1);
break;
case 7: // current style sheet
presb->setstring(l"");
break;
case 75:
/* standard scale type:
0 = scaled to fit
1 = 1/128"=1'; 2 = 1/64"=1'; 3 = 1/32"=1'
4 = 1/16"=1'; 5 = 3/32"=1'; 6 = 1/8"=1'
7 = 3/16"=1'; 8 = 1/4"=1'; 9 = 3/8"=1'
10 = 1/2"=1'; 11 = 3/4"=1'; 12 = 1"=1'
13 = 3"=1'; 14 = 6"=1'; 15 = 1'=1'
16= 1:1 ; 17= 1:2; 18 = 1:4; 19 = 1:8; 20 = 1:10; 21= 1:16
22 = 1:20; 23 = 1:30; 24 = 1:40; 25 = 1:50; 26 = 1:100
27 = 2:1; 28 = 4:1; 29 = 8:1; 30 = 10:1; 31 = 100:1 */
presb->setint16(16);
break;
case 76:
/* shadeplot mode: - new to acad2004
0 = as displayed
1 = wireframe
2 = hidden
3 = rendered */
presb->setint16(0);
break;
case 77:
/* shadeplot resolution level: - new to acad2004
0 = draft
1 = preview
2 = normal
3 = presentation
4 = maximum
5 = custom */
presb->setint16(0);
break;
case 78:
/* shadeplot custom dpi: - new to acad2004
valid range: 100 to 32767
only applied when the shadeplot resolution level is set to 5 (custom) */
presb->setint16(100);
break;
case 147: // a floating point scale factor that represents the standard
// scale value specified in code 75
presb->setdouble(1);
break;
case 148: // paper image origin
presb->setdouble(0.);
break;
case 149: // paper image origin
presb->setdouble(0.);
break;
case 333: // shadeplotid
presb->setobjectid(0);
break;
};
presb = presb->next();
}
oddbentmod(playout, pstart);
return objarr.append(layoutid);
}
*********************************
regards,
ravindra ghetia
something is wrong with your headers. look at the loadapp() declaration in dynamiclinker.h. it should take (const odstring&) parameter.
as for layout settings, you may use oddbplotsettingsvalidator to set layout properties.
vladimir
to solve the problem..
i added code
**************************
#if !defined(_toolkit_in_dll_) || defined(__mwerks__)
odrx_declare_static_module_entry_point(modelermodu le);
odrx_declare_static_module_entry_point(bitmapmodul e);
odrx_declare_static_module_entry_point(odrasterpro cessingservicesimpl);
odrx_declare_static_module_entry_point(odrecompute dimblockmodule);
odrx_declare_static_module_entry_point(exfieldeval uatormodule);
odrx_declare_static_module_entry_point(odbagfilerm oduleimpl);
odrx_begin_static_module_map()
odrx_define_static_application("modelergeometry", modelermodule)
odrx_define_static_appmodule("winbitmap.gs", bitmapmodule)
odrx_define_static_application("rasterprocessor", odrasterprocessingservicesimpl)
odrx_define_static_application("recomputedimblock" ,odrecomputedimblockmodule)
odrx_define_static_application("exfieldevaluator", exfieldevaluatormodule)
odrx_define_static_appmodule("odbagfiler.drx",odba gfilermoduleimpl)
odrx_end_static_module_map()
#endif
**************************
but i got unresolved symbol error. so i added..
user_libraries=recomputedimblock.lib \
dd_vc6md_br.lib \
dd_vc6md_alloc.lib \
dd_vc6md_gi.lib \
dd_vc6md_acisrenderer.lib \
dd_vc6md_acisbuilder.lib \
dd_vc6md_modelergeometry.lib \
dd_vc6md_db.lib \
dd_vc6md_ge.lib \
dd_vc6md_gs.lib \
dd_vc6md_root.lib \
dd_vc6md_spatialindex.lib \
winbitmap.lib \
dd_vc6md_rxrasterprocessor.lib \
dd_vc6md_exfieldevaluator.lib \
dd_vc6md_bagfiler.lib \
when i try to link dd_vc6md_bagfiler.lib i found an error.
link : fatal error lnk1181: cannot open input file "dd_vc6md_bagfiler.lib"
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)
 


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

高级搜索
显示模式

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

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

相似的主题
主题 主题发起者 论坛 回复 最后发表
【转帖】vectorizing Problem With Dd 1.11 yang686526 DirectDWG 0 2009-05-07 06:27 PM
【转帖】update My Application From Dd 2.02 To Dd 2.3 Error yang686526 DirectDWG 0 2009-05-07 05:54 PM
【转帖】ext Position Regression In Dd 2.5.1 yang686526 DirectDWG 0 2009-05-07 04:48 PM
【转帖】export to dwf v6.0 not working in oddwfexportex - dd rel 2.2 yang686526 DirectDWG 0 2009-05-05 10:27 AM
【转帖】color conversion problem dd 1.14.01 yang686526 DirectDWG 0 2009-05-04 05:53 PM


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


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