468,507 Members | 1,602 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,507 developers. It's quick & easy.

Draw Spline With Perl and Visio

Hi. I am trying to run a Visio macro from Perl using the Win32::OLE library. For my program I need to draw a spline. The argument it requires to create this must be an xyarray.

the VBA command to make this is...

ThisDocument.DrawSpline(xyarray, Tolerance, Flag)

I know the VBA array is different than a perl array so I havn't been able to send it directly. I also read online that you just had to pass the array byref and the OLE library would handle it...I think it would look like this.

Expand|Select|Wrap|Line Numbers
  1. $VPage->DrawSpline(\@array, "0", $H8);
  2.  
That didn't work for me. I also read something about using a VT_ARRAY, but i'm not exactly sure how that would work. I'd appriciate your help!

Joe
Nov 9 '07 #1
3 3216
numberwhun
3,503 Expert Mod 2GB
Hi. I am trying to run a Visio macro from Perl using the Win32::OLE library. For my program I need to draw a spline. The argument it requires to create this must be an xyarray.

the VBA command to make this is...

ThisDocument.DrawSpline(xyarray, Tolerance, Flag)

I know the VBA array is different than a perl array so I havn't been able to send it directly. I also read online that you just had to pass the array byref and the OLE library would handle it...I think it would look like this.

Expand|Select|Wrap|Line Numbers
  1. $VPage->DrawSpline(\@array, "0", $H8);
  2.  
That didn't work for me. I also read something about using a VT_ARRAY, but i'm not exactly sure how that would work. I'd appriciate your help!

Joe
Welcome to TSDN, Joe!!! We are pleased that you decided to join our humble forum.

I have editied your post for code tags. Please be sure an add them whenever you post code in the forum. As for your question, I have not had any experience with that, but certainly hope that one of our experts can assist you!.

Again, welcome!

Regards,

Jeff
Nov 9 '07 #2
eWish
971 Expert 512MB
That didn't work for me. I also read something about using a VT_ARRAY, but i'm not exactly sure how that would work. I'd appriciate your help!
Hope this will help you. Win32::OLE::Variant

--Kevin
Nov 10 '07 #3
Hope this will help you. Win32::OLE::Variant

--Kevin
Thanks Kevin,
That helped, but I still have a question. I saw the section on how to make a 2 dimensional array, but I'm having trouble understanding the syntax. Do you know how to go about creating a one-dimensional safearray as opposed to the 2 dimensional?
Nov 12 '07 #4

Post your reply

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

Similar topics

4 posts views Thread by luc wastiaux | last post: by
2 posts views Thread by Stefan Svensson | last post: by
3 posts views Thread by Wayne Taylor | last post: by
1 post views Thread by jessprev | last post: by
4 posts views Thread by Mike Logan | last post: by
3 posts views Thread by gieforce | last post: by
1 post views Thread by fmendoza | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.