473,386 Members | 1,801 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

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 3539
numberwhun
3,509 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

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

Similar topics

4
by: luc wastiaux | last post by:
Hello, my boss is looking for a tool that would enable her to draw web interfaces easily, like visio does for other types of diagrams. What she wants this for is , I assume, to give me an exact...
2
by: Stefan Svensson | last post by:
I posted this request for help in Visio, troubleshooting newsgroup and Installation newsgroup, about 1,5 months ago but without result. "I recently installed Visio .NET Enterprise Architect 2003...
5
by: John | last post by:
Hi, I need some software that will analyze my C# application (consisting of multiple projects and many classes) and show the relationships between classes and methods. I want to visually see...
3
by: Wayne Taylor | last post by:
How would you draw a array, say in visio? Thanks
1
by: jessprev | last post by:
Hello, I have a database with customer information. I would like to add a button that will dynamically open a visio diagram of their network based on the customer name. For example if ABCCo...
4
by: Mike Logan | last post by:
I would like to dynamically create a Visio diagram from .Net. I tried looking at the Visio SDK, but the samples are extremely convoluted for me to understand. Does someone have an example of...
2
by: Aprile | last post by:
Hello, everyone. My sister sent me a Visio file but I don't have MS Visio. Now, I'm wondering if OpenOffice Draw can open it. From what I know, that's not the case last year. I'm not sure if there...
5
by: happyjack27 | last post by:
I've searched the net all over. All I want to do is generate a cubic b-spline function from a set of 2-d points and evaluate it at different x. I need the kind where the curve runs through the...
3
by: flow3rgirlz | last post by:
Hi all, I'm really new to Perl. I'm not sure where to post my topic as it between Perl and Visio. Anyway, I want to run a Visio macro automatically using Perl Script. $vis->Run($macro_to_run);...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.