×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Export dimension values from CATIA sketch to EXCEL

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)?

RE: Export dimension values from CATIA sketch to EXCEL

(OP)
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:
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

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

RE: Export dimension values from CATIA sketch to EXCEL

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

https://picasaweb.google.com/102257836106335725208 - Romania
https://picasaweb.google.com/103462806772634246699... - EU

RE: Export dimension values from CATIA sketch to EXCEL

(OP)
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:


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!

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources