Draw Spline With Perl and Visio

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • JoeGilligan
    New Member
    • Nov 2007
    • 3

    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.Dr awSpline(xyarra y, 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.

    [code=perl]
    $VPage->DrawSpline(\@a rray, "0", $H8);
    [/code]

    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
    Last edited by numberwhun; Nov 9 '07, 07:33 PM. Reason: add code tags
  • numberwhun
    Recognized Expert Moderator Specialist
    • May 2007
    • 3467

    #2
    Originally posted by JoeGilligan
    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.Dr awSpline(xyarra y, 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.

    [code=perl]
    $VPage->DrawSpline(\@a rray, "0", $H8);
    [/code]

    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

    Comment

    • eWish
      Recognized Expert Contributor
      • Jul 2007
      • 973

      #3
      Originally posted by JoeGilligan
      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::Var iant

      --Kevin

      Comment

      • JoeGilligan
        New Member
        • Nov 2007
        • 3

        #4
        Originally posted by eWish
        Hope this will help you. Win32::OLE::Var iant

        --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?

        Comment

        Working...