471,892 Members | 2,104 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,892 software developers and data experts.

Need Perl OLE help

Hey Everyone,
I am really stuck...possibly more stuck than almost anyone has ever been in his/her entire life. 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:

Expand|Select|Wrap|Line Numbers
  1. our $Visio = Win32::OLE->new('Visio.Application') or die "Cannot locate Visio.\n";
  2. $Visio->{'Visible'} = 1;
  3. our $VDocs = $Visio->Documents;
  4. our $VDoc = $VDocs->Open("C:\\visio\\test.vsd");
  5. our $VPage = $VDoc->Pages->Item(1);
  6. our $VShapes = $VPage->Shapes;
  7. $connector = $VPage->Drop($Visio->ConnectorToolDataObject, 2, 2);
Also, I think the VB code for drawing a connector looks something like this

Expand|Select|Wrap|Line Numbers
  1. Set line = ThisDocument.Pages(1).Drop(Visio.Application.ConnectorToolDataObject, 2, 2)
The Perl part isn't working for me. If you could help me I'd really appriciate it. I am pretty noob with Perl OLE.
Nov 14 '07 #1
1 2269
971 Expert 512MB
I have not worked with Microsoft Visio, but the Visio Modules are designed for that purpose. I would have a look and see if the modules do what you need.

If someone else here is able to help you then I would consider posting at perlmonks as well.
Nov 14 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

9 posts views Thread by Roy Smith | last post: by
2 posts views Thread by David K. Worman | last post: by
1 post views Thread by Spamtrap | last post: by
2 posts views Thread by MK | last post: by
3 posts views Thread by rahul sinha | last post: by
4 posts views Thread by Freedolen | last post: by
reply views Thread by YellowAndGreen | last post: by
reply views Thread by zermasroor | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.