CAA Framwork
CAA project tree
![]() |
| identitycard |
上图中仅搜索system和ObjectModelerBase frameworks中PublicInterfaces和ProtectedInterfaces 目录中的头文件
在命令行中输入命令,
BUILT_OBJECT_TYPE=SHARED LIBRARY ;;定义模块类型
OS = COMMON ;;指定所有os的通用选项
WIZARD_LINK_MODULES = \ ;;指定wizard关键字
JS0GROUP JS0FM CATApplicationFrame
LINK_WITH = $(WIZARD_LINK_MODULES) \ ;;指定共享lib模块,用于解决symbol
CATDialogEngine
OS = AIX ;;特定的os
SYS_INCPATH =
SYS_LIBS = -lXm -lXt -lXmu -lX11 -lm ;;编译参数
SYS_LIBPATH = -L/usr/lpp/X11/lib/R5/Motif1.2 -L/usr/lpp/X11/Motif1.2/lib
# 连接的外部库
LOCAL_LDFLAGS = /LIBPATH:”E:\DirectoryWhereTheLibrariesAreStored”
# 库名
SYS_LIBS = LibraryName.lib
# 包含的头文件
LOCAL_CCFLAGS = /I”E:\DirectoryWhereTheIncludeFilesAreStored”
更改环境变量(Start + Programs + CATIA + Tools + CATIA Environment Editor) E:\CATIAV5_Rx\intel_a\code\bin\CATIAENV.exe
WINDOWS #ifdef _WINDOWS_SOURCE
__
__MyModule
ExportedByMyModule __declspec(dllexport)
/>
#define ExportedByMyModule __declspec(dllimport)
/>
#else
ExportedByMyModule
/>
#define ExportedByMyModule __declspec(dllexport)
/>
#define ExportedByMyModule __declspec(dllimport)
/>
#else
ExportedByMyModule
/>

mkRemoveDo -a
[...]
// Query if CATIVisu interface is supported in addition to CATITransform
HRESULT rc = transformInterface->QueryInterface(IID_CATIVisu,(void**)& visuInterface);
// Use returned interface to manipulate point
if SUCCEEDED (rc)
{
visuInterface->Draw(...);
cout << "Point displayed" << endl;
}
[...]
// Query if point implementation can provide a CATITransform interface
CATITransform * transformInterface = NULL;
HRESULT rc = pointImpl->QueryInterface(IID_CATITransform,(void**)& transformInterface);
// Use returned interface to manipulate point
if SUCCEEDED (rc)
{
transformInterface ->Translate(...);
cout << "Point translated" << endl;
}
[...]
MyFrameworkInterfacesUUID.m
CATISample.cpp