Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

CATIA Save As in C#

Status
Not open for further replies.

elmundo777

Automotive
Jun 23, 2020
93
Hello all
I'm new in CATIA programming and automation. And i'm have a question: how to save part or product with name like in the picture below with GUI? Then opens filesave dialog and name from all textboxes are ready and file saved with name "partname_rev_03".
form_uey1xn.png

Thanks!
 
Replies continue below

Recommended for you

The opposite, it can hurt you for sure. Read the docs.

As for code - CATIA.ActiveDocument.SaveAs() will do the trick.
Google "CATIA c#" for samples.
 
catiavbmacro Hello. Check this post [URL unfurl="true" said:
https://catiavbmacro.com/2018/08/09/new-part-catia...[/URL]]
Thanks, good macro. But i need with save dialog
 
Or, if you don't want to use what Little proposed, you can always use CATIA.StartCommand, in your case, when clicking on Save As form button is

CATIA.StartCommand "Save As..."

There are also some other things to take into consideration...depending on what you want...

Do you want to save as a part inside a product by selecting that part or are you working directly in Part Design (separate window or by activating inside a product)?
Do you want to change the UUID? (look in FAQ for a short explanation but I suggest what Little already said about docs).
Do you need to change also the Part Number to avoid future conflicts when loading in products?



Regards
Fernando

 
1. If work in Part design - save part. If work with product - save all product.
2. I don't know about UUID
3. Changing only name of document. And in future want to add button, where part number will be changed to.
 
You know that you can work in Part Design with product opened in the active window, don't you?
 
I know that. I need to save depending on the open document (part, product).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor