iCAx开思网
标题:
UG批量PLOT打印源代码
[打印本页]
作者:
春泉
时间:
2007-10-20 10:30
标题:
UG批量PLOT打印源代码
void CreatPlot( )
{
int i;
UF_PLOT_job_options_t job_options;
UF_PLOT_banner_options_t banner_options;
char *job_name = NULL;
tag_t draw_tag;
char Message[100];
int error_code;
UF_PLOT_ask_default_job_options( &job_options) ;
UF_PLOT_ask_default_banner_options( &banner_options ) ;
for ( i=0 ; i < count ; i++ )
{
draw_tag=NULL_TAG;
UF_OBJ_cycle_by_name (asListItems
, &draw_tag );
UF_PLOT_ask_default_job_name( draw_tag, &job_name ) ;
error_code=UF_DRAW_open_drawing ( draw_tag );
if(error_code)
{
UF_get_fail_message(error_code, Message);
uc1601(Message,1);
continue;
}
sprintf(Message,"正在打印%s!",asListItems
);
UF_UI_set_status (Message);
UF_PLOT_print( draw_tag , &job_options, job_name,
&banner_options, NULL,
NULL, 1 ) ;
UF_free( job_name );
}
UF_UI_set_status ("打印完成!");
return;
}
[
本帖最后由 春泉 于 2007-10-20 10:32 编辑
]
作者:
春泉
时间:
2007-10-20 10:37
前面自己要再编个主程序,获得选中图纸,得到图纸数量和名字。
count 是图纸数量,
asListItems 放图纸名字。
代码有点BUG,还是刚开始搞二次开发的时候搞的,
自己也没真正用, 喜欢的朋友可以参考下。
作者:
sohuminicax
时间:
2007-10-20 12:00
不懂,帮顶
作者:
open_lian
时间:
2007-10-20 12:53
支持楼主
作者:
春泉
时间:
2007-10-20 13:42
UF_OBJ_cycle_by_name (asListItems, &draw_tag );
改用UF_OBJ_cycle_objs_in_part
count ,asListItems ,以前是用C编的,是全局变量,
现在用C++了,可以放在类里比较好。
作者:
xiaofeng2046
时间:
2007-10-20 15:33
不懂~~看看
作者:
luhongmo168
时间:
2007-10-20 21:56
顶~~~~~~``
作者:
ghmirist
时间:
2008-3-19 17:00
出现 Plotting system directory cannot be specified.
是什么原因?
作者:
春泉
时间:
2008-3-19 21:51
没有配置好PLOT
作者:
fuw2000
时间:
2008-3-20 18:22
楼上的兄弟可否介绍一下如何配置plot 才可以正常执行?
欢迎光临 iCAx开思网 (https://www.icax.org/)
Powered by Discuz! X3.3