Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pass data from form(c# windows forms or VB forms) to CATIA macro.

Status
Not open for further replies.

elmundo777

Automotive
Jun 23, 2020
93
BY
Hello all!
I want to write save the file program.
I have a question. For example there is a form with a textbox and a button.
In CATIA in the macro I call .exe file with the form.

How to get the value of a variable from form in a CATIA macro and pass it?

Here I'm call .exe file with GUI in CATIA:
form="c:\test\main.exe"

Here I'm want to save file with new name:
cad.SaveAs(dlname & "\" & PartNumber & doctype)

In the screenshot i'm want to get a path from folderbrowserdialog to a variable or textbox. Than i'm want to get value of this variable in CATIA macro and than put to SaveAs(*).
ff_hoxacv.png


Is it possible - get value of the variable from exe form to CATIA macro?
 
Replies continue below

Recommended for you

It's doable, but most likely doesn't worth it.

Why do you use .NET in the first place? What's your goal?
 
Little Cthulhu said:
It's doable, but most likely doesn't worth it.

Why do you use .NET in the first place? What's your goal?
I have no idea how to save with the choice of file name and directory differently.
Also I haven't seen directory selection methods in CATIA macro.
 
It can be achieved with standard COM objects
Google "vbscript select folder dialog".
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top