2024年4月21日发(作者:公叔高澹)
CAA基础应用
一、学习CAA的基础
1、熟悉CATIA的基本操作
2、熟悉面向对象的语言(C++)、以及COM(Component Object Model 组件对象模型)
(《COM原理与应用》)的组件思想
二、CAA的基础知识
1、CAA的安装
● 注意安装顺序
● 注意在安装CATIA时安装路径不能有空格
2、CAA中C++语言的命名规则
百科全书-
>Guide相关介绍
例如:
Prefix Means
p
pp
pi
sp
a
pointer
pointer to pointer
pointer to interface
smart pointer || handler
array
Example
CATBaseUnknown *pTarget;
void **ppTarget;
CATISpecObject *piTargetFeature;
CATISpecObject_var spTargetFeature;
char *aPath;
3、开发环境(VC 6.0)的相关命令
百科全书-
>Tools相关介绍
例如1:
Customizing Microsoft Developer Studio-
How to access CAA V5 tools from
Microsoft Developer Studio
,
定制界面如下:
例如2:
Dialog Builder features
4、CAA工程的文件结构树
在VC6.0中新建一个CAA工程,其文件结构树如下图所示:
WorkSpace
FrameWork1
FrameWork2
Module1
Module1
RunTimeView
图1.1 文件树形结构
●
Runtime View
(一系列的文件)
When you write a CAA V5 application, your application needs external resources -
dictionaries, message files, graphic resources and the like. Those resources are delivered in
data modules but scattered among a lot of frameworks (either yours frameworks or rerequisite
frameworks), the first thing to do before running a program is to gather resources into a
common directory that we call the Runtime View.
To create this Runtime View :
In Microsoft Developer Studio, open menu "
CAAV5 Workspace
" and select
"
Create/Update
".
In , open menu "
CAAV5 Workspace
" and select "
Create/Update
".
In Websphere Studio Application Developer, open menu "
CAA Project
" and select
"
Create/Update
".
"
Copy
": this check box allows you to reduce the amount of data to copy
from the Buildtime to the Runtime View.
"
": this allows you to clean up the Runtime View before to
copy files.
"
": depending where you work some kinds of frameworks may be
not meaningful.
"
Other Options
": for advanced users (see mkCreateRuntimeView command for other
options).
● 每个WorkSpace至少需要包含一个Framework。一个Framework包含了一个工程的
所有需要的元素,也即是,一个Framework即可以是你的一个工程。Framework的体系如下
图:
图1.2 Framework的体系结构
可以将磁盘中的文件夹结构与上图对照。下面对Framework的几个文件夹及其文件作
简单的一个介绍。
PublicInterfaces:公共接口,在这个文件夹中是类的声明,即.h头文件。这些类可
以为整个Framework的各个模块共享,也可以被外部Framework使用。
2024年4月21日发(作者:公叔高澹)
CAA基础应用
一、学习CAA的基础
1、熟悉CATIA的基本操作
2、熟悉面向对象的语言(C++)、以及COM(Component Object Model 组件对象模型)
(《COM原理与应用》)的组件思想
二、CAA的基础知识
1、CAA的安装
● 注意安装顺序
● 注意在安装CATIA时安装路径不能有空格
2、CAA中C++语言的命名规则
百科全书-
>Guide相关介绍
例如:
Prefix Means
p
pp
pi
sp
a
pointer
pointer to pointer
pointer to interface
smart pointer || handler
array
Example
CATBaseUnknown *pTarget;
void **ppTarget;
CATISpecObject *piTargetFeature;
CATISpecObject_var spTargetFeature;
char *aPath;
3、开发环境(VC 6.0)的相关命令
百科全书-
>Tools相关介绍
例如1:
Customizing Microsoft Developer Studio-
How to access CAA V5 tools from
Microsoft Developer Studio
,
定制界面如下:
例如2:
Dialog Builder features
4、CAA工程的文件结构树
在VC6.0中新建一个CAA工程,其文件结构树如下图所示:
WorkSpace
FrameWork1
FrameWork2
Module1
Module1
RunTimeView
图1.1 文件树形结构
●
Runtime View
(一系列的文件)
When you write a CAA V5 application, your application needs external resources -
dictionaries, message files, graphic resources and the like. Those resources are delivered in
data modules but scattered among a lot of frameworks (either yours frameworks or rerequisite
frameworks), the first thing to do before running a program is to gather resources into a
common directory that we call the Runtime View.
To create this Runtime View :
In Microsoft Developer Studio, open menu "
CAAV5 Workspace
" and select
"
Create/Update
".
In , open menu "
CAAV5 Workspace
" and select "
Create/Update
".
In Websphere Studio Application Developer, open menu "
CAA Project
" and select
"
Create/Update
".
"
Copy
": this check box allows you to reduce the amount of data to copy
from the Buildtime to the Runtime View.
"
": this allows you to clean up the Runtime View before to
copy files.
"
": depending where you work some kinds of frameworks may be
not meaningful.
"
Other Options
": for advanced users (see mkCreateRuntimeView command for other
options).
● 每个WorkSpace至少需要包含一个Framework。一个Framework包含了一个工程的
所有需要的元素,也即是,一个Framework即可以是你的一个工程。Framework的体系如下
图:
图1.2 Framework的体系结构
可以将磁盘中的文件夹结构与上图对照。下面对Framework的几个文件夹及其文件作
简单的一个介绍。
PublicInterfaces:公共接口,在这个文件夹中是类的声明,即.h头文件。这些类可
以为整个Framework的各个模块共享,也可以被外部Framework使用。