×
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

Catia Macro: How to Insert Excel Table inside CATDrawing Doc

Catia Macro: How to Insert Excel Table inside CATDrawing Doc

Catia Macro: How to Insert Excel Table inside CATDrawing Doc

(OP)
I want to create Excel Table inside drawing doc using macro. Is it possible ?
Please guide me

RE: Catia Macro: How to Insert Excel Table inside CATDrawing Doc

(OP)
Perhaps You Didn't Understand my problem correctely. I want VBA way to insert excel table not the regular built-in table into drawing sheet. You know excel table has much more options than bare-bone Catia table.

RE: Catia Macro: How to Insert Excel Table inside CATDrawing Doc

(OP)
Yes Thats exactly what I want. I want to automate insertion of excel object. Is it possible ?

RE: Catia Macro: How to Insert Excel Table inside CATDrawing Doc

@jagandeep
I've never seen a way to do this in the API documentation. A possible workaround would be using CATIA.StartCommand "Object" and then SendKeys.

Regards,
Drew Mumaw
http://www.drewmumaw.com/
http://www.textsketcher.com/

RE: Catia Macro: How to Insert Excel Table inside CATDrawing Doc

ctrl-c, ctrl-v doesn't work? it works in acad for example.

RE: Catia Macro: How to Insert Excel Table inside CATDrawing Doc

(OP)
Actually I want to automate this process.

RE: Catia Macro: How to Insert Excel Table inside CATDrawing Doc

there is an option to record user actions as a macro, i think.
turn it on, then go to insert menu-object and try to import it with a manual action. then review the recorded macro and see if you can automate it (exact coords for docking the excel sheet might be tricky).

i also think that you can make a BOM from a CSV file.

RE: Catia Macro: How to Insert Excel Table inside CATDrawing Doc

@loki3000
It's not exposed to automation. That's why I suggested:

Quote (drewmumaw)

I've never seen a way to do this in the API documentation. A possible workaround would be using CATIA.StartCommand "Object" and then SendKeys.

Or a standalone VB app that copy and pastes from the excel directly would work too.

Regards,
Drew Mumaw
http://www.drewmumaw.com/
http://www.textsketcher.com/

RE: Catia Macro: How to Insert Excel Table inside CATDrawing Doc

or a script that draws the table while taking the values from excel, csv etc.
although i don't know if the values can be hardcoded into the drawing so that you don't need to copy also the csv file.

RE: Catia Macro: How to Insert Excel Table inside CATDrawing Doc

also, how long did it take you to familiarize yourself with the catia api and start writing scripts?
what's the best way to learn vb? are vb.net and c# also supported for scripts?

RE: Catia Macro: How to Insert Excel Table inside CATDrawing Doc

@loki3000
Start here in the Eng-Tips FAQ section.

Quote (loki3000)

how long did it take you to familiarize yourself with the catia api and start writing scripts?
Probably about 3 months.

Quote (loki3000)

what's the best way to learn vb?
Are you referring to learning vb or learning vb for CATIA's API?

I learned vb by taking this class and using Visual Studio to create vb applications. For VBScript (and VBA), I read this book.

If you are referring to vb for CATIA's API, then I used Google searches, COE.org, Eng-Tips.com, and various other online resources in addition to referencing the CATIA API documentation, recording my own macros to look at the code, and using object resolution. You may find this Eng-Tips thread helpful. And here's some other online resources (just use Google for more):
http://v5vb.wordpress.com/about/
http://www.scripting4v5.com/additional-articles/ca...
http://www.3dcadforums.com/catia-forum/4248-catia-...

Quote (loki3000)

are vb.net and c# also supported for scripts?
If you develop an application in Visual Studio that accesses CATIA's API then you can use whatever object-oriented programming language that you want. If you are making a .catvba or .catvbs macro in CATIA V5 then you have to use vb. Also, I think CATIA has it's own internal scripting language called catscript, but I'm not familiar with it. And I heard that we will be able to program macros in CATIA V6 with vb and C#.

Regards,
Drew Mumaw
http://www.drewmumaw.com/
http://www.textsketcher.com/

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