I have been trying to re-write some VB OLE code into Perl but have some problems with function calls that use anobject variable. That variable will be set by the FindPart method in my example. I don't know how to create the "out" variables in Perl. Particular the line : if $Library->FindPart($placement->PlacementPart->Part->Name, $Part) is causing problems. Any ideas ?
VB CODE
Dim Part, FeederType If Library.FindPart (Recipe.Placements(0).PlacementPart.Part.Name, Par +t) Then FeederType = Part.Value ("FEEDERWIDTH", "Default value goes here") MsgBox "Feeder type: " & FeederType End If
Perl CODE
my ($Part, $FeederType); for my $placement (in $Recipe->Placements) { if $Library->FindPart($placement->PlacementPart->Part->Name, $Part +) { $FeederType = $Part->Value("FEEDERWIDTH", ""); } }
In reply to Trying to re-write some VB-OLE into PERL-OLE by juo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |