I 'm new on that forum, and I have a little problem. I'm also french, so excuse me if my english is not perfect !
I 'm working on a macro on Catia which have to save lots of CATDrawing documents into PDF files.
After the opening of the drawing, I use that code :
Set drawingDocument1 = CATIA.ActiveDocument
drawingDocument1.ExportData "C:\Users\Machine\Plans\plantest.pdf", "pdf"
The code works and saves the file, but I would like to add two possibilities :
First, if the file already exists, I have a message "Do you want to overwrite". Of course, I want to, but I would like this question to be answered "yes" every time (lots of drawings to convert), so how to skip that message and say "Yes" directly ?
Then, if the folder doesn't already exist, I got a message which says "The folder C:... doesn't exist" and the macro stops (bug). So I would like to know if it's possible to create the folder in the same time that the exportdata instruction is executed. If not, I guess I will have to check if the folder exists, and so create it if it doesn't already exists.
I think there might be properties to add to the exportdata instruction to do it, but I don't know them.
I already check the help on Catia, but there was nothing interesting about the exportdata instruction (just the explanation of the parameters used by the instruction). I also checked on the forum, but didn't find anything.
I hope that someone will be able to help me.