 |
|
List Archives > 
Mathcad List Archive > 
Archive by date > 
This Month By Date > 
This Month By Topic
[MATHCAD] VBscript with mathcad?
| [MATHCAD] VBscript with mathcad? |
|
Author: Filip Rosengren
Posted: Mon, 31 Aug 1998 22:14:39 +0200
|
Hello mathcad users,
I work for a client who uses Mathcad to design some of their products. The dimensions and
tolerances are calculated in Mathcad and the drawings are then produced using a CAD program (PRO/Engineer). The dimension names and their values are exported to an ASCII file by converting stings to ASCII values using the str2vec-function. This ASCII file is then made "readable" to PRO/Engineer by converting the ASCII values back to text using a dedicated program.
I feel this to be a bit akward and would like to be able to write directly to a file using, e.g., a VisualBasic-script (scriptable object).
Could someone please tip me on how to learn about scriptable objects with Mathvad or if they have had some experience with exporting Mathcad variables together with their names.
Thanks in advance,
//Filip
===
Filip Rosengren, Xdin AB
email: />
mobile: +46 (0)708-984 907
===
|
| Re: [MATHCAD] VBscript with mathcad? |
|
Author: Boris Pevzner
Posted: Tue, 01 Sep 1998 16:45:50 -0400
|
Filip,
You may find the following URLs useful for learning about VB scripting
and OLE Automation with Mathcad, particularly with respect to Mathcad's
interoperability with CAD applications.
http://www.mathsoft.com/mathcad/70dir/closer/Scripting.htm
http://www.mathsoft.com/mathcad/library/mathconnex/scripted.htm
http://www.mathsoft.com/support/mcad7/Examples/scriptedsamples/index.htm
http://www.mathsoft.com/support/mcad7/usage/oleautomation/
Regards,
Boris Pevzner
Technical Product Manager - Mathcad Products
/>
800-MATHCAD x753
MathSoft, Inc.
101 Main Street
Cambridge, MA 02142
http://www.mathsoft.com
At 10:14 PM 8/31/98 +0200, you wrote:
>>>>
<excerpt><smaller>Hello mathcad users,
</smaller>
<smaller>I work for a client who uses Mathcad to design some of their
products. The dimensions and
tolerances are calculated in Mathcad and the drawings are then produced
using a CAD program (PRO/Engineer). The dimension names and their values
are exported to an ASCII file by converting stings to ASCII values using
the str2vec-function. This ASCII file is then made "readable" to
PRO/Engineer by converting the ASCII values back to text using a
dedicated program.
</smaller>
<smaller> I feel this to be a bit akward and would like to be able to
write directly to a file using, e.g., a VisualBasic-script (scriptable
object).
</smaller>
<smaller>Could someone please tip me on how to learn about scriptable
objects with Mathvad or if they have had some experience with exporting
Mathcad variables together with their names.
</smaller>
<smaller>Thanks in advance,
</smaller>
<smaller><<file://Filip>//Filip
===
Filip Rosengren, Xdin AB
email: />
mobile: +46 (0)708-984 907
===
</smaller>
</excerpt><<<<<<<<
-------------------------------------------------------------
The Mathcad List - Discussion, Support & News
Contributions: />
To unsubscribe: Send in the body: unsubscribe mathcad
To: />
Hosted by: Adept Scientific http://www.adeptscience.com
|
| Re: [MATHCAD] VBscript with mathcad? |
|
Author: Filip Rosengren
Posted: Thu, 3 Sep 1998 14:57:28 +0200
|
Hi Rob,
Thank you for your response. I've now had time to dig deeper into what would be a good interface between PRO/E and also other engineering software tools that my client is trying to interface with Mathcad.
I've come to the conclusion that the most optimal interface would infact be a very simple one - namely a Variable-Table-file (VT-file). OLE2 interfacing/automation is not possible/desirable for my clients situation. A VT-file would however be great to be able to produce from inside Mathcad.
A VT-file is no more than an ASCII file listing the output variables and their values, like so;
RADIUS_1 = 23
RADIUS_2 = 0.35
LENGTH_1 = 23.3
COLOUR_1 = "YELLOW"
.... and so on ...
To my knowledge this is not possible to do with existing Mathcad commands. My client uses something like the attached code to export the ASCII-codes of the letters of the variable names. I realise of course that it would be simpler just to export the values of the variables but this would mean keeping track of the order of the variables between all applications which uses the VT-file AND missing out on the opportunity to be able to output directly to PRO/E and other applications. The VT-file is also easily "searchable" from other applications which is another bonus. The attached code is a bit "clumsy" and also has to be processed afterwards to give a "readable" VT -file.
It is to my judgement a relatively simple task for an able person (I'm not) in VBScripting to put together a routine to export a matrix like the one in the attached example. The ability to export variable names and their values would mean a great deal to my client and would in my judgement further increase the use of Mathcad in the design process.
I hope to hear from you soon,
//Filip
===
Filip Rosengren, Xdin AB
email: />
mobile: +46 (0)708-984 907
===
-----Original Message-----
From: Rob Dooley />
To: />
Cc: />
Date: den 2 september 1998 18:51
Subject: [MATHCAD] VBscript with mathcad?
Hi Filip,
This looks like an interesting application of the component technology in Mathcad. I hope you've had a chance to look through the information that Boris pointed you at, and that it came in useful.
Probably the most important piece of info you'll need to find out is whether Pro/Engineer is OLE2 compatible. If it is then this should be possible. Even better, if you can find an example of a link between Pro/Engineer and Visual Basic, or Excel, then I should be work out the syntax needed and I could help you link the two products.
Mathcad/CAD integration is something that's very interesting to us, and something we see as potentially very useful in the engineering workplace, I've done some work linking Mathcad to Imagineer (which is a CAD package produced by Intergraph) and would like to see what is possible with other CAD packages.
Best regards,
Rob
>>>>
From: "Filip Rosengren"
To: "mathad mail list"
Subject: [MATHCAD] VBscript with mathcad?
Date: Mon, 31 Aug 1998 22:14:39 +0200
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 4.72.2110.0
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2106.4
X-Info: xdin mailgate1
Sender:
Reply-To:
Hello mathcad users,
I work for a client who uses Mathcad to design some of their products. The dimensions and
tolerances are calculated in Mathcad and the drawings are then produced using a CAD program (PRO/Engineer). The dimension names and their values are exported to an ASCII file by converting stings to ASCII values using the str2vec-function. This ASCII file is then made "readable" to PRO/Engineer by converting the ASCII values back to text using a dedicated program.
I feel this to be a bit akward and would like to be able to write directly to a file using, e.g., a VisualBasic-script (scriptable object).
Could someone please tip me on how to learn about scriptable objects with Mathvad or if they have had some experience with exporting Mathcad variables together with their names.
Thanks in advance,
<file://Filip>//Filip
===
Filip Rosengren, Xdin AB
email: />
mobile: +46 (0)708-984 907
===
<<<<
--
Rob Dooley
MathSoft International, Bagshot, UK
/>
http://www.mathsoft.co.uk/office/rdooley.htm
|
|
Attachments:
mail_demo.mcd
|
Previous by date: Re: [MATHCAD] Greek letters in graph labels, =?ISO-8859-1?Q?Steen_Gro=F0e?=
Next by date: [MATHCAD] Bug in given-find and units, =?ISO-8859-1?Q?Steen_Gro=F0e?=
Previous thread: [MATHCAD] a bug, Steen Grode
Next thread: [MATHCAD] Bug in given-find and units, =?ISO-8859-1?Q?Steen_Gro=F0e?=
|
|
|