Export dimension values from CATIA sketch to EXCEL
Export dimension values from CATIA sketch to EXCEL
(OP)
Hello,
I need to make a macro or plugin that would help me export dimension values from CATIA to EXCEL.
I have a sketch with named dimensions. When I run macro I would like it to go thru all dimensions that are in the sketch,
then create EXCEL file with dimension names in one column and corresponding values in the other column.
Is it possible? How do I access dimension names and values in the sketch?

I was looking for tutorials about CATIA automation, but most of them are about V5,
while I have 3DEXPERIENCE R2016x.
Then there are many language options: CATScript, VBS, and others, even C is mentioned.
I do have experience with CATSCript- I adjusted script that creates drawing frame and fills basic data- it does the job for now.
But I wonder if there is a possibility to automate CATIA with Python (I know it better than CATScript).
Does anybody know good tutorial or workflow description/instructions how to automate R2016x (with Python if possible)?
I need to make a macro or plugin that would help me export dimension values from CATIA to EXCEL.
I have a sketch with named dimensions. When I run macro I would like it to go thru all dimensions that are in the sketch,
then create EXCEL file with dimension names in one column and corresponding values in the other column.
Is it possible? How do I access dimension names and values in the sketch?

I was looking for tutorials about CATIA automation, but most of them are about V5,
while I have 3DEXPERIENCE R2016x.
Then there are many language options: CATScript, VBS, and others, even C is mentioned.
I do have experience with CATSCript- I adjusted script that creates drawing frame and fills basic data- it does the job for now.
But I wonder if there is a possibility to automate CATIA with Python (I know it better than CATScript).
Does anybody know good tutorial or workflow description/instructions how to automate R2016x (with Python if possible)?





RE: Export dimension values from CATIA sketch to EXCEL
Nice to see others switching to 3DEx
Did you checked the DSYAutomation.chm file in your 3DEx installation folder? Can you upload what you have done up to now to take a look at the code?
I don't remember to see something about Python in V6...
Regards
Fernando
https://picasaweb.google.com/102257836106335725208 - Romania
https://picasaweb.google.com/103462806772634246699... - EU
RE: Export dimension values from CATIA sketch to EXCEL
I wouldn't call it 'switching', because I didn't work with V5- it is all new for me (especially automation).
Thank you for pointing me at DSYAutomation.chm file.
I was looking for info on google, I was asking our software supplier's support for help- no luck.
I don't have any code yet, even not 100% sure how to start :)
That CATScript I was adjusting earlier- file just sits in a folder and it works, when I press a button in drafting.
Here is a link with an example how V6 is linked with Python:
https://win32com.goermezer.de/category/cad-systems...
As far as I understand COM is what I need to link V6 with excel?
Thank you again, ferdo,
I'll try to go thru DSYAutomation.chm and find a way to access parameters that I need.
I'll post my progress.
RE: Export dimension values from CATIA sketch to EXCEL
you can read info from CATIA and write it in Excel. Not sure about creating a link from Excel to CATIA.
indocti discant et ament meminisse periti
RE: Export dimension values from CATIA sketch to EXCEL
Let me understand. Are you clicking on a button and you are executing the CATScript from the hard disk? I'm asking because normally all CATScript, catvbs, catvba should be in the database and executed from there.
I guess you have only 3DEx installed. In my case, I have installed 3DEx 2017x cloud, V5R24 and R27 and I just uninstalled 2013x, so things are a little bit complicated due to how software was registered in Windows (that's why I prefer for the time being to use vba in 3DEx and not vb.net).
To help you a little bit more check this link
Regards
Fernando
https://picasaweb.google.com/102257836106335725208 - Romania
https://picasaweb.google.com/103462806772634246699... - EU
RE: Export dimension values from CATIA sketch to EXCEL
Regards
Fernando
https://picasaweb.google.com/102257836106335725208 - Romania
https://picasaweb.google.com/103462806772634246699... - EU
RE: Export dimension values from CATIA sketch to EXCEL
Yes, script that makes drawing frame and fills it is saved on the hard drive. It is CATScript and I can run it by pressing buttons in drafting. See attached image:
I tried to record and play macros (no luck yet, but I'll find out), and then it was saved in database.
Thank you for the good links!