JoeGilligan
Programmer
Hey Everyone,
I am trying to write a Perl script that uses Visio to draw a 'connector' that is attached to two rectangles, however, I am having trouble getting the connector object to draw.
I have:
Code: ( perl )
our $Visio = Win32::OLE->new('Visio.Application') or die "Cannot locate Visio.\n";
$Visio->{'Visible'} = 1;
our $VDocs = $Visio->Documents;
our $VDoc = $VDocs->Open("C:\\visio\\test.vsd");
our $VPage = $VDoc->Pages->Item(1);
our $VShapes = $VPage->Shapes;
our $connector = $VPage->Drop($Visio->ConnectorToolDataObject, 2, 2); #where the error is
Also, I think the VB code for drawing a connector looks something like this
Code: ( text )
Set line = ThisDocument.Pages(1).Drop(Visio.Application.Conne ctorToolDataObject, 2, 2)
The Perl part isn't working for me. I'm not exactly sure of the syntax for how to set this up. If you could help me I'd really appriciate it.
Thanks,
Joseph
I am trying to write a Perl script that uses Visio to draw a 'connector' that is attached to two rectangles, however, I am having trouble getting the connector object to draw.
I have:
Code: ( perl )
our $Visio = Win32::OLE->new('Visio.Application') or die "Cannot locate Visio.\n";
$Visio->{'Visible'} = 1;
our $VDocs = $Visio->Documents;
our $VDoc = $VDocs->Open("C:\\visio\\test.vsd");
our $VPage = $VDoc->Pages->Item(1);
our $VShapes = $VPage->Shapes;
our $connector = $VPage->Drop($Visio->ConnectorToolDataObject, 2, 2); #where the error is
Also, I think the VB code for drawing a connector looks something like this
Code: ( text )
Set line = ThisDocument.Pages(1).Drop(Visio.Application.Conne ctorToolDataObject, 2, 2)
The Perl part isn't working for me. I'm not exactly sure of the syntax for how to set this up. If you could help me I'd really appriciate it.
Thanks,
Joseph