0% found this document useful (0 votes)
505 views46 pages

Modular API Development for Catia V5

This document summarizes a master's thesis project that developed a modular application programming interface (API) for the CAD software Catia V5. The project aimed to create an API that was easy to use, modify and expand. It analyzed Catia V5's existing API and identified areas for improvement. The developed API features modular design with separate packages for different functionality, which makes it simpler to use and maintain than Catia V5's original monolithic API.

Uploaded by

ANAND G
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
505 views46 pages

Modular API Development for Catia V5

This document summarizes a master's thesis project that developed a modular application programming interface (API) for the CAD software Catia V5. The project aimed to create an API that was easy to use, modify and expand. It analyzed Catia V5's existing API and identified areas for improvement. The developed API features modular design with separate packages for different functionality, which makes it simpler to use and maintain than Catia V5's original monolithic API.

Uploaded by

ANAND G
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
  • Introduction
  • Purpose
  • Basic Concepts
  • About API-development
  • Analysis of the problem domain
  • The API
  • Result and conclusions
  • Bibliography
  • Appendix A
  • Appendix B

Development of a Modular API

for the CAD-System Catia V5

TOMAS FORS

Master’s Degree Project


Stockholm, Sweden 2004

TRITA-NA-E04088
Numerisk analys och datalogi Department of Numerical Analysis
KTH and Computer Science
100 44 Stockholm Royal Institute of Technology
SE-100 44 Stockholm, Sweden

Development of a Modular API


for the CAD-System Catia V5

TOMAS FORS

TRITA-NA-E04088

Master’s Thesis in Computer Science (20 credits)


at the School of Computer Science and Engineering,
Royal Institute of Technology year 2004
Supervisor at Nada was Inge Frick
Examiner was Stefan Arnborg
Abstract

!" # $
% !
"

