Introduction to CATIA CAA programming [closed]

有些话、适合烂在心里 提交于 2020-01-01 07:35:13

问题


I need to start working in CATIA CAA and I am looking for an online introductory course. From a previous post, there doesn't seem to be much available .

All I found is the quite messy documentation which I started digging from:

 CATIA_INSTALLATION_DIR/CAADoc/Doc/online/CAADocUseCases/CAADocRunSample.htm

Any hint?


回答1:


Unfortunately, like many proprietary APIs, it only comes with the software editor examples and documentation and lacks online community to help you getting started...

For CAA, we call the API documentation the Encyclopaedia. The entry point (for V5-6) is rather CATIA_INSTALLATION_DIR/CAADoc/Doc/online/CAACenV5Default.htm

Now there are many aspects you can work using CAA, almost all of them : from data model customization (Object Specs Modeler also called "Features") to visualization through all aspects of geometry and topology. Main CATIA workbenches provide their own layer of APIs (Part Design, Assembly, etc.)

Now to get ready, you will need a Visual Studio (2008 for example if you are working between R20 and R24) on top of which you will install the ENOVIA STUDIO which is basically a set of addins within visual, that will allow you to create, check, test and compile source and resources.

If after install you do not have anything popin up at VS launch, quit it and go to ENOVIA_STUDIO_INSTALLATION_DIR/intel_a/code/bin and launch CATVBTSetup. You should have a checkbox with visual studio 2008 (if that's the version you need.) Check it and click Install. It should register the right stuff and pop up a blue CAA tips dialog box at next VS launch.

Once there, take a look within CATIA_INSTALLATION_DIR/CAADoc : all the directories ending with .edu are working code frameworks (a framework is the highest container for a group of functionnaly related objects in CAA) covering all examples for the encyclopaedia. You will find a lot more actually, since a good chunk of code often talks a lot more than a tutorial or technical article.

To try out this code (and your ENOVIA STUDIO installation by the way), you can create a directory MYWORKSPACE where you can put the frameworks that interest you (all of them if you want :D )

  1. Now go to VS, File->Open CAA Workspace. Browse to your MYWORKSPACE directory. Pick up a "level" (matching the CATIA release you are working with) and click OK. ENOVIA STUDIO Addin (ES) will create the VS metadata so that you get all Frameworks and modules (framework's code sub-components) as projects within the solution explorer on the left.

  2. Now go to CAAV5 Workspace-->Locate Prerequisite Workspaces and Add the CATIA_INSTALLATION_DIR (where you should have both CATIA and CAA API installed)

  3. Now do Build-->mkmk. check update and debug. Add -jobs 4 in Other Options (so that the build gets faster)

  4. Last but not least, update the runtime view (meaning that ES will copy the resources of each framework in your workspace in the intel_a/win_b64 of you workspace which will be read by CATIA at runtime to find icons, interface implementation binding, etc.)

  5. You can execute CATIA now (if you want to go interactive) by Ctrl+F5. If it does not start, go to the project in bold characters in the Solution Explorer on the left. Right click. Properties. In the tree select Debug and in the Command field navigate to MYWORKSPACE\intel_a (or win_b64)\code\bin\cnext.exe.

Last but not least, ask your questions here, it is way time that CAA community benefits from SO power :)



来源:https://stackoverflow.com/questions/34945558/introduction-to-catia-caa-programming

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!