Hello,
I am trying to learn to write Catia scripts to help automate some of our most repetitive, basic tasks. I have been searching online, and I've even found some websites dedicated to this topic, but they are defunct and the creators have quit teaching this. So I am trying to find a good way to get started by picking the simplest idea I have and try to write a script.
I am trying to write a macro that I can run and save each sheet of a drawing as a separate .CGM file. This would be done with the drawing open. I think I know conceptually what needs to be done, here is how I think the macro should flow:
1. Store the filename of the drawing to be used at a later step.
2. Go to Sheet 1.
3. Store the sheet name to be used at a later step.
4. Save the sheet as .cgm. The saved filename would be the filename of the drawing as a base and then an "_" and add the sheet title in CATIA after it.
Example: filename of drawing is "Drawing1.CATDrawing" and Sheet 1 name is "Sheet1". The finished .cgm being saved should be "Drawing1_Sheet1.cgm".
5. Create a loop to repeat steps 2 through 4 for each sheet and have it cycle through the other sheets until the end and exit the loop.
This can be done manually but for larger drawings with dozens of sheets this can take quite some time, and also I'd like to get started writing scripts and this seems like a great way to get started. I am rusty when it comes to programming, please forgive me. If there is a better
Any help is appreciated!
Thanks,
Dustin
I am trying to learn to write Catia scripts to help automate some of our most repetitive, basic tasks. I have been searching online, and I've even found some websites dedicated to this topic, but they are defunct and the creators have quit teaching this. So I am trying to find a good way to get started by picking the simplest idea I have and try to write a script.
I am trying to write a macro that I can run and save each sheet of a drawing as a separate .CGM file. This would be done with the drawing open. I think I know conceptually what needs to be done, here is how I think the macro should flow:
1. Store the filename of the drawing to be used at a later step.
2. Go to Sheet 1.
3. Store the sheet name to be used at a later step.
4. Save the sheet as .cgm. The saved filename would be the filename of the drawing as a base and then an "_" and add the sheet title in CATIA after it.
Example: filename of drawing is "Drawing1.CATDrawing" and Sheet 1 name is "Sheet1". The finished .cgm being saved should be "Drawing1_Sheet1.cgm".
5. Create a loop to repeat steps 2 through 4 for each sheet and have it cycle through the other sheets until the end and exit the loop.
This can be done manually but for larger drawings with dozens of sheets this can take quite some time, and also I'd like to get started writing scripts and this seems like a great way to get started. I am rusty when it comes to programming, please forgive me. If there is a better
Any help is appreciated!
Thanks,
Dustin