0

I'm new in CATIA programming and automation. And i'm have a question: how to link app to the catia and then with GUI like in the picture below save part or product with name like in the pic? Then opens filesave dialog and name from all textboxes are ready. enter image description here

And what programming language will be better? c#? vba?

Thanks!

Mark Kovak
  • 23
  • 6
  • I would only use VBA if the data is already in a workbook. CATIA uses XML formatting for import/export. So I would use XML formatting to transfer data between CATIA and c#. – jdweng Jun 22 '20 at 14:55
  • Despite being built in to CATIA, VBA is a dead language, If you are learning to program, use C#. Once you learn it is much easier to program, more flexible, and allows you to great stuff like .NET and linq. The Document.SaveAs method is what you need to use. – C R Johnson Jun 22 '20 at 20:36
  • @CRJohnson I tryed to save, but get error :( Also can't find a documentation about INFITF and how to get name from textboxes and save catpart. I don't know syntax... "System.NullReferenceException: 'Object reference not set to an instance of an object.' " – Mark Kovak Jun 23 '20 at 14:17

1 Answers1

1

Vb.net or C#.net does not matter as we are accessing COM API of CATIA. To answer your question.

  1. Since you are not using Catia CAA, we cannot directly add any Button inside CATIA to invoke your Winform Application.
  2. We need to Catch the running session or Start the CATIA session from Your Winform App and Do the Operations.
  3. Refer to this link, there are some practice programs you can refer too.
NAGA REDDY
  • 43
  • 5