& "
'
"
#
( # # )
"*#
(
# # "
#
# "

Utveckling av ett modulärt gränssnitt


för CAD-systemet Catia V5

Sammanfattning
+ $ ,
- !" . $ , %
! - $ $
"
/ $ , $ -0
$ $ - , $ "
$ $ $ , $
-0 $ $ $ -0 1 $"
2 , , , ,
-0 " $ +
(1 - , -0 $ " ,
, ,$ 1 , - $ (
,- $ , $ , $
" ,- - $ , $
$ $ %"
!"

# $
$$$
$$$
$$$
$$$
$$$
$$$
$$$
$$$
$$$
$$$
$$$
$$$
$$$
$$$
$$$
$$$
$$$
$$$
$$$
$$$
$$$
$$$
$$$
$$$
$$$
$$$
$$$#

% $
$$$
$$$
$$$
$$$
$$$
$$$
$$$
$$$
$$$
$$$
$$$
$$$
$$$
$$$
$$$
$$$
$$$
$$$
$$$
$$$
$$$
$$$
$$$
$$$
$$$
$$$
$$$
$$$
$$$
$%

& ' $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$&


3"4 """""""""""""""""""""""""""""""""""""""""""""""""""""""""""3
3"4"4 5 """""""""""""""""""""""""""""""""""""""""""""""""""""6
3"4"7 . """""""""""""""""""""""""""""""""""""""""""""6
3"7 ' """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""!
3"3 ! """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""8
3"6 ' ! """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""8
3"! """"""""""""""""""""""""""""""""""""""""""9
3"!"4 : 0 """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""";
3"!"7 """"""""""""""""""""""""""""""""""""""""""""""""""""""""<
3"!"3 """""""""""""""""""""""""""""""""""""""""""""" 4=
3"!"6 ( """""""""""""""""""""""""""""""""""" 44
3"!"! """""""""""""""""""""""""""""""""""""""""""""""""""""""""" 47
3"!"8 > """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 47
3"!"9 """"""""""""""""""""""""""""""""""""""""""""""""""""" 47
3"!"; / """"""""""""""""""""""""""""""""""""""""""""""" 43
( " $
$$$
$$$
$$$
$$$
$$$
$$$
$$$
$$$
$$$
$$$
$$$
$$$
$$$
$$$
$$$
$$$
$$$
$$$
$$$
$$$
$$#(

" $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$#)
!"4 $ """"""""""""""""""""""""""""""""""""""""""""""""" 48
!"7 0 """""""""""""""""""""""""""""""""""""""""""""""""""" 49
!"7"4 ? """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 4;
!"7"7 """"""""""""""""""""""""""""""""""""""""""""""""""""""""" 4;
!"7"3 ? # """""""""""""""""""""""" 4;
!"7"6 ' + """""""""""""""""""""""""""""""""""""""""""""""""""""" 4<
!"3 """"""""""""""""""""""""""""""""""""""""""""""""""" 4<
) ! $
$$$
$$$
$$$
$$$
$$$
$$$
$$$
$$$
$$$
$$$
$$$
$$$
$$$
$$$
$$$
$$$
$$$
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%#
8"4 ( """""""""""""""""""""""""""""" 77
8"7 """""""""""""""""""""""""""""""""""" 73
* + $
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%
9"4 2 """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 7!
'" $
$$$
$$$
$$$
$$$
$$$
$$$
$$$
$$$
$$$
$$$
$$$
$$$
$$$
$$$
$$$
$$$
$$$
$$$
$$$
$$$
$$$
$$$
$$$
$$$
$$$
$$$
$$$
$$$
$%*

, $$
$$$
$$$
$$$
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%-
"4 2 """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 7;
,'$
$$$
$$$
$$$
$$$
$$$
$$$
$$$
$$$
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%.
>"4 % """""""""""""""""""""""""""""""""""""""""""""""""""" 7<
>"7 """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 37
>"3 @ """"""""""""""""""""""""""""""""""""""""""""""""""""""""" 67
1 Introduction

$ # # # (
"
#
"
# "
)# # "
"'
# "
$ # $#
( ( # " #
+ (
& (# # "

&
$ & "
: #
"
"
A .A B (.
B ( #
"
0
# $ # !(
2 C 2( "
! #
$ #
# "
! #
# ( "'
2 C (
"

1
2 Purpose

# (# #
# "
"
> # ! # #
$
# !"
0
$ # # " #
+ 0 (
# "
(
# #
# $"

2
3 Basic Concepts

! # #

" "

3.1 Component technology


# #
+ ( "
( # DD# & )
E
7==3F
"2 #
$
"
( ( # +
( & "

# # $ #
"
(#
+ "
+ (
" #
$ # (
#
" #
# "

".
+ #
$ G G
: 0 . % :.% " : (#
( # $
"

"
# "
#
" #
#
" # &
# "
$ # $ "
2 # # #
"

3
$ (" " # #
# $E
> " 7===F
"

3.1.1 Components in Java


: + # $
B 5 > 2 . "
"
(" " ( #
5 "
:2 ( 5 (
$ "
"
(
# ( H
+ "*# #
# $"
"
#
:2 "2 $ I
# + #
E
B 5 > 7"4 F
"

3.1.2 Components by Microsoft


# :.
. .2 :. " .2 :. "2
. :. 2 E
4<<!F
"
. "
$ + "
2 .2 :. # + 0
# $
"2
" (
# # $"
# # $
& # & " #
(# #
$ + "
( (
" # #
+ # 0 "
/ "
0 # $ #
$ :. # $" / &

/ # "

4
.2 :. # $ $ "
# .2 :.
"
.2 :. # $ # $ #
# $ (
# # $# :.
"
B .2 :. .2 J #
# $ ( + .2 :.
? + "

3.2 Features and CAD


.
"
# $ #
$( "
> "
#
"

( "
+ # ( $
" #
# "
*# (
#
H "
(
"E
> " 7==4F

# $ # #
" (
(
0 "
+ " + "
# + "
# #
( # # "
.
" ":
# $
"
# $
# ($ # " $
$ #

5
# $
"
#
# $"
" # (
"

$ !( A
B@% @BB/ "

3.3 Catia V5
! 3 2 C "
( # $
"
. + ( ( (
#" B 0 H #
# + "
# # ##
# $ # $ #
" # $ + (" "
# $
" # #
"
0 # $ ( (
# # "
@#
# "
0 #
"
! # "

3.4 Features in Catia V5


! 0
" (# $
KK " $
"
J $ 0 0
" +
" #
"
# +
"
(# (
"

6
(
+ "
" "
! # # #
"
# $
"
#

# !" > # !
( ( "
#
! "
. ! # "
:
0 " + "
# + "
" + (#
"
! "
"

# $ "
2 $
"
"' +
"
# ( (# #
( "
"
# # #
" 0 $ I
"

" ! "
( # "
+ +
2: "
# ! L
AA###" " "

3.5 Component application architecture


' # "
(# "
# # .2 J # ? +"
# $
"

7
( 2 > (
KK" # KK
0 # "

3.5.1 Object model


! 0 + .2 :.I
? + # " 2
& KKL
• B " KK
( ( "
• / + KK
(# # $ # !"
• 2 0 " 2

"
• ' + + 0 " KK + 0
(
+ "

2 !: 0 .
:. "
:. CATBaseUnknown(# IUnknown )
.2 :."
(
$ "
' 0 +
"
$ +"
2 "
#
# " $
2 # "
# #
!# "
KK (" "
" B 0
+ # " B 0

" B "
' # # $
( ":

"/

+ "

8
+ (
A + " +
(# +
" (#
0 (
+ ( # #
"
$ ! # #
" ! 0
"
" $ ! $
$ " #

"
:. # + (
0 " (
0 (
# # "

3.5.2 Internal structure


! . # "
+ #
"
#
(# 0
"
"
# ( "
(# # $ #
"
: (# #
"
# $ "
+
# "
" #
"
"

( & !" + (#
&
" &
& $
" $
#
"
# # "

9
J #
# "
!(#
"
(
"
CATIBuild " Build()(
# !"
: (#
0 $ ( ( "
(# 0 #
"
# # ## #
" ! ? + #
J #( #
# #"
! # # (
" " "
# #
0 " 0
" ( ( #
"
$
"
(#
( "

3.5.3 Document organisation


"
"
# "
0 # $
!( # "

10
[Link] The part document
L
• (# #
"
• " $
0 "
# (
" (" " (
"
"
• "
$ "
• "
(
" "

#
"

[Link] The product document


0
"
$ " +
" ($ ( & #
"
"
" #
# (# "
#
"
( (
"
"
# #
# #
"

3.5.4 Types, names and coding rules


(
0 $ 0
#" # # "
2 (#
" +
CATDocument" # + #
CATIContainer"

11
# (#
# + "
2 ( ( (
+ "

3.5.5 Code structure


;9 # $ !/<(#
! "B
# $ ( ( (
"
# $ #
"
# & " L
# $ ) (
# $)
) "
#
# # $"
$ #
+
$ "

3.5.6 Build issues


# # $
$# " # $
# $ "
' + " #
( # "

3.5.7 Development tools


' . J #H 2
B KK 8"=" KK
. B 2 2"
B ( #
# $ " $
B"
# $ # # & $" + L#
# 2 + 0 2
" 2 ( 2 2
0 # $ B
# 0 #
0 2 0 "
$ # )
"J ( # 0
2 ( "

12
%? " / !
(#
# .2 J #

3.5.8 Running an application


# # "
# $ "
# ! "
0 $ (
# " #
# "
# # ! (
" # !
(#
# # "
"

13
4 About API-development

(
+ " #
# # "
#
( #
# # "
$ ##
# # "'
# $ # " $
"# +
+ ": (#
# #
" # # %? (#

" ' %?
#
"

# "
& $ #
( #

# :.
"
"

" +
# "
# # # #
( +
"
> 0 & +
# $ " G E
4<<;F
. E
4<<<F
(# # !) AB@% @BB/"
2 # (
$ # $
A
B@% @BB/ # L
• A
B@% @BB/(#
!( "
# "
• B & $
# 0 $"
& $ # + ">
# $ "

14
# # (#
# "
• # $ #
) # #
0 "

# $ #
( # # "
# + " $
# # $
" #
" # $ #
( # $ # $
$ "
# $ # # # $
"? #
# + "

15
5 Analysis of the problem domain

"

5.1 Common programming tasks


#
+ # L
# (
(+ QueryInterface
"
: " +
( # "J
"2 + #
" # # $
"
# $# ( #
"M
+ (
"

" "
+ # (#
# # # "
Release()
"
CATISpecObject_var #" _var
(
" 0 "

CATDocument* theDoc = 0;
CATDocumentServices::OpenDocument(filename, theDoc);
CATInit *pDocAsInit = 0;
theDoc->QueryInterface(IID_CATInit, (void**)&pDocAsInit);
CATIPrtContainer *pSpecContainer = (CATIPrtContainer*)
pDocAsInit->GetRootContainer("CATIPrtContainer");
pDocAsInit->Release();
CATISpecObject_var ospPart = pSpecContainer->GetPart();
pSpecContainer->Release();
Use ospPart.
$
( # $ #
# # $ " $
"

16
#
# "
# $ + #

"
# # 0
"' #
0 # (
# "
0
" # # (
" ( #
"
:. # "
# $ # #
0 "

0 " I
:. "
(# #
# #
"
( (
"
: # #

# "
# 0
# $
0 "

5.2 Application specific objects


0
+
$ # #"
$
"
+ ! #
( # # $"
# $ + #
" +
(# #
+ # "

17
# # L
• + "
• > + 2 "
• > # "
• > + +
"

5.2.1 User feature


+ # "
#
"
# 0
# # ( (
" "
! "

5.2.2 Derived feature


J # 2
"
#
!"
CATINavigateObject (
# $
": #
"
# H
"
#
CATIVisu "
$
CATIEdit "
CATIBuild $
# $( # # "
( ( CATICSOFilter
"
J # #
#
" #
"

5.2.3 User defined feature without derivation


(# #
"

18
" #
"
2
"
"
$
" (
( # $ !"

5.2.4 Feature extension


+ +
" + "
+
"> +
+ + + #
+ +
" +
+ "
@ # (
+ "
!# + "

5.3 Applicative feature strategy


J
# (" " # $ $ # #
" #
( # "

$
# + "
2
(
( #
"

& ": #
$ ( "
I
"
: )
) #
"
(
!(

19
"
? ' 2'

"
$ #$# "
N
O + "
I
"@
( N O
+
"
$
# + "
(

# (
# "
#
# + #
2#
$ "
#
N O "

20
6 The API

# "
J # # P
# $ # $ # # #
$ $
" #
# ) "J #
# # + ">
" $ +
":
" 2
# # # "
: # # + (
" " " # ## # $ #
# # "
" + #
" # ( #
# $ "
# "
# & # # $
"
( $
# $ " #
# # "
$
(# $ "
# "
0 #
"> (
# "
# "
+ (# #
". P:
2G
0 $ # P
# 2 G( #
# # "*# #
"
# 2G
#
&
$ std:: $
# $ " 2

# "

21
@+ # #
(" " # " "
+ "@ )
& " 2G
# "
0 ) # $
# "

6.1 Initial design, global functions and classes


J #
# " & # $ # " $
Q ( +
"
0 $ #
# " #
" 0
( #
" #
# " #

# # # # $ "
#
# "
# !#
0 " #
+ !
"> 0 # #
" 0 #
0 ".
"
# #
( (
" # $ # HRESULT
(#
"
& ( #
" $
(" "
AddRef() Release()"
# $# ( > "
# $# # ( (
> ( ( > "
> # $
>
$ "
+ "

22
> # + # DCBapUdf(
# #
"
"
( # "
"
#
(" " ( " # $
( "
# "

6.2 Applicative feature handling in the API


(
# "
# L



"

: ( #
#
# "
(DCBapApplicativeUdfSU(
#
" & A A "
# (
"
# "
$
I #
"
0 # "
+ # " #
+ "

DCBapApplicativeUdf # "
$ #
"

DCBapApplicativeUdf 0 (# # DCBapUdfAttribute )
"'
DCBapUdfAttribute’s "

23
# >
# # $ "

24
7 Result and conclusions

(
# $ "
> "
> "
!
DCBapResult" # + #
"
# + # "
"
"
# " #
( ( "
(
"
": #
# ( ## ( #
# "
#
" "
"

"

7.1 Some suggestions


2 " #
# " !
#
" # (
" + "
+ # #
# $ + " %?
# "
# $# #
# # "
# # # # $ "2
# #

#(
+ "
# + #
! "
#

25
CATINavigate $ #
" CATIEdit
JD KK # $"
# (
# "
: ($
" #

( #
# "
# "
#
%? # "

26
Bibliography

> '" " 7==="


!" E F
" L
<[Link] (2004-04-11)
> J' " 7==4" B " L
R(G J( M 5 " (# $%&
' "(()! *
$ % '
J (> 0 (
8 4!"
B 5 > 7"4) ' E F
" L
<[Link] (2004-04-11)
G 4<<;" # +
$% # & ,' , -" 2 0 (% .
? , 4<<;"
. 4<<<" . / / # & ,' , - 0 +
1 2 "2 0 (% . ? ,
4<<<
. :. 2 4<<! E F
" L
<[Link] (2004-04-11)
/" 7==3 3 E F
" L
<[Link] (2004-04-11)

27
Appendix A

A.1 Syllabus
/ $ " "
"
"
" # $
!"
" # "
0 " #
"
1 "' #
"
21 0 " #
"
$ ": 0 # $
( $ # $ "
3 2 C " "
/ % " "
0 "2 # #
"@ ( (
"
4 " "
:.%"
32 D "
D @2 "
13 . " "
13 21 0 . "
21 : 0 " 0 "
21/ : 0 " # $
G "
23 : "
+ / " #
"
3!42 " #
KK " "
3 " B . ( KK"

28
Appendix B

+
$ "

B.1 Global functions in the API


HRESULT" #
" # $ #
FAILED(HRESULT) SUCCEEDED(HRESULT)"
. "

"
+ # (
+ # "

DCBapAccessCatalog
HRESULT DCBapAccessCatalog(CATUnicodeString* iCatalogName,
CATUnicodeString* iClientID,
CATIContainer* iContainer,
CATICatalog** oCatalog)
"
5
iCatalogName
": # +
"
WorkSpace\intel_a\resources\graphic
iClientID
"
iContainer
# # "
oCatalog
"
+ 5
2S:T # "

DCBapCreateCatalog
HRESULT DCBapCreateCatalog(CATUnicodeString* iStorageName,
CATUnicodeString* iClientID,
CATICatalog** oCatalog)
# "
5
iStorageName
"' # +
"
iClientID

29
# "
oCatalog
"
+ 5
2S:T # "

DCBapOpenCatalog
HRESULT DCBapOpenCatalog(CATUnicodeString* iCatalogName,
CATUnicodeString* iClientID,
CATICatalog** oCatalog)
: "
5
iCatalogName
( # + "
WorkSpace\intel_a\resources\graphic\
iClientID
$
oCatalog
"
+ 5
2S:T # "

DCBapGetPart
HRESULT DCBapGetPArt(CATDocument* iDoc,
CATISpecObject_var& oPart)
/ "
5
iDoc
"
oPart
"
+ 5
2S:T # "

DCBapGetRootContainer
HRESULT DCBapGetRootContainer(CATDocument* iDoc,
CATIContainer** oRoot)
/ "
5
iDoc
"
oRoot

30
"
+ 5
2S:T # "

DCBapGetRootProduct
HRESULT DCBapGetRootProduct(CATDocument* iDoc,
CATIProduct** oProduct)
$ #
"
5
iDoc
"
oProdOnRoot
"
+ 5
2S:T # "

DCBapGetUdfList
HRESULT DCBapGetUdfList(CATDocument* iDoc,
CATLISTV(CATBaseUnknown_var)* oList,
char* iInterfaceFilter =
“CATIUdfFeatureInstance”)
/ "
5
iDoc
"
oList
# L"
iInterfaceFilter
( ? ' "
+ 5
2S:T # "

DCBapGetUdfListFromPart
HRESULT DCBapGetUdfListFromPart(CATDocument* iDoc,

CATLISTV(CATBaseUnknown_var)oList,
char* iInterfaceFilter =
“CATIUdfFeatureInstance”)
/ "
5
iDoc
"
oList
# L"
iInterfaceFilter

31
( ? ' "
+ 5
2S:T # "

B.2 Classes in the API

DCBapApplicativeContainer
Class to represent a DC-specific applicative container. It is
also intended to automate retrieval and creation of the
applicative container in the document as well as providing a
simple access point to the DC-specific applicative udf:s.

public DCBapApplicativeContainer(CATDocument* iDoc)


# 0 #
"
+ #
# " "
5
iDoc
(
+ ( #
"

public CATIContainer* GetContainer()


/ "
+ 5
@?GG "
public DCBapApplicativeUdf*
addApplicativeUdf(CATIUnicodeString* udfType,
CATIUnicodeString* givenName,
CATIUnicodeString* catalogName,
CATIUnicodeString* clientId)

"
5
udfType
"
givenName
# "
catalogName
"
# + "
WorkSpace\intel_a\resources\graphic"
clientId

32
# "
+ 5
@?GG "
public vector<DCBapApplicativeUdf*>
getApplicativeUdfs(const char* id)
/ L 0 "
5
id
# L"
+ 5
# L"

DCBapApplicativeUdf

"

@ (
> # #
"
' > ?$ # U? V @?GG
"

iUdf
# "
public DCBapApplicativeUdf(DCBapApplicativeUdf& iRhs)
"

iRhs
> ? "

> ? W V > ? W/

iRhs
> ? "

+
> ? "

public void setGeoFather(CATBaseUnknown* iGeo)


2 0 # "

33
iGeo
"
+

public int getNrAttributes()


% "
+

public DCBapUdfAttribute* getAttribute(int iIndex)


/ "

iIndex
+ "
+
"
public ostream& print(ostream& iOs)
0 " XX W(
> ? W"

iOs
# "
+
# "

DCBapResult

> "
"

public DCBapResult()
"

Public virtual void initResult(CATBaseUnknown* iData) = 0


0 "

iData
0 # "
public virtual ostream& print(ostream& iOs) = 0
# 0 "

34
iOs
# "
+
# "

DCBapTopoResult
Class to represent non-editable topological data in a
document. Inherits from DCBapResult.

public DCBapTopoResult()
"

public void initResult(CATBaseUnknown* iData)


0 "

iData
0 # "
public ostream& print(ostream& iOs)
# 0 "

iOs
# "
+
# "

DCBapUdfResult
Class to represent a non-editable user defined feature.
Inherits from DCBapResult.

public DCBapUdfResult()
"

public void initResult(CATBaseUnknown* iData)


0 "

iData
0 # "
public ostream& print(ostream& iOs)
# 0 "

35
iOs
# "
+
# "

DCBapUdf

"

public DCBapUdf(CATBaseUnknown* iUdf = NULL)


"

iUdf
"

> ? W V > ? W/

iRhs
> ? "

+
> ? "

public CATUnicodeString getAlias()


% ( ( 0 "
+
"
public DCBapUdfAttribute* getAttribute(int iIndex)
/ "

iIndex
+ "
+
"
public int getNrAttributes()
% "
+
"
public int getNrOutputs()
/ "

36
+
"
public DCBapOutput* getOutput(int iIndex)
% "
+
"
public CATUnicodeString getType()
/ "
+
"
public ostream& print(ostream& iOs)
# 0 "
XX W( > ? W"

iOs
# "
+
# "

DCBapUdfAttribute

"

public DCBapUdfAttribute(CATISpecAttribute* iSA)

iSA
"
public DCBapUdfAttribute(DCBapUdfAttribute& iAtt)
"

iAtt
"

public DCBapUdfAttribute& operator=(DCBapUdfAttribute& iRhs)

iRhs
"
+
"

public CATUnicodeString& getName()

37
/ "
+
"
public int getIntegerValue()
/ # "
+
)<< "
public CATUnicodeString getStringValue()
/ # "
+
"
public void setValue(int iInt)
2 # "

iInt
# "
public void setValue(char* iString)
2 # "

iString
# "
public void setValue(CATISpecObject_var& iSpec)
2 # "

iSpec
# "
public ostream& print(ostream& iOs)
J "? XX "

iOs
# "
+
# "
public ostream& printValue(ostream& iOs)
J "

38
iOs
# "
+
# "

DCBapUdfInput

"

public DCBapUdfInput(CATBaseUnknown* iInput = NULL,


CATUnicodeString iRole = “”)
"

iInput
"
iRole
"
public DCBapUdfInput(DCBapInput& iRhs)
"

iRhs
"

public DCBapUdfInput& operator=(DCBapUdfInput& iRhs)

iRhs
"
+
"

public ostream& print(ostream& iOs)


J "

iOs
# "
+
# "

DCBapUdfOutput
Class to represent the output from a udf.

public DCBapUdfOutput(CATBaseUnknown* iOutput = NULL)

39
"

iOutput
"
iRole
"
public DCBapUdfOutput(DCBapOutput& iRhs)
"

iRhs
"

public DCBapUdfOutput& operator=(DCBapUdfOutput& iRhs)

iRhs
"
+
"

public ostream& print(ostream& iOs)


J "

iOs
# "
+
# "

DCBapUdfParameter
Class to represent a parameter of an attribute.

public DCBapUdfParameter(CATBaseUnknown* iParam = “NULL”,


unsigned int iIndex = 0,
CATUnicodeString iRole = “”)
"

iParam
"
iIndex
+ "
iRole
"
public DCBapUdfParameter(DCBapUdfParameter& iRhs)
"

40
iRhs
"

public DCBapUdfParameter& operator=(DCBapUdfParameter& iRhs)

iRhs
"
+
"

public ostream& print(ostream& iOs)


J "

iOs
# "
+
# "

DCBapUdfSU

"*
"

public DCBapUdfSU(CATUnicodeString iType = “”)


"

iType
"
public DCBapUdfSU(DCBapUdfSU& iRhs)
"

iRhs
"

public DCBapUdfSU& operator=(DCBapUdfSU& iRhs)

41
iRhs
"
+
"

public void addDoubleAttribute(char* iName)


"

iName
"
public void addIntegerAttribute(char* iName)
"

iName
"
public void addStringAttribute(char* iName)
"

iName
"
public HRESULT saveToCatalog(CATUnicodeString* iCatalogName,
CATUnicodeString* iClientId,
const char* iIFName =
“CATISpecObject”)
2 "

iCatalogName
".
"
iClientId
# "
iIFName
"
+
2S:T # "

B.3 Non-member functions


XX W:(
W/ " #
0 "

42

Development of a Modular API
for the CAD-System Catia V5
TOMAS FORS
Master’s Degree Project
Stockholm, Sweden 2004
TRITA-NA-E
Numerisk analys och datalogi
Department of Numerical Analysis
KTH
and Computer Science
100 44  Stockholm
Royal Institute of T
u0001u0002u0003u0002u0004u0005u0006u0007u0002b	
u0005u000b
f
u0007u0005
u000eu0004fu000f
u0010u0011u0012
u000bu0005u000f
	u0013u0002
u0014u0010u0001u0015u0016u0017u0016	u0002u0007
u0014f	u0018f
u0019u001a
 
 
 
Abstract 
u0001u0002u0003u0004u0005u0006u0007u0004b	
u000bu0004u0005bu0002	u0004u0003u0004u0005u0003u0004u0005u0007f
u000ebu0005bu0002	u0005u000f	u0010	u0011
u0012u0006	u0013bu0005
u0014u0005u0007u0013u0005
u0001u0002u0003u0002u0004u0005u0006u0007u0002b	
u0005u000b
f
u0007u0005
u000eu0004fu000f
u0010u0011u0012
u000bu0005u000f
	u0013u0002
u0014u0010u0001u0015u0016u0017u0016	u0002u0007
u0014f	u0018f
u0019u001a
 
!f"u0004u0002
u0005u000b
u001cu0005b	u0002b	u0016
u0005
# 
u0012b	u000fu0005
u000eu001c	u0018u0005b $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
u0001u0002u0003u0002u0004u0005u0006u0007u0002b	
u0005u000b
f
u0007u0005
u000eu0004fu000f
u0010u0011u0012
u000bu0005u000f
	u0013u0002
u0014u0010u0001u0015u0016u0017u0016	u0002u0007
u0014f	u0018f
u0019u001a
 
 
1 
1 Introduction 
u0019u0013u0005bu0002	u0005u0007u000eb
u0006
bu0003u0010	u0005u0003u0013u000fu000eu0004b
u001fu0005bu0002	
	u0005u0003u0004u0005u0016u000e

	u0013bu0011u001f
u0001u0002u0003u0002u0004u0005u0006u0007u0002b	
u0005u000b
f
u0007u0005
u000eu0004fu000f
u0010u0011u0012
u000bu0005u000f
	u0013u0002
u0014u0010u0001u0015u0016u0017u0016	u0002u0007
u0014f	u0018f
u0019u001a
 
 
2 
2 Purpose 
u0001u0002	u0005u0012u000e
u0012
u0004	u0005
u0014u0005bu0002u0003u0004u0005bu0002	u0004u0003u0004u0005#u0007u0004u0005b
u0005u0016
	u0007b	u0005u0007u0005u0004u0012	u0016u0003u0007u0011
u0001u0002u0003u0002u0004u0005u0006u0007u0002b	
u0005u000b
f
u0007u0005
u000eu0004fu000f
u0010u0011u0012
u000bu0005u000f
	u0013u0002
u0014u0010u0001u0015u0016u0017u0016	u0002u0007
u0014f	u0018f
u0019u001a
 
 
3 
3 Basic Concepts 
u0015u0005fu0007u0004u0003u0016u0005u000eu0013u000f	
u0004bu0007u0013u000fu0003u0013u0018u0005
u0014u0005u001cu0007bu0003u0007u0005 !u0005u0007u0004u0005#	u0011u0011u0005u0007
u0001u0002u0003u0002u0004u0005u0006u0007u0002b	
u0005u000b
f
u0007u0005
u000eu0004fu000f
u0010u0011u0012
u000bu0005u000f
	u0013u0002
u0014u0010u0001u0015u0016u0017u0016	u0002u0007
u0014f	u0018f
u0019u001a
 
 
4 
u0015u0005u0016
u0006u0012
u0013	u0013bu0005u0006
u000f	u0011u0005u0006u000eu0004bu0005u0007u0011u0004
u0005u0004	bu0005bu0002	u0005
u000eu0011	u0004u0005u0014
u0005bu0002	u0005u000fu0003u0014u0014	
	u0013bu0005b
u0001u0002u0003u0002u0004u0005u0006u0007u0002b	
u0005u000b
f
u0007u0005
u000eu0004fu000f
u0010u0011u0012
u000bu0005u000f
	u0013u0002
u0014u0010u0001u0015u0016u0017u0016	u0002u0007
u0014f	u0018f
u0019u001a
 
 
5 
u0001u0002	u0005.2u001c:.u0005u0014
u0007u0006	#
$u0005u0007u0011u0004
u0005bu0007$	u0004u0005u0016u0007
	u0005
u0014u0005u0006	u0006
u001fu0005u0006u0007u0013u0007u0018	u0006	u0013bu0005u0003u0004u0004u000e
u0001u0002u0003u0002u0004u0005u0006u0007u0002b	
u0005u000b
f
u0007u0005
u000eu0004fu000f
u0010u0011u0012
u000bu0005u000f
	u0013u0002
u0014u0010u0001u0015u0016u0017u0016	u0002u0007
u0014f	u0018f
u0019u001a
 
 
6 
u0007u0004u0005#	u0011u0011u0005u0007u0004u0005u0006u0007$u0003u0013u0018u0005u0003bu0005u0012
u0004u0004u0003fu0011	u0005u0014
u0005bu0002	u0005	u0013u000fu0005u000eu0004	
u0005b
u0005u0016
	u0007b	u0005u0007u0011u0011u0005

You might also like