jjorsett has asked for the wisdom of the Perl Monks concerning the following question:
with the error "Can't modify non-lvalue subroutine call at GE.pl line 6." Ok, so maybe I need to treat it as a function call, so I trieduse warnings; use strict; use Win32::OLE; my $GE = Win32::OLE->new('GoogleEarth.ApplicationGE'); my $cameraInfo = $GE->GetCamera(0); $cameraInfo->Range = 500;
and got the error "Win32::OLE(0.1707) error 0x80020011: "Does not support a collection" in METHOD/PROPERTYGET "Range" at GE.pl line 6" As I understand it, this means there's something wrong with the argument type, so I tried variations on the argument like '500'. No luck. I can read the parameters fine, such asuse warnings; use strict; use Win32::OLE; my $GE = Win32::OLE->new('GoogleEarth.ApplicationGE'); my $cameraInfo = $GE->GetCamera(0); $cameraInfo->Range(500);
which yields the expected result. Can anyone tell me what I'm doing wrong here? If it helps, when I run the following:print $cameraInfo->Range;
I get this:use warnings; use strict; use Win32::OLE; use Data::Dumper; my $GE = Win32::OLE->new('GoogleEarth.ApplicationGE'); my $cameraInfo = $GE->GetCamera(0); print Dumper($cameraInfo);
$VAR1 = bless( { 'FocusPointLatitude' => '38.9594283106337', 'FocusPointLongitude' => '-95.2654992558942', 'FocusPointAltitude' => '0', 'FocusPointAltitudeMode' => 2, 'Range' => '11110155.9149248', 'Tilt' => '0', 'Azimuth' => '-1.00991539999065e-005' }, 'Win32::OLE' );
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Controlling Google Earth via COM interface
by Anonymous Monk on Jun 13, 2009 at 00:55 UTC | |
by jjorsett (Initiate) on Jun 13, 2009 at 03:44 UTC | |
by Anonymous Monk on Jun 13, 2009 at 03:58 UTC | |
by jjorsett (Initiate) on Jun 13, 2009 at 10:29 UTC | |
by planetscape (Chancellor) on Jun 13, 2009 at 12:16 UTC | |
| |
by Anonymous Monk on Jun 13, 2009 at 12:28 UTC | |
|