use strict; use diagnostics; use warnings; use Win32::OLE; my $asynconn = Win32::OLE->new("pfcls.pfcAsyncConnection"); my $conn = $asynconn->Connect( "", "", ".", 5 ); my $session = $conn->Session; my $mdlName = $session->CurrentModel->FileName; my $model = $session->CurrentModel; ##VBA code: solid = CType(model, IpfcSolid) my $solid = $model; ##VBA code: solidProperties = solid.GetMassProperty(Nothing) my $solidProperties = $solid->GetMassProperty(''); use Data::Dumper; print Dumper($solidProperties); my $Mass = $solidProperties->Mass; print 'model.Type ', $model->Type, "\n"; print "solidProperties: $solidProperties", "\n"; print "mdlName: $mdlName", "\n"; print "Mass: $Mass", "\n";x $conn->Disconnect(2);