Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Export dimension values from CATIA sketch to EXCEL

Status
Not open for further replies.

Andzejus

Industrial
Oct 19, 2015
16
LT
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?

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)?
 
Replies continue below

Recommended for you

Hello ferdo,

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:

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.
 
well if you are using python, then yes you need COM to communication with CATIA and COM to communicate with Excel.

you can read info from CATIA and write it in Excel. Not sure about creating a link from Excel to CATIA.



Eric N.
indocti discant et ament meminisse periti
 
Thanks for info, good to know. I was expecting to work also with Python but never used...

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

- Romania
- EU
 
ferdo,

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:
drawing_embqt4.png


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!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top