几何尺寸与公差论坛

 找回密码
 注册
查看: 795|回复: 0

【转帖】using opendoc6 in perl

[复制链接]
发表于 2009-4-13 15:11:01 | 显示全部楼层 |阅读模式
using opendoc6 in perl
does anybody have experience programming in perl? i am updating a current perl script that generates pdf's of drawings in our plm system, but is causing me some problems right now. the script uses opendoc2 which doesnt seem to give the option of opening files silent, or automissingconfig. in any case, error boxes are popping up, so i have to monitor this script all the time.
my problem in using opendoc6 is that sw wants &errors and &warnings variables passed in as long data type. perl's standard scalar variables support almost everything but the long data type. i have tried using win32:le::variant as well, with no success.
any help or guidance would be great!
(using sw2007 btw)
current code is shown below.
$workdir = "d:\\solidworks";
$filename = "test.slddrw";
$sld = new win32:le ("sldworks.application", 'quit');
if ($debug) {
$sld->{visible} = 1;
} else {
$sld->{visible} = 0;
}
$sld->setcurrentworkingdirectory ($workdir);
# this line works...
$doc = $sld->opendoc2 ("$workdir\\$filename", 3, "true", "false", "true", $errors);
#this line doesn't work...
$doc = $sld->opendoc6 ("$workdir\\$filename",3,1,"",$errors,$warnings);
perhaps the math::bigint perl module would help.
jim s.
good luck with that. a long is a 64bit variable, perl does not like anything above 32bit variables because it loses its binary-compatibility.
can't really help you on this one other than telling you that you need a 64bit sized variable.
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|Archiver|小黑屋|几何尺寸与公差论坛

GMT+8, 2024-12-22 19:06 , Processed in 0.035061 second(s), 19 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表