forgedascendant has asked for the wisdom of the Perl Monks concerning the following question:
Looking online, I stubled across the perl module WIN32::OLE and then going through the mathcad help file it says that mathcad can interface with OLE programs to inclue those the user creates. So, basically I found the key but I am not sure how to use it. I looked over the example code given (which is for excel and not mathcad) and salvaged what I could from it.
To make sure we are on the same page lets call the input @Array1, @Array2, and @Array3 and the answers $Answer1 and $Answer2. The name of the mathcad sheet lets just call it Trial.xmcd and suppose the path if needed is c:\documents and settings\desktop.
Based upon example code I put this together so far but after this I am completly clueless on how to put everything in or get anything out out
Thank you in advance for any help you can give,#!/usr/ym/util/perl use Win32::OLE; #use existing instance if mathcad is already running eval {$ex = Win32::OLE->GetActiveObject('Mathcad.Application')}; die "Mathcad not installed" if $@; unless (defined $ex) { $ex = Win32::OLE->new('Mathcad.application', sub{$_[0]->Quit;}) or die "Unable to start Mathcad"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: WIN32::OLE interface to Mathcad
by Sinistral (Monsignor) on Apr 01, 2009 at 14:42 UTC | |
by forgedascendant (Novice) on Apr 07, 2009 at 16:25 UTC |