|
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. |
|