You are on page 1of 510

Contents

Preface

1 Basics

1.1 Definition of CATScript and CATVBS

1.2 Definition of Nomenclature

1.3 Definition of Object, Class, and Object Path

1.3.1 Object and Class

1.3.2 Object Path

1.3.3 Root Class and Base Classes

1.4 Basic Example of a Macro

1.5 Selecting a Macro Editor

1.6 Storage of a Macro

1.6.1 Storage in a CATIA Document

1.6.2 Storage in a Separate File

1.7 Starting a Macro from a Button

1.7.1 Assigning a Macro to a Button

1.7.2 Creating a Toolbar

1.7.3 Assigning a Button to a Toolbar

1.8 Blocks of a Macro

1.8.1 Head of a Macro

1.8.2 Declaration of Global Variables and Objects

1.8.3 CATMain, Subroutines, and Functions

1.9 Branches and Loops


1.9.1 If-Then-Else

1.9.2 Select-Case-Else

1.9.3 For-Next

1.9.4 Do-While

1.9.5 Do Until

1.10 Anchor Objects of CATScript

1.10.1 CATIA-Application

1.10.2 CATIA Documents “CATPart” and “CATProduct”

1.10.3 Geometry Containers in CATParts

1.10.4 Structural Information and Metadata

1.11 Using the Macro Recorder

1.12 Additional Information

2 Communicating with the Environment

2.1 Screen Output and Input

2.1.1 Screen Output

2.1.2 Screen Input

2.2 Create, Load, and Save CATIA Documents

2.2.1 Creating Documents

2.2.2 Loading Documents

2.2.3 Saving Documents

2.3 User Selection of CATIA Elements

2.3.1 Selection before Starting a Macro

2.3.2 Selection during the Execution of a Macro


2.4 Searching and Recognizing Elements

2.4.1 Search

2.4.2 Recognize

2.5 Color and Hide Elements

2.5.1 Coloring Elements

2.5.2 Hiding Elements

2.6 Reading and Writing Data

2.6.1 Create or Declare a File

2.6.2 Reading Data

2.6.3 Writing Data

2.7 Executing External Programs and CATScripts

2.7.1 External Program

2.7.2 External CATScript

2.8 Reading Environment Variables

3 Components of CATParts

3.1 Attributes

3.1.1 Standard Attributes

3.1.2 Custom Attributes

3.2 Origin Elements

3.3 Bodies, Geometrical Sets, and Ordered Geometrical Sets

3.3.1 Bodies

3.3.2 Geometrical Sets

3.3.3 Ordered Geometrical Sets


3.3.4 Boolean Operations between Bodies

3.4 Parameters and Relations

3.4.1 Parameter

3.4.2 Design Table

3.4.3 Formulas

3.5 References

3.5.1 References to Geometry

3.5.2 References to Objects

3.5.3 References to Object Names

3.5.4 References to the Name of the Boundary Representation

3.6 Direction Definition

3.6.1 Direction Defined by a Vector

3.6.2 Direction Defined by an Object

4 Components of CATProducts

4.1 Attributes

4.2 Parameters and Formulas

4.3 Assembly Structure

4.3.1 Analyzing an Existing Structure

4.3.2 Adding Elements

4.3.3 Replacing Elements

4.3.4 Deleting Elements

4.4 Constraints
5 2D Wireframe Geometry

5.1 Sketch References and Sketch Objects

5.2 Creating Sketch Geometry

5.3 Defining Construction Elements and the Rotation Axis

5.4 Creating Constraints

6 3D Wireframe Geometry and Surfaces

6.1 General Procedure

6.2 Points

6.2.1 Methods for Creating Points

6.2.2 Case Studies: Points

6.3 Lines

6.3.1 Methods for Creating Lines

6.3.2 Case Studies: Lines

6.4 Planes

6.4.1 Methods for Creating Planes

6.4.2 Case Studies: Planes

6.5 Curves

6.5.1 Methods for Creating Curves

6.5.2 Case Studies: Curves

6.6 Surfaces

6.6.1 Methods for Creating Surfaces

6.6.2 Case Studies: Surfaces


6.7 Transformations

6.7.1 Methods for Creating Transformations

6.7.2 Case Studies: Transformations

6.8 Operations

6.8.1 Methods for Creating Operations

6.8.2 Case Studies: Operations

7 Solids

7.1 General Procedure

7.2 Sketch-Based Solids

7.2.1 Methods for Creating Sketch-Based Solids

7.2.2 Case Studies: Sketch-Based Solids

7.3 Surface-Based Solids

7.3.1 Methods for Creating Surface-Based Solids

7.3.2 Case Studies: Surface-Based Solids

7.4 Transformation-Based Solids

7.4.1 Methods for Creating Transformation-Based Solids

7.4.2 Case Studies: Transformation-Based Solids

7.5 Operations

7.5.1 Methods for Creating Operations on Solids

7.5.2 Case Studies: Operations

8 Featured Object Classes

8.1 Add
8.2 Angle

8.3 AngularRepartition

8.4 AnyObject

8.5 Application

8.6 Assemble

8.7 Axis2D

8.8 Bodies

8.9 Body

8.10 BooleanShape

8.11 BoolParam

8.12 CATBaseDispatch

8.13 Chamfer

8.14 Circle2D

8.15 CircPattern

8.16 CloseSurface

8.17 Collection

8.18 ConstRadEdgeFillet

8.19 Constraint

8.20 Constraints

8.21 ControlPoint2D

8.22 Curve2D

8.23 DesignTable

8.24 Dimension
8.25 Document

8.26 Documents

8.27 Draft

8.28 DraftDomain

8.29 DraftDomains

8.30 DressUpShape

8.31 EdgeFillet

8.32 Ellipse2D

8.33 FaceFillet

8.34 Factory

8.35 Factory2D

8.36 File

8.37 FileComponent

8.38 Files

8.39 FileSystem

8.40 Fillet

8.41 Folder

8.42 Folders

8.43 Formula

8.44 GeometricElement

8.45 GeometricElements

8.46 Geometry2D

8.47 Groove
8.48 Hole

8.49 HybridBodies

8.50 HybridBody

8.51 HybridShape

8.52 HybridShape3DCurveOffset

8.53 HybridShapeAffinity

8.54 HybridShapeAssemble

8.55 HybridShapeAxisLine

8.56 HybridShapeAxisToAxis

8.57 HybridShapeBlend

8.58 HybridShapeBoundary

8.59 HybridShapeCircle

8.60 HybridShapeCircle2PointsRad

8.61 HybridShapeCircle3Points

8.62 HybridShapeCircleBitangentPoint

8.63 HybridShapeCircleBitangentRadius

8.64 HybridShapeCircleCenterAxis

8.65 HybridShapeCircleCenterTangent

8.66 HybridShapeCircleCtrPt

8.67 HybridShapeCircleCtrRad

8.68 HybridShapeCircleExplicit

8.69 HybridShapeCircleTritangent

8.70 HybridShapeCombine
8.71 HybridShapeConic

8.72 HybridShapeConnect

8.73 HybridShapeCorner

8.74 HybridShapeCurveExplicit

8.75 HybridShapeCurvePar

8.76 HybridShapeCurveSmooth

8.77 HybridShapeCylinder

8.78 HybridShapeDirection

8.79 HybridShapeExtract

8.80 HybridShapeExtractMulti

8.81 HybridShapeExtrapol

8.82 HybridShapeExtremum

8.83 HybridShapeExtremumPolar

8.84 HybridShapeExtrude

8.85 HybridShapeFactory

8.86 HybridShapeFill

8.87 HybridShapeFilletBiTangent

8.88 HybridShapeFilletTriTangent

8.89 HybridShapeHelix

8.90 HybridShapeIntegratedLaw

8.91 HybridShapeIntersection

8.92 HybridShapeInverse

8.93 HybridShapeLawDistProj
8.94 HybridShapeLineAngle

8.95 HybridShapeLineBisecting

8.96 HybridShapeLineBiTangent

8.97 HybridShapeLineExplicit

8.98 HybridShapeLineNormal

8.99 HybridShapeLinePtDir

8.100 HybridShapeLinePtPt

8.101 HybridShapeLineTangency

8.102 HybridShapeLoft

8.103 HybridShapeNear

8.104 HybridShapeOffset

8.105 HybridShapePlane1Curve

8.106 HybridShapePlane1Line1Pt

8.107 HybridShapePlane2Lines

8.108 HybridShapePlane3Points

8.109 HybridShapePlaneAngle

8.110 HybridShapePlaneEquation

8.111 HybridShapePlaneExplicit

8.112 HybridShapePlaneMean

8.113 HybridShapePlaneNormal

8.114 HybridShapePlaneOffset

8.115 HybridShapePlaneOffsetPt

8.116 HybridShapePlaneTangent
8.117 HybridShapePointBetween

8.118 HybridShapePointCenter

8.119 HybridShapePointCoord

8.120 HybridShapePointExplicit

8.121 HybridShapePointOnCurve

8.122 HybridShapePointOnPlane

8.123 HybridShapePointOnSurface

8.124 HybridShapePointTangent

8.125 HybridShapePolyline

8.126 HybridShapePositionTransfo

8.127 HybridShapeProject

8.128 HybridShapeReflectLine

8.129 HybridShapeRevol

8.130 HybridShapeRotate

8.131 HybridShapes

8.132 HybridShapeScaling

8.133 HybridShapeSection

8.134 HybridShapeSphere

8.135 HybridShapeSpine

8.136 HybridShapeSpiral

8.137 HybridShapeSpline

8.138 HybridShapeSplit

8.139 HybridShapeSurfaceExplicit
8.140 HybridShapeSweep

8.141 HybridShapeSweepCircle

8.142 HybridShapeSweepConic

8.143 HybridShapeSweepExplicit

8.144 HybridShapeSweepLine

8.145 HybridShapeSymmetry

8.146 HybridShapeThickness

8.147 HybridShapeTranslate

8.148 HybridShapeTrim

8.149 Hyperbola2D

8.150 Intersect

8.151 IntParam

8.152 KnowledgeObject

8.153 KnowledgeActivateObject

8.154 Length

8.155 Limit

8.156 Line

8.157 Line2D

8.158 LinearRepartition

8.159 Loft

8.160 Mirror

8.161 OrderedGeometricalSet

8.162 OrderedGeometricalSets
8.163 OriginElements

8.164 Pad

8.165 Parabola2D

8.166 Parameter

8.167 Parameters

8.168 Part

8.169 PartDocument

8.170 Pattern

8.171 Plane

8.172 Pocket

8.173 Point

8.174 Point2D

8.175 Prism

8.176 Product

8.177 ProductDocument

8.178 Products

8.179 RealParam

8.180 RectPattern

8.181 Reference

8.182 References

8.183 Relation

8.184 Relations

8.185 Remove
8.186 RemoveFace

8.187 Repartition

8.188 ReplaceFace

8.189 Revolution

8.190 Rib

8.191 Rotate

8.192 Scaling

8.193 Scaling2

8.194 SelectedElement

8.195 Selection

8.196 SewSurface

8.197 Shaft

8.198 Shape

8.199 ShapeFactory

8.200 Shapes

8.201 Shell

8.202 Sketch

8.203 SketchBasedShape

8.204 Sketches

8.205 Slot

8.206 SolidCombine

8.207 Spline2D

8.208 Split
8.209 Stiffener

8.210 StrParam

8.211 SurfaceBasedShape

8.212 Sweep

8.213 Symmetry

8.214 SystemService

8.215 TextStream

8.216 Thickness

8.217 ThickSurface

8.218 Thread

8.219 TransformationShape

8.220 Translate

8.221 Trim

8.222 TritangentFillet

8.223 UserPattern

8.224 VarRadEdgeFillet

8.225 VisPropertySet

9 Featured VBScript Commands

9.1 Abs

9.2 Asc

9.3 Boolean

9.4 Byte

9.5 CBool
9.6 CByte

9.7 CDate

9.8 CDbl

9.9 Chr

9.10 CInt

9.11 CLng

9.12 Const

9.13 Cos

9.14 CSng

9.15 CStr

9.16 Date

9.17 Day

9.18 Dim

9.19 Dim ()

9.20 Double

9.21 Do-Until

9.22 Do-While

9.23 Empty

9.24 End

9.25 Err

9.26 Exit

9.27 Exp

9.28 Fix
9.29 For-Next

9.30 Function

9.31 Hour

9.32 If-Then-Else

9.33 InputBox

9.34 InStr

9.35 Int

9.36 Integer

9.37 IsDate

9.38 IsEmpty

9.39 IsNull

9.40 IsNumeric

9.41 Join

9.42 LCase

9.43 Left

9.44 Len

9.45 Log

9.46 Long

9.47 LTrim

9.48 Mid

9.49 Minute

9.50 Mod

9.51 Month
9.52 MsgBox

9.53 Now

9.54 Null

9.55 On Error Resume Next

9.56 Randomize

9.57 ReDim

9.58 Rem

9.59 Right

9.60 Rnd

9.61 RTrim

9.62 Second

9.63 Select Case

9.64 Set

9.65 Sin

9.66 Single

9.67 Sgn

9.68 Sqr

9.69 StrReverse

9.70 String

9.71 Sub

9.72 Tan

9.73 Time

9.74 Timer
9.75 TimeValue

9.76 Trim

9.77 UCase

9.78 Year
Index

Preface
Among today’s computer-aided design (CAD) systems, CATIA (Computer-Aided Three-
dimensional Interactive Application) is one of the most widely used in the world. CATIA V5
allows users to automatically create components and reduce repetitive tasks through macros.
With pure parametric 3D models this functionally is simply not possible. Unfortunately, there are
few books that address the specific concerns of macro programming with CATIA V5. The help
documentation of the CATIA V5 macro interface is often too narrow and incomplete. This
practical book provides an introduction to the automated creation of CATParts, CATProducts,
and geometry. The questions a beginner will face during the process of macro programming are
answered clearly and efficiently. An advanced user will find many suggestions in the macro
examples, explained in detail and documented with in-depth descriptions. This book deals with
the macro programming of CATScript and CATVBS languages, an extension of Microsoft’s
“Visual Basic Script” (MS VBScript). Therefore CATScript and CATVBS are platform-
independent and run on Windows and UNIX.
Readers of this book should have a basic knowledge of CATIA V5. The focus is on users of
CATIA V5 applications who want to automate repetitive tasks of daily work.
Knowledge in the following areas is recommended for beginners (Table 0.1):
Basic knowledge of modeling with CATIA V5 Part Design (PDG), Assembly Design (ASD),
Wireframe & Surface Design (WSD), or Generative Shape Design (GSD)
Basic knowledge of any programming language
TABLE 0.1 Scope of V5 Macro Programming in This Book

This book is organized into sections, from the requirements of a beginner to that of an advanced
user. The following topics will be covered:
Basics
Communication with the Environment
Components of CATParts
Components of CATProducts
2D Wireframe Geometry
3D Wireframe Geometry and Surfaces
Solids
Featured Object Classes
Featured VBScript Commands
The chapter “Basics” gives an introduction to how V5 macros are created. It contains the
fundamental knowledge that is required for macro programming. It shows how macros are
created, stored, and executed as well as interactions with the user for input and output.
The chapter “Communication with the Environment” is based on practical examples of how
V5 macros can communicate with the system environment or the user. Through clear
descriptions, it is also possible for a beginner to develop their macros involving a user.
The chapters “Components of CATParts” and “Components of CATProducts” explain how
to create a macro and the requirements for creating geometry. This is the foundation of all
Bodies, Geometrical Sets, and Product Structures.
The chapters “2D Wireframe Geometry,” “3D Wireframe Geometry and
Surfaces,” and “Solids” provide the foundation of how geometry can be created by a V5
macro. Numerous case studies illustrate these important concepts and best practices.
If readers have worked through the previous chapters and case studies, the last two
chapters “Featured Object Classes” and “Featured VBScript Commands” allow them to
solve their own practical tasks.

The theory of this book is supported in many places with sample macros. Many of the examples
are available online at www.mhprofessional.com/catiav5 for download. Examples that can be
downloaded from the Internet are identified by a yellow round stamp with “WWW” inside.
The contents of this book are based on the software version “V5R19.” It is important to note
that with each release, Dassault Systémes adds
more methods of programming, but existing methods are only very rarely changed. This book
can be used with higher software versions.

1. BASICS
This chapter will introduce users to programming macros in CATIA V5 with Visual Basic Script
(VBScript). The following topics are covered:
Basic concepts of VBScript
General structure of a macro
Icons and storage of a macro
Macro editor
Macro recorder

1.1 Definition of CATScript and CATVBS

CATScript and CATVBS are both VBScript programming languages. Both macro languages
work with objects and methods. An object is a container that stores information. This information
could be a CATPart, a line, or a surface. A method is an instruction from which an object is
created or modified, or from which information is read.
CATVBS is a type of Microsoft VBScript (MS VBScript) that is extended to objects and methods
of CATIA V5. Up to V5R7, CATVBS only ran on Windows machines. From V5R8 on, Dassault
Systémes have expanded their programming so that CATVBS also operates on UNIX
workstations.
CATScript is a variant of MS VBScript that is designed to run on UNIX and Windows.
CATScript was able to run on both platforms prior to V5R8.
CATScript and CATVBS are interpreter languages that serve as the foundation for programming
macros in CATIA V5. Macros that are written in CATScript or CATVBS can be used
on Windows 7, Vista, XP, NT, 98and 2000, and UNIX operating systems.
Programming CATIA macros with Visual Basic for Applications (CATVBA) offers more
capabilities for CATIA V5. CATVBA has a compiler and provides many tools for designing user
interfaces. These two points distinguish it from CATScript and CATVBS. An overview of all three
languages is shown in Table 1.1.
TABLE 1.1 Overview of the Macro Languages in CATIA V5

The program syntaxes of CATScript, CATVBS, and CATVBA are very similar. By making slight
changes, program components are very easily transferred from one platform to another, as long
as other methods and objects in that platform are available. In most cases, the three languages
differ only in the way that variables, functions, and procedures are defined. An overview of these
differences is illustrated with a small sample program in Table 1.2. The differences are
highlighted in bold.
TABLE 1.2 Differences between CATScript, CATVBA, and CATVBS
Since CATScript through its history has the closest connection with CATIA V5, all programming
examples and source code in this book are based on CATScript. Through the differences shown
in Table 1.2, the examples can very easily be transferred into CATVBS.

1.2 Definition of Nomenclature


Nomenclature explains the definition of terms used in the following sections. This book outlines
how instructions are used by CATScript. An instruction may be:
A general description
An example of the source code in a macro
Word
A general description provides all the capabilities of the commands in an instruction. One
example describes a string that is used in a specific application.
An instruction is usually composed of several words. A word is the smallest unit of an instruction.
Two words are separated, depending on the application, by a period, a comma, or a space.
Important words in a general description and in examples are highlighted in bold.
Example 1.1: Highlighting Important Words

Additional information of a general description can be enclosed in square brackets or braces.


[Self-defined word]
A square bracket encloses words that can be defined by a programmer. A self-defined word can
be a name or the contents of memory location. If the memory location is defined by a
programmer, it is called a Variable. A memory location for an object or a subroutine is called
a Parameter. The information following a square bracket with the keyword “As” determines the
type of variable or parameter. If several variables or parameters have the same type, they can
be listed within the same square bracket.
Example 1.2: Description of Variables and Parameters
General Description:

Code in the macro:

{Optional word}
A curly brace encloses optional words that do not need to be written. A programmer can
determine the number of words that are shown by a comma and three periods.
Example 1.3: Optional Words
General Description:

Code in the macro:

1.3 Definition of Object, Class, and Object Path


CATScript is an object-oriented programming language, so in order to program CATScript it is
necessary to understand a few basic principles of an object-oriented language.
1.3.1 Object and Class

An Object is a container that stores information. Each object is assigned a class. A Class is a
description of the information structure of objects of the same object type. Within a class’s
properties and methods, each object has a class.
A Property is a characteristic of an object. A property is usually being read or changed through
the value of its parameter. Some properties can only be read but not changed. In this case the
property is referred to as having “read only” access.
A Method is an instruction used to modify an existing object or create a new one. A method can
have multiple input parameters and output parameters. An output parameter is the result of
applying a method. If a method has an output parameter, then it is called either a function
(Func) or a subroutine (Sub).
Example 1.4: Properties and Methods of the “Line” Class
Properties: Start Point, End Point, Length (Read Only)
Methods: Sub Set _Start Point, Sub Set _End Point
Each object of the “Line” class has a start point and an end point that can be assigned. The
length of a line can be read but not written. Both methods do not have an output parameter
because they are subroutines.
1.3.2 Object Path

The classes of CATScript are hierarchically structured. A hierarchical structure has parent and
child classes. A parent class summarizes a group of child classes and provides the basic
methods and properties available for these classes. The deeper a class is placed, the more
specialized are its objects. An object can access all properties and methods of its class and the
parent classes. This dependency describes the object path of an object. An Object Path is the
explanation of the dependencies of an object from its class and parent classes. In the case of
an object path, classes are separated by periods, and child classes are written to the right:

Example 1.5: Object Path of Pads and Pockets


Class hierarchy n: Solid
Class hierarchy n+1: Contour-based Solid
Class hierarchy n+2: Pad, Pocket
Object Paths: ….Solid.Contour-based Solid.Pad
….Solid.Contour-based Solid.Pocket
An object of the “Pad” class can use the properties and methods of the “Solid,” “Contour-based
Solid,” and “Pad” classes but not the “Pocket” class. The hierarchy is illustrated in Table 1.3.
TABLE 1.3 Example of a Class Hierarchy

1.3.3 Root Class and Base Classes

A complete object path begins with a root class. A Root Class is the class that stands on the
top hierarchy level and from which all other classes and objects are derived.
The root class of all objects in CATScript is the CATBaseDispatch class (Section
8.12). CATBaseDispatch has no properties or methods. From CATBaseDispatch, the two
subordinate base classes are derived from AnyObject for individual objects and Collection for
list objects (Table 1.4). In the case of an object’s path, the root class CATBaseDispatch is
typically not written but started directly with a base class.
TABLE 1.4 Root Class and Base Classes of CATScript

An Individual Object is a container for geometry or other information. Each object path of an
individual object begins with the base class AnyObject (Section 8.4). AnyObject provides basic
methods for each individual object.
A List Object is a collection of individual objects. Each object path of list objects begins with the
base class Collection (Section 8.17). Collection provides basic methods for each list object.
Example 1.6: Object Paths for Individual and List Objects

1.4 Basic Example of a Macro


For a practical understanding of the sections below, the foundational theory of programming is
started with a basic example. In the “GreetingMacro.CATScript” macro, a user is greeted with
the text “Hello.” In order to prepare the input of the macro, follow these steps:
Start CATIA V5
Create new CATPart via “File/New”
Select “Tools/Macro/Macros” (or press ALT+F8) from the menu bar
The “Macros” window (Figure 1.1) shows all the macros that are available for immediate
execution. The window is fully explained in Section 1.6. Initially the list is empty.
FIGURE 1.1 Macros window

The next step is to create a new macro and name it “GreetingMacro.CATScript” (Figure 1.2):

FIGURE 1.2 “Create a new macro” window

Select the “Create…” button


Select “CATScript” as the Macro language
Enter “GreetingMacro.CATScript” as the Macro name
Select the “OK” button
Now the “GreetingMacro.CATScript” macro has been created and will appear in the “Macros”
window (Figure 1.3).

FIGURE 1.3 “Macros” window with the “Greeting-Macro. CATScript” macro

A macro can be edited using the internal V5-Editor. The V5-Editor is a simple text entry tool,
comparable to “Notepad” in Windows.
Select the “Edit…” button
CATIA V5 opens the V5-Editor and the source code of the macro, “GreetingMacro.CATScript,”
is shown (Figure 1.4).

FIGURE 1.4 Internal V5-Editor

The main part of a macro is defined at the beginning and the end of the source code with the
following expressions:

All commands between or above these two lines are run each time a macro is called. To
complete the macro, the word “Hello” is added to a command, generating a dialog box. The
commands for input and output on the screen are explained in detail in Section 2.1.

A macro can be saved by selecting the disk icon of the V5-Editor. The macro
“GreetingMacro.CATScript” is stored, in this case, in the current document “Part1.CATPart”
(Figure 1.3). The V5-Editor will close, and the macro can be run.
Select the “Save” button (disk icon)
Select “File/Exit” in the V5-Editor
Select the “Run” button in the “Macros” window
This will start the macro. During the execution, a review of the program logic and syntax will be
made. Since it is an interpreted language, the macro is executed line by line. If the interpreter
finds an error, the macro is canceled during the run. If the source code of the macro is correct,
the greeting “Hello!” will be seen on the screen (Figure 1.5).

FIGURE 1.5 Output of the macro “GreetingMacro.CATScript”

With this basic example, all steps are shown that are necessary for the entry and execution of a
macro. The following sections show how to edit, load, save, and run a macro.

1.5 Selecting a Macro Editor


In the previous section, the Internal V5-Editor was used. The internal V5-Editor is a very simple
text editor, which is granted as the default editor in CATIA V5. It is utilized automatically when a
macro is being processed. An overview of the functionality is provided in Table 1.5.
TABLE 1.5 Functionality of the internal V5-Editor
It is possible to choose a different editor to edit a macro. During the execution of a CATIA V5
macro, the editor will start automatically and is defined by the options in V5. The options window
is found under “Tools/Options/General/Macros” (Figure 1.6).
FIGURE 1.6 Options window to select a macro editor

For smaller macros, the internal V5-Editor is quite sufficient. However, for intensive macro work,
it can be convenient to have a more powerful editor. Select the “Change editor” button to
choose a different editor. The “Default editor” button resets the editor option back to the original
state, as shown in Figure 1.6.

1.6 Storage of a Macro


A macro can be stored in two ways:
1. storage in a CATIA document (*.CATPart, *.CATProduct, *.CATDrawing)
2. storage in a separate file (*.CATScript)

In the first case, a macro is stored inside of a CATIA document. Thus, a macro and a CATIA
document are closely linked. A CATIA document is a part, product, or a drawing. It can contain
multiple macros.
In the second case, a macro is stored inside a folder with the file type “*.CATScript” and can be
used independently of a CATIA document.
1.6.1 Storage in a CATIA Document
In the “Macros” window and from the “Current macro library or document:” drop-down (Figure
1.7), select a CATIA document. A macro that is created via the “Create…” button is stored in
this document. A list of “Available macros” in the “Macros” window shows all the macros that are
stored in the selected document. The “Run” button starts the selected macro.

FIGURE 1.7 “Macros” window and available macros in a CATIA document

1.6.2 Storage in a Separate File

If a macro is stored in a separate file, you should define a macro library before you create the
macro. A Macro Library is a directory where macros are stored, and CATIA is directed to their
location. By using a macro library, a user receives quick access to all of the macros within the
selected directory.
A macro library is created in the “Macro libraries” window (Figure 1.8). It appears by clicking the
“Macro libraries” button in the “Macros” window. If programmed with CATScript as the library
type, it is seen in the “Directories” drop-down. The other types are based on programming with
VBA (see Section 1.1). The list in the “Current libraries:” field displays all currently defined
macro libraries of one library type. To add a new directory to the list, select the “Create new
library…” button.
FIGURE 1.8 “Macro libraries” window with a list of current libraries

In the “Macros” window, a macro library can be selected from the “Current macro library or
document:” drop-down (Figure 1.9). The list of “Available macros:” shows all macros in a macro
library.

FIGURE 1.9 “Macros” window with a macro in the macro library “C:\Temp”

To create a new macro and add it to a macro library, select the “Create…” button. This opens
the “Create a new macro” window (Figure 1.10), which defines a new macro. Select “OK” to
store the macro in the current macro library.

FIGURE 1.10 “Create a new macro” window


To run a macro from a separate file, open the “Macros” window, choose the appropriate macro
from the list, and select “Run.”
When using macros extensively, it can be repetitive to always open the “Macros” window and
select the appropriate macro library and macro. A shorter way is to run a macro from a button.

1.7 Starting a Macro from a Button

A macro that is stored in a separate file (see Section 1.6.2) can be assigned to a button. A
button can be added to a toolbar and displayed on the user interface of CATIA. A toolbar is a
group of icons that is defined by a user via the command “View/Toolbars.” Toolbars can be
shown or hidden.
To show a macro as a button on the user interface, follow these steps:
1. Assign a macro to a button
2. Create a toolbar
3. Assign the button to the toolbar
1.7.1 Assigning a Macro to a Button

A macro can be assigned to a button:


Select “Tools/Customize” from the menu bar and then move over to the “Commands” tab. In the
“Categories” column, scroll down and select “Macros.” In the “Commands” column on the right,
a list of all macros in the currently selected library will be displayed (Figure 1.11). If no macros
are visible, review the selected macro library (see Section 1.6.2). An icon can be assigned to a
macro button by highlighting the desired macro in the “Commands” list and selecting the “Show
Properties” button. Pick an icon from the “Icon Browser” button, or navigate to an icon through
the button folder. Selecting an icon automatically assigns it to the macro button. Selecting
“Reset…” returns the macro’s button icon to the original state.

FIGURE 1.11 Customize window with “Commands” current macros list

1.7.2 Creating a Toolbar


A toolbar displays a group of buttons and is always assigned to a work environment.
A work environment is a workbench (e.g. “Part Design,” for the modeling of solids). A
workbench is the workspace that is active in the CATIA session. By assigning a toolbar to a
workbench, the toolbar is available and can be controlled by users.
The list of all toolbars in the current work environment is located in the “Toolbars” tab of the
“Customize” window (Figure 1.12). The window will open with the command “Tools/Customize.”

FIGURE 1.12 Customize window “Toolbars” tab

By selecting “New,” a new toolbar is created in the current workbench and the “New Toolbar”
window opens (Figure 1.13). This is a toolbar, which can be given a descriptive name. The “OK”
button closes the window, and the new toolbar is added to the “Toolbars” tab of the “Customize”
window (Figure 1.14).
FIGURE 1.13 “New Toolbar” window

FIGURE 1.14 “Customize” window, Toolbars tab with user-defined toolbar “My Macros”

1.7.3 Assigning a Button to a Toolbar

Assigning a button to a toolbar is controlled through the “Customize” window with the “Toolbars”
tab. In the “Toolbars” tab, select a toolbar and then add a button by selecting the “Add
commands…” button (Figure 1.14).
This will open the “Commands list” window, and then the desired command can be assigned
(Figure 1.15). The macros of the current macro library are listed in the “Commands list.” Click
“OK” to add the macro button to the toolbar and complete the process.

FIGURE 1.15 “Commands list” window

1.8 Blocks of a Macro


A Block is a group of instructions in the source code of a macro. Together they include
organizational or logical commands. The source code of a macro is usually composed of the
following blocks:
1. Head of a macro
2. Declaration of global variables and objects
3. Main block “CATMain”
4. Subroutines and functions that are called from “CATMain”
1.8.1 Head of a Macro

The head of a macro contains descriptive information about the name, author, and function of
the macro as well as important information for the maintenance of the code. This information
typically includes:
Macro name
Version description
Macro language
Brief description of what the macro does
Author and date of creation
Details of a revision (date, person modifying the code, change description)
This information is stored in comment lines. A comment line begins with a single quote and is
ignored when a macro is executed (see Section 9.58).

You may need to tell a user what version of a macro is currently being used. In order for this
information to be understood it is recommended not to open a macro’s source code, but instead
complement the head of a macro with one line of code that displays this information. This can
be done with the StatusBar property of the Application class (Section 8.5). An object of
the Application class directly represents CATIA (Section 1.10.1).

Example 1.7: Head of a Macro


At the beginning of the macro “DRILLTABLE.CATScript,” the name and version of the macro
are displayed in the status bar of CATIA (Figure 1.16).
FIGURE 1.16 Example of “Head of a Macro”

1.8.2 Declaration of Global Variables and Objects

Global variables and objects are declared in the next block. A global variable or object is an
element that is available in all functions and subroutines of a macro.
The declaration of a single variable or an object is done via the Dim statement Dim () (Section
9.19). A variable or object can be single- or multi-dimensional.

A list of classes is in Chapter 8. The main variable types are:


Boolean: Logical statement (“True” or “False”)

CATBStr: String of CATIA expressions (e.g. “Pad.1”)

CATSafeArrayVariant: Field of CATIA expressions (mostly coordinates)

CATVariant: Index of a list of objects (integer or object)

Double: Floating point with double precision


Integer: Integer

Long: Integer with an increased range

String: String
It is recommended to assign a start value to a global variable or an object. The assignment of
an object to a variable is made by using “=” and the command Set:

Example 1.8: Declaration of Global Variables and Objects


In a macro, the global “input” and “output” variables are declared as a text, and “numbers” are
declared as integers. The global object “Document” is declared as the object type “Document.”

1.8.3 CATMain, Subroutines, and Functions

The head of the macro and global declarations are followed by the macro block “CATMain,”
which contains subroutines and/or functions. CATMain and the following subroutines and
functions can include global and local variables and objects. A local variable or local object is
only valid within its respective range and is similar to a function or subroutine that declares a
global variable or a global object (Section 1.8.2).
1.8.3.1 CATMain

“CATMain” is the main block of a macro from which instructions are run each time the macro is
executed:

Within “CATMain” you should place just a few critical lines of code in a macro and then access
additional code by calling subroutines (Sub) and/or functions (Function). This way the source
code is easier to read. A subroutine or function can be called multiple times by CATMain. Calls
to other subroutines and functions are possible within a subroutine or function.
1.8.3.2 Subroutines
A subroutine is a sequence of instructions that performs an action. A call is made via the name
of the subroutine followed by an optional parameter list:

Declaring a subroutine is performed between the Sub and End Sub statements:

Example 1.9: Subroutine


The subroutine “MultiplicationOutput” is called several times within the “CATMain” block. A
dialog box displays the result of multiplying two integers.

1.8.3.3 Functions

A function is a sequence of instructions that returns a single value. A function can be passed to
parameters while it is being called. Parameters are written after the function name in brackets:

Declaring a function is performed between the Function and End Function statements:

The return value is assigned to the variable with the function name.
Example 1.10: Function
The function “Multiplication” multiplies two integers and returns the result of the multiplication.
The return value is displayed in a dialog box.
1.9 Branches and Loops
A branch is a control that determines the basis of testing a criterion from which instruction
blocks are run in a macro. A branch is defined by the statement “If-Then-Else” or “Select-Case-
Else.”
A loop is a series of instructions that are executed repeatedly. In CATScript there are three
types of loops, which are defined by the statements “For-Next,” “Do While,” and “Do-Until.”
1.9.1 If-Then-Else

“If-Then-Else” describes a branch that separates two instruction blocks. A branch needs a
criterion to decide whether the first or the second instruction block is executed. If the criterion of
a branch is met, the instruction block is executed after the “Then” statement. If the test criterion
is not met, the instruction is executed according to the “Else” statement. The “Else” statement is
optional and can be omitted. The general syntax of the statement “If-Then-Else” is:

The instruction that follows is the “Then” statement next an “End If” statement, and the “Else”
statement is optional. “End If” marks the end of the “If-Then-Else” statement.
Example 1.11: If-Then-Else

Several criteria can be linked by the words “And” and “Or” to other complex criteria. The “And”
statement specifies that both test criteria must be met. The “Or” statement specifies that one
criterion must be met by either instruction. The word “Not” negates a criterion. Multiple criteria
can also be nested in brackets. Examples are given in Table 1.6.
TABLE 1.6 Examples of Criteria

1.9.2 Select-Case-Else

“Select-Case-Else” describes a branch separated by two or more instruction blocks. “Select-


Case-Else” is more powerful than an “If-Then-Else” statement. The instruction block begins with
the keyword “Case.” The keyword is followed by the test criterion and the instruction block itself.
The criterion is a test value or a list of multiple test values. An instruction block is executed only
if the test value or one of the test values matches the keyword “Case.” If no matching value is
found, the “Case Else” statement is run if it exists; otherwise the macro runs through the
instruction block.

Example 1.12: Select-Case-Else

1.9.3 For-Next

“For-Next” describes a loop that is controlled by a counter. The counter has an initial and a final
value. The counter begins with an initial value, which is incremented by a fixed step size value
toward a final value. If no increment is defined, the step size value is equal to 1. “Next” indicates
the end of the loop. The general syntax for a “For-Next” loop is:
The “Exit For” statement terminates the loop. With this statement the macro moves to the next
statement after the line “Next.” To keep the code organized, this statement should be rarely
used.
Example 1.13: For-Next
This example demonstrates a loop that adds up the numbers “1” to “10” and stores the value in
the variable “Sum.”

1.9.4 Do-While

“Do-While” describes a loop with an input criterion that runs as long as the test criterion of the
loop is met. The test criterion is checked at the beginning of the loop and before each new run.
Test criteria that have not fulfilled the instructions of the loop is skipped. The “Loop” statement
marks the end of the loop. The general syntax of “Do-While” is:

The “Exit Do” statement terminates the loop. With this statement the macro moves to the next
statement after the line “Loop.”
Example 1.14: Do-While
This example demonstrates a loop that adds up the numbers “1,” “2,” “3,” …, as long as the sum
is less than “100.”
The result is “105”.
1.9.5 Do Until

“Do Until” describes a loop with an initial criterion that runs until the test criterion is met. The
criterion is checked after each iteration of the loop and the loop is executed at least once. “Loop”
marks the end of the loop. The general syntax of “Do Until” is:

The “Exit Do” statement terminates the loop. With this statement the macro moves to the next
statement after the line “Loop.”
Example 1.15: Do Until
This example demonstrates a loop that adds up the numbers “1,” “2,” “3,” …, until the sum is
greater than “50” or an addend of “10” is reached.

The result is “55.”

1.10 Anchor Objects of CATScript


An Anchor Object is an object that is required in every macro to access the elements of CATIA.
There are four major anchor objects in CATScript when solid, wireframe, surfaces, and product
structures are created:
The CATIA application itself
A CATIA document, “CATPart,” or “CATProduct”
The container of the geometric elements of CATParts
The container for structural information and metadata of CATProducts or CATParts
1.10.1 CATIA-Application

The main anchor object is an object of the Application class (Section 8.5) that represents the
application CATIA V5. The CATIA V5 application is described with the CATIA label.
Example 1.16: Creating the Anchor Object CATIA V5

All objects are derived through this anchor object’s properties and methods. A CATIA document
and the provided communication services with an operating system are shown in Figure 1.17.
FIGURE 1.17 Content of the anchor object in the “Application” class (Source: Online
Documentation of Dassault Systémes)

A list of all CATIA V5 application windows are shown with the Windows property of the anchor
object (Figure 1.17, top right). The current window is accessed by the ActiveWindow property.

A list of all open CATIA documents in the CATIA V5 application are shown with
the Documents property (Figure 1.17, top left). The current CATIA document is accessed by
the ActiveDocument property.
The FileSystem, Printer, and SystemService properties providing communication services
between the CATIA V5 application and an operating system are shown (Figure 1.17, bottom
right).

The properties of the Application class will be explored in Chapter 2.


1.10.2 CATIA Documents “CATPart” and “CATProduct”

A CATIA document is all of the data stored in one file type, whether it is a “CATPart,”
“CATDrawing,” or “CATProduct.” The parent class of all CATIA documents is
the Document class (Section 8.25). For each document type of CATIA V5, there is a
specialized class whose parent class is the Document class. For a CATPart, this is
the PartDocument class (Section 8.16.9) ; for a CATProduct, this is
the ProductDocumentclass (Section 8.17.7).
If the ActiveDocument property of the Application class is declared, which is an object of a
current CATIA document (Section 1.10.1), the correct class of the document is automatically
determined. For example, if a CATIA document is a CATPart, the ActiveDocument is
automatically a PartDocument. Additional information on how to create, load, and store a
CATIA document is in Section 2.2.
Example 1.17: Creating the Anchor Object of a CATIA Document
A user has opened a CATIA document, and the macro “Document” is an object of this document.
The macro assigns and displays the document name in a dialog box.

1.10.3 Geometry Containers in CATParts

The geometry of a CATPart is an object of the Part class (Section 8.168) and is assigned to the
third anchor object. The anchor object is derived using the Part property of
the PartDocument class.

All other objects are derived from the geometric content of a CATPart through the methods and
properties of the third anchor object (Figure 1.18).
FIGURE 1.18 Content of an anchor object in the “PartDocument” and “Part” classes (Source:
Online Documentation of Dassault Systémes)

The origin planes and axis systems used in CATParts are accessed by
the OriginElements and AxisSystems properties (Figure 1.18, top left).
Bodies can be accessed through the Bodies properties and Geometrical
Sets through HybridBodies and OrderedGeometricalSets properties (Figure 1.18, bottom left
and top right).
Constraints, relations, and parameters (Figure 1.18 right, center) are accessed through
the Constraints, Relations, and Parameters properties.
Toolboxes are used in CATScript to create geometry. A toolbox is a class that provides methods
to create geometry. The set of all toolboxes are summarized in the Factory class.
The ShapeFactory property represents a toolbox for solid shapes, and
the HybridShapeFactory property represents a toolbox for wireframe geometry and surfaces
(Figure 1.18, bottom right).
The properties outlined in this section are explained in further detail in Chapters 3 to 7.
1.10.4 Structural Information and Metadata

The structural information of CATProducts is the list of all elements inside of a CATProduct. The
metadata of CATParts or CATProducts are general attributes such as the Transformation Matrix,
Part Number, or Version. The structural information and metadata of CATProducts or CATParts
are stored in an object of the Product class (Section 8.176). An object of the class can be
derived via the Product property of the PartDocument class (Section 8.169)
and ProductDocument class (Section 8.177).

Through the methods and properties of this fourth anchor object, all other objects that represent
the attributes and product structures are defined (Figure 1.19).
FIGURE 1.19 Content of the anchor object in the “Product” class (Source: Online
Documentation of Dassault Systémes)
The product structure of CATProducts is stored in a Products list object. This list object stores
the Product elements that are used in a CATProduct.
The parameters, formulas, constraints, and publications of CATProducts are stored in
the Parameters, Relations, Constraints, FixTogethers, and Publications list objects.
Other Product object properties describe the transformation matrix, which controls the
positioning of a CATParts or CATProducts within an assembly.
Metadata (e.g. Part Number, Version) of CATProducts or CATParts can be accessed through
the Part Number, Revision, Definition, Nomenclature,
Source, and DescriptionRef properties, shown in Figure 1.19.
The properties outlined in this section are explained in further detail in Chapters 3 to 7.

1.11 Using the Macro Recorder


CATIA V5 has a macro recorder that records the individual steps of a user and converts these
steps into source code. This recording may not always be complete and typically does not meet
the requirements for organized programming. However, it does record valuable insight for
objects and methods.
The macro recorder will start from the “Tools/Macro/Start Recording…” menu (Figure 1.20).

FIGURE 1.20 Starting the macro recorder

The macro recorder opens the “Record Macro” dialog box. Here the macro language, location,
and name of the macro are defined. Select the “Start” button to begin recording (Figure 1.21).

FIGURE 1.21 “Record macro” dialog box

CATIA now records and converts the actions that a user performs. A recording ends with the
selection of the “Stop” button (Figure 1.22). The button is only shown during a recording and is
displayed automatically.
FIGURE 1.22 Stop recording button

1.12 Additional Information


With the basics of this book, a user will quickly be able to write their own macros. If the scope of
any macro is outside of creating wireframe, surfaces, and solids, the following sources provide
additional information:
“Programming Interface” in the online documentation of CATIA V5 for Classes, Objects,
Properties, and Methods (Figure 1.23)
www.microsoft.com for commands in VBScript

FIGURE 1.23 Full-text search of the Online Documentation

2. Communicating with the Environment

This chapter describes how a macro can be interactive. An interactive macro communicates
with:
A user
An operating system
A file, or
An external program

2.1 Screen Output and Input


CATScript allows you to program a dialog box with text communication between a user and a
macro. The functions are called:
MsgBox for outputs
InputBox for inputs
2.1.1 Screen Output

An output on the screen is made with the MsgBox function. MsgBox displays text in a dialog box
and returns the button that the user has pressed. The function syntax is:

The parameters are:


“Output” specifies the text displayed in the dialog box.
“Button” determines the appearance of the dialog box and the number and type of buttons a
person can push (Table 2.1). This parameter is optional.
TABLE 2.1 Buttons of “MsgBox” Function Dialog Boxes

“Title” defines the title of the dialog box. This parameter is optional.
“Help File” and “Context” refer to additional information. These parameters are optional.
The return value of the MsgBox function identifies the button pressed by a user. A list of
possible return values are given in Table 2.2.
TABLE 2.2 Return Values of the “MsgBox” Function

MsgBox automatically breaks the displayed text depending on the available space in a dialog
box. In some cases, a Line Break can be created intentionally. This is done through Windows
in a line of text at the intended point break with the character Chr (13). If a macro is used with
Windows and UNIX, use the Chr (13) and Chr (10) characters.
Example 2.1: Output with Line Break
A macro representing the length of a tube is stored in the “Length” variable. The output is
displayed in a dialog box shown in Figure 2.1.

FIGURE 2.1 Result of the example “Output with Line Break”

In some cases, a display window will only serve to indicate a message to a user, without an
action to evaluate a user-pressed button. In this case, CATScript is allowed to omit the
assignment of the MsgBox function. No display options can be defined.

Example 2.2: Output Window without Assignment


2.1.2 Screen Input

Input from a user can be made with the InputBox function. The function displays a dialog box
with an input field and returns the string that a user has entered. The function syntax is:

The parameters are:


“Text” specifies the text above the input field of the input dialog box.
“Title” specifies the title of the input dialog box. This parameter is optional.
“Default Value” indicates the starting value that appears in the input field and can be
overridden by a user. This parameter is optional.
“XPosition” and “YPosition” determine the position of the upper-left corner of the input dialog
box on the screen. These parameters are optional. If these parameters are not used, the
window will be displayed in the center of the screen.
“Help File” and “Context” refer to additional information. These parameters are optional.
Example 2.3: Input Dialog Box
A user is prompted to enter their last name in a dialog box titled “Enter Last Name.” A line of
informational text also appears, “Please enter your last name.” In this example, the name “Smith”
appears as the default value (Figure 2.2).

FIGURE 2.2 Result of the example “Input Dialog Box”

A user can terminate a command with the “OK” or “Cancel” button. Depending on the button
selected, the following string is returned by the InputBox function:
OK: passes the entered text.
Cancel: passes an empty string.

2.2 Create, Load, and Save CATIA Documents


A CATIA document is a CATPart, CATProduct, or CATDrawing and is represented by
the Document class (Section 8.25 and Section 1.10.2).

Multiple documents can be opened simultaneously in a CATIA session. The collection of all
open documents is represented by a list object of the Documents class (Section 8.26). The list
object is created using the Documents property of the Application class (Section 8.5).

The following sections will show how documents can be added to the Documents list by creating,
loading, or saving.
2.2.1 Creating Documents

There are two possibilities for creating new documents:


Create a new blank document (“File/New”)
Create from an existing document (“File/New From”)

Creating from an existing document is selected when a user wants to utilize the settings stored
in a start-up document (seed model).
Use the Add method of the Documents class to create a new, blank document:

“Type” defines the document type. The created document is added to the open CATIA session
and displayed in a new window. Some available document types are:
Part (for a CATPart)
Product (for a CATProduct)
Drawing (for a CATDrawing)
Example 2.4: Create a New, Empty CATPart

A new document can be generated from a seed model with the NewFrom method of
the Documents class. The generated document is given a new identity stamp (“Universal
Unique Identifier,” or UUID). An identity stamp identifies the new document as a unique
document. With the identity stamp, the new document and the CATIA seed model can be
distinguished from each other.
“Name” specifies the file name of the seed model. The file name must be included with the
absolute path.
Example 2.5: Creating a New Document from a Seed Model

2.2.2 Loading Documents

An existing document can be loaded with the Open or Read method of the Documents class
(Section 8.26). Open is used when a loaded document is visible to a user. Read is used if a
macro loads a document without the interaction of a user.
Open opens a file and displays it in a new window of the CATIA application:

“Name” specifies to the absolute path and file name of a document to be opened.
Example 2.6: Opening Documents

If a document is selected interactively by a user, a dialog box is created using


the FileSelectionBox method of the Application class (Section 8.5) :

“Title” defines the title of the selection window, and “Type” defines the file format. “Mode”
determines the window: open a file or save a file. The value ranges are:
CATFileSelectionModeOpen (open a file)
CATFileSelectionModeSave (save a file)
The function returns the file name along with the absolute path. If a user cancels the operation,
a null string is passed.
Example 2.7: Opening Documents Using a Selection Window
A user is prompted with a selection window to open a CATPart (Figure 2.3). The CATPart is
opened after a successful selection.
FIGURE 2.3 Result of the example “Opening Documents with a Selection Window”

Read loads a document, but does not show it. This is required when a document (shown in the
following steps) programmed with a macro is assigned to an assembly.

2.2.3 Saving Documents

A document can be stored with the Save and SaveAs methods of the Document class (Section
8.25). Save updates the contents of a file, and SaveAs creates a new file or overwrites an
existing one.
“Name” describes the file name and full path of the document.
The Save method saves the current version of a document. Using this method, no file name can
be given or it will refresh the contents of an existing file. The FullName property of a document
provides information about its file name:

Example 2.8: Saving an Existing File


An active document is saved in its existing file. A user action and file name are required before it
can be saved.

The SaveAs method creates a new file and stores the document in it. If a file name already
exists, the old file is overwritten.
Example 2.9: Saving in a Newly Created File
A user will be prompted to save an active document with the “CATPart” type. Use a selection
window to set the file name and location. The document will be saved only after a successful
selection.

Each document has a parameter that indicates whether a document has been saved according
to a modification. This parameter can be accessed through the parameters of
the Saved property of the Document class:
2.3 User Selection of CATIA Elements

When a macro builds upon existing geometry, it may be necessary to allow a user to select
elements either while a macro is being executed or before it is executed. Both scenarios are
covered by the Selection class (Section 8.195). This class handles all the actions that a user
can interactively make in CATIA with the selection button. An object of the class can be derived
with the Selection property of the Document class (Section 8.25) :

Example 2.10: Declaring an Object for User Selection

In a macro, an object selection can be used only once. A conflict may occur if two objects of
the Selection class are defined for the same two objects.
2.3.1 Selection before Starting a Macro

When a macro is run, a Selection object contains all of the elements that a user has selected
with the CATIA selection button. The number of selected elements and an individual element of
a selection can be accessed through the Count property and the Item method:

Count equals the number of selected elements, with “Counter” having a starting value of “1” to
be counted. The SelectedElement class (Section 8.194) represents an element of a selection
(not the object of a selected element) and has to provide the properties and methods that give
information of an item (Table 2.3). The object of an element can be accessed through
the Value property.
TABLE 2.3 Properties and Methods of the “SelectedElement” Class
See SelectedElement class (Section 8.194) for details.
Example 2.11: Object Names of the Elements in a Selection
Object names of all the elements in a selection are made before the start of the macro and are
displayed in a respective output window (Figure 2.4).

FIGURE 2.4 Output of the example “Object Names of the Elements in a Selection”
2.3.2 Selection during the Execution of a Macro

The Selection class provides the SelectElement2, SelectElement3, and SelectElement4


methods that enable several options during the execution of a macro. These methods allow a
user to select different elements (Section 8.195). The methods differ in whether a user is
allowed only to select geometry within the active or passive document or is allowed to use the
selection tools of the “Selection Tool” toolbar.
The simplest method is SelectElement2. This method corresponds to the outdated
V5R16 SelectElement method.

The parameter “What” is defined across a field of CATIA identifiers, which include the elements
that the user may select. The English names of the CATIA geometry objects are used for the
values of the field (e.g. “Pad” for a Pad). “Text” specifies a text message in the CATIA info line
that appears during the selection. “Before Selection” determines whether items are considered
selected before the start of the command. If “Before Selection” is “True,” and valid elements
were selected, the method immediately signals a successful selection.
The method is returned as an output with information about the success of the previous
selection (string “Normal” or “Cancel”). If an element outside of the active document is selected,
the result of the method is “Cancel.”
To complete a selection process in a CATIA macro executing a selection, all selected items are
deselected. This is done using the Clear method.

Example 2.12: Selection at Run Time


A user is prompted during the execution of a macro to select a line or a pad. The object name of
a selected element is displayed in an output window. If a user cancels the selection, the
message “Abort” is displayed. The screen output is shown in Figure 2.5.
FIGURE 2.5 Output of the example “Selection at Run Time”

2.4 Searching and Recognizing Elements


Searching enables elements to be found within a document. It is necessary to identify the type
of geometry in order to recognize elements. When a user runs a macro in a document that has
geometry, it can be advantageous to automatically search for elements with a specified attribute
or automatically test the selection of a user (see Section 2.3.1).
2.4.1 Search

The Selection class (Section 8.195) provides the Search method, an available instruction that
searches within a document for elements based upon on a specific search criterion. A search
criterion can be made according to the capabilities of CATIA function “Edit/Search.” All elements
found within a search are stored in the Selection object from which the Search method was
performed.

A search criterion is a string that corresponds to the following syntax:

“Environment” is equivalent to a CATIA workbench (e.g. “Part Design”); “Type” is equivalent to


an element type (e.g. “point”); and “attribute” is equivalent to a property of an element type.
“Value” specifies what content an attribute should have. Inside of the “Value” field, a “*”
character can be used. “*” is the universal wildcard character used to find one or more value
criteria. “Search” defines where CATIA should look.
As the possibilities of building search criteria are very numerous, the “Edit/Search” function and
the “query” field in CATIA are helpful in putting information into a macro (Figure 2.6).

FIGURE 2.6 “Search” with “Advanced” dialog box

Example 2.13: Search


In an open, active CATPart, all points beginning with the name “Spot Weld” are searched for
and selected.
2.4.2 Recognize

The geometrical type of a geometrical element can be determined with


the GeometricType property of the GeometricElement class (Section 8.44).

The CATGeometricType identifiers can be described by a text expression or a number and are
shown in Table 2.4.
TABLE 2.4 CATGeometricType Identifiers and Numerical Values

In order to obtain an object from the GeometricElement class, the object must be distinguished
as having 2D or 3D geometry:
Since 2D geometrical elements have the GeometricElement class in their object path, each 2D
geometrical element automatically has the GeometricType property.
A second possibility for obtaining an object of the GeometricElement class is through
the GeometricElements class (Section 8.45). A GeometricElements list object can be
declared from the HybridBody, Part, and Sketch classes of the GeometricElements
property. The properties describe a list of each 3D geometrical element in a geometrical set, or
a CATPart or 2D geometrical element in a sketch.

Example 2.14: Recognizing Geometric Elements


Within an open, active CATPart, sketch “Sketch. 1” exists in the main PartBody. The name of
the 2D sketch line is displayed in an output window (Figure 2.7).
FIGURE 2.7 Result of the example “Recognizing Geometric Elements”

2.5 Color and Hide Elements


A geometrical element and many other types of elements that are listed in the specification tree
can be colored or hidden. An element must be selectively assigned to a color to be colored. To
hide an element means to put it into “no show” so that it no longer appears to a user in the 3D
window. Both methods are available through methods of the VisPropertySet class (Section
8.225). An object of the class is generated with the VisProperties method of
the Selection class (see Section 8.195):

The VisPropertySet class is a tool for analyzing and changing the visual properties of the
elements that have just been selected in a CATIA session (see Sections 2.3 and 2.4). The
elements must be selected to make changes to the visual properties. An element can be
specifically selected with the Add method of the Selection class:

Once an item is selected it can be colored or hidden.


2.5.1 Coloring Elements

CATIA V5 handles element colors in two ways: the visible color and the real color. The real
color is the color that is directly assigned to an element. The visible color is the color in which
the element is displayed in the 3D window. The difference is that a body has been assigned a
color but the actual colors of the elements differ from that of the body. This effect is called
inheritance and is transferred to the subordinate elements that inherit the color.
The real color of elements can be specified with the SetRealColor method (Section 8.225) of
the VisPropertySet class:

“Red,” “Green,” and “Blue” determine the color. The value range is an integer between “0” and
“255” (Table 2.5). “Inheritance” determines whether the color should be inherited as a visible
color to the subordinate elements. “1” activates the inheritance; “0” disables the inheritance.
TABLE 2.5 Examples of Color Values

Example 2.15: Coloring Geometrical Elements


The PartBody of an open, active CATPart is colored green with inheritance enabled. The visible
color of all elements within the PartBody are also green (Figure 2.8).
FIGURE 2.8 Result of the example “Coloring Geometrical Elements”

2.5.2 Hiding Elements

Hiding one or more elements of a selection is made with the SetShow method of
the VisPropertySet class (Section 8.225) :

“State” has the following values: “catVisPropertyShowAttr” (Show) and


“catVisPropertyNoShowAttr” (Hide).
Example 2.16: Hiding Geometrical Elements
The PartBody of an open, active CATPart is put in “no show” (Figure 2.9).
FIGURE 2.9 Result of the example “Hiding Geometrical Elements”

2.6 Reading and Writing Data


Reading and writing data is handled by the File (Section 8.36) and TextStream (Section 8.215)
classes. An object of the File class represents a file. The TextStream class represents a read
or write operation. This is a sequential file access—a file is read from beginning to end.
2.6.1 Create or Declare a File

In the first step, an object of the File class must be created to use the read or write operation. If
a file already exists, the file is declared. If the file does not yet exist, it is created.
If a file already exists, it is declared using the GetFile method of FileSystem class (Section
8.39) :

The parameter “Name” is a file name with an absolute path. If a user selects a file via a
selection window, the FileSelectionBox method of the Application class can be used
(see Section 2.2.2).
Example 2.17: Declare an Existing File
If a file does not exist, it can be created using the CreateFile method of the FileSystem class:

The parameter “Name” is a file name with an absolute path name. “Overwrite” determines
whether a file has the same file name and can be overwritten (Overwrite to “True”).
Example 2.18: Create New File
A new text file is created. A user determines the location and file name via a dialog box.

An object of the File class is created. In the second step, a read or write operation can be
carried out using the TextStream class.
2.6.2 Reading Data

A read operation is derived from an object of the File class in the mode “ForReading” of an
object of the TextStream class (Section 8.215).

Use the ReadLine method and Close of the TextStream class; individual lines are read and a
read operation is closed. With the AtEndOfStream property a macro can check whether a read
operation has reached an end of file.

Example 2.19: Reading Data


All data in a file defined as a “File” object is read and displayed in a window.

2.6.3 Writing Data


A write operation is derived from an object of the File class. “ForAppending” or “ForWriting” is
derived from an object of TextStream class (Section 8.215).
“ForAppending” writes data at the end of a file. “ForWriting” overwrites all existing data.

One or more characters of a data can be written with the Write method of
the TextStream class:

The parameter “Text” specifies the characters to be written. The characters are written in a row
and end with a Chr (10) character, which represents the end of data mark.
Example 2.20: Writing of Data
A file is defined as a “File” object, then ten lines of data with the text “This is data” are appended
to the file.

2.7 Executing External Programs and CATScripts


An external program is a non-CATIA application. An external CATScript is a CATScript in a
macro library. An external program or CATScript can be executed through the methods of
the SystemService class (Section 8.214). An object of the SystemService class is derived
from the SystemService property of the Application class (Section 8.5) :

Example 2.21: Definition of Objects in the “SystemService” Class

The following sections illustrate how an external program or CATScript is executed.


2.7.1 External Program

There are two ways to run an external program:


Execute program as a macro stops.
Execute program as a macro runs.
The ExecuteProcessus method of the SystemService class starts a program as a macro
stops.

“Instruction” is the file name and absolute path of a program. The function returns a value of
zero if the execution of the process was successful.
Example 2.22: Stop Macro and Execute Program

Using the ExecuteBackgroundProcessus method a program is started while a macro runs.


2.7.2 External CATScript

A macro can perform a function or subroutine (Section 1.8.3) of an external CATScript.


Execution takes place through the ExecuteScript method of the SystemService class. If a
function calls an external CATScript, the function returns with the ExecuteScript value. If a
subroutine is executed, it returns an empty string.

The parameter “Library” defines the name or directory of a library. “Type” determines the type of
library. “ScriptName” and “Function” determine the CATScript and its function or subroutine.
The range of values of the CATScriptLibraryType identifier is:
catScriptLibraryTypeDocument (storage in a CATIA document, for example CATPart)
catScriptLibraryTypeDirectory (storage in a directory)
catScriptLibraryTypeVBAProject (storage in a VBA project)
Example 2.23: Calling a Function of an External CATScript
A CATScript (“Calculator.CATScript” in the directory “C:\Temp”) possesses the “Multiplication”
function, which multiplies two floating point numbers and returns the result. This function is used
by a CATScript.

Calculator.CATScript:

The content of the variable “E” after a call to the external function is “50.”

2.8 Reading Environment Variables


In many cases it is necessary for a macro to run on different workstations, which can have
different storage paths. A macro does not need to be adjusted for each unique workstation
because it is possible to read the variables of an operating system or a CATIA environment.
These variables are called environment variables.
An environment variable of an operating system is a variable that is declared at the level of an
operating system. All applications are available after the declaration of that variable has been
started.
A CATIA environment variable is a variable that is only available in the CATIA V5 application.
CATIA V5 uses two environment files during startup. They are declared in the environment
variables:
Global environment (variables for all users)
User environment (variable depending on the current user)
The methods used to read environment variables are assigned to the SystemService class
(Section 8.214). An object of the SystemService class is derived from the Application class
(Section 8.5) through the SystemService property (see Section 2.7). The Environ method
reads the contents of an environment variable.

The parameter “Variable” describes the name of an environment variable. There is no distinction
between the variable of an operating system and CATIA. The return of the function is the
content of the environmental variable. If an environment variable does not exist, the function
passes an empty string.
Example 2.24: Reading the Content of an Environment Variable
The environment variable “PATH” is read.

If an environment variable is controlled by a file path, it is recommended to check whether the


file path exists. Methods for testing are provided with the FileSystem class (Section 8.39). An
object of the FileSystemclass is derived (Section 8.5) through the FileSystem property of
the Application class. The FolderExists method checks whether a file path exists:

“Path” describes the absolute file path. The return of the function is “True” if the file path exists.
Example 2.25: Verifying the Existence of a File Path
A check is run to verify whether a file path is stored in the environment variable “Data Storage.”
If the file path does not exist, an output window with an error message will appear.

Note: A macro that can run on different platforms should always use the CATIA methods of
the FileSystem class (Section 8.39). Microsoft VBScript enables these methods. If an
equivalent CATIA method exists, it will take priority.

3. Components of CATParts

A CATPart has two groups of components. The first group is geometry-related content such as
origin planes, bodies, geometrical sets, and other geometries (Figure 3.1). The second group is
metadata such as part numbers, nomenclature, and custom attributes.

FIGURE 3.1 Geometry-related content of CATParts


Part and Product anchor objects are accessed from these two groups (Sections
1.10.3 and 1.10.4).
The geometry-related content of a CATPart is assigned to an object of the Part class (Section
8.168). Access to this object is accomplished through the Part property of
the PartDocument object (Section 8.169).

The metadata of CATParts is assigned to an object of Product class (Section 8.176). An object
of the class is derived with the Product property of the PartDocument class (Section 8.169).

In addition to the items that are visible to a user, a CATPart contains information about
references and direction definitions. A reference is an internal CATIA pointer to an object, or a
direction definition that defines an element’s direction in space.
This chapter describes how created or declared elements are enumerated in a macro.

3.1 Attributes
The attributes of CATParts are divided into standard attributes and custom attributes. Standard
attributes are present in each CATPart. These attributes are the part number, revision, definition,
nomenclature, source, and description. Custom attributes exist only when created by a user in a
CATPart. Appointing a custom attribute is done individually.
3.1.1 Standard Attributes

The standard attributes “Part Number,” “Revision,” “Definition,” “Nomenclature,” “Source,” and
“Description” are accessed with the PartNumber, Revision, Definition, Nomenclature,
Source, and DescriptionRef properties of the Product class (Section 8.176):

Example 3.1: Standard Attributes of CATParts


Standard attributes are set in an open, active CATPart. The CATPart is identified as a
purchased part.

3.1.2 Custom Attributes

The list of custom attributes is defined with the UserRefProperties list object of
the Product class (Section 8.176). Attributes are created or removed through the properties of
the Parameter class (Section 8.167).
Example 3.2: Custom Attributes of a CATPart
In an open, active CATPart, the Boolean attribute “Standard Part” is created with the value
“True.”
3.2 Origin Elements

An origin element is geometry that is automatically available in each CATPart after its creation.
Any geometry created by a user or macro in a CATPart is based on one or more origin elements.
The origin elements of CATParts are the xy, yz, and zx planes. A list object of all origin
elements is derived from the OriginElements property of the Part class (Section 8.168).

The OriginElements class (Section 8.163) provides the PlaneXY,


PlaneYZ, and PlaneZX properties to declare an origin plane:

Example 3.3: Declaration of an Origin Plane


In an open, active CATPart, the XY plane is declared as an object.

3.3 Bodies, Geometrical Sets, and Ordered Geometrical Sets


There are three types of collectors in a CATPart in which geometry can be stored: bodies,
geometrical sets, and ordered geometrical sets. These collectors can be nested into one
another in order to create a logical structure.

A body is a container for solids, geometrical sets, ordered geometrical sets, wire geometry, and
surfaces. It is represented by an object of the Body class (Section 8.9). The nesting of these
objects is carried out through Boolean operations.

A geometrical set is a collection of wireframe geometry, surfaces, and other geometrical sets. It
is represented with an object of the HybridBody class (Section 8.50). In the previous versions
of CATIA, a geometrical set was referred to as an “open body.”

An ordered geometrical set is a collection of bodies, wireframe, surfaces, and other ordered
geometrical sets. It is represented by an object of the OrderedGeometricalSet class (Section
8.161).
A collection can be created or declared. It must be created within a document. When you
declare an existing collection with a macro, it is defined “in-work.” This is illustrated in the
following sections.
3.3.1 Bodies

A body can be created or declared using a macro. Creating is a means to add a body to the
specification tree. Declaring is a means to define an existing body “in-work.”
3.3.1.1 Creating Bodies

To create a body, you must first declare a list object of bodies from which the body is to be
added. This is either the body in a list of all CATParts or the first hierarchical level of an ordered
geometrical set within the list of bodies. In the first case, the list object is declared with
the Bodies property of the Part class (Section 8.168). In the second case, the object list is
declared with the Bodies property of the OrderedGeometricalSetclass (Section 8.161).

A body is created with the Add method of the Bodies class (Section 8.8):

Example 3.4: Creating Bodies


In an open, active, and empty CATPart, a body with the name “Screw” is created. The result is
shown in Figure 3.2.

FIGURE 3.2 Result of the example “Creating Bodies”

3.3.1.2 Declaring Bodies


When a body already exists, it does not need to be created, but it does need to be declared. In
this case, a distinction must be whether it is:
the PartBody, or
a standard body.
The PartBody is a body that is present in every CATPart at the highest level and cannot be
deleted or moved. A standard body can be deleted or sorted.
3.3.1.2.1 PartBody

The PartBody can be declared with the MainBody property of the Part class (Section 8.168):

Example 3.5: Declaring the PartBody


The main body of an open, active CATPart is assigned to an object with the name “PartBody.”

3.3.1.2.2 Standard Body

A standard body is declared with the Item method of the Bodies class (Section 8.8). The
declaration is made with either the name of a body or its “Index” value, which corresponds to the
position of the body in the Bodies object list:

Example 3.6: Declaring a Body by Name


An open, active CATPart possesses the body named “Screw.” This body is assigned to an
object with the name “Screw.”

Example 3.7: Declaring a Body by Index


An open, active CATPart has more than one body. The first body is assigned an object with the
name “Body1.”

The result of the second example corresponds to the PartBody, as it comes first in the
specification tree.
3.3.2 Geometrical Sets

A geometrical set can be created or declared if it already exists in the specification tree.
3.3.2.1 Creating Geometrical Sets
A geometrical set can be created either directly in the first hierarchical level of the tree structure,
within a body, or inside of other geometrical sets. References of bodies or geometrical sets are
stored in a list object of the HybridBodies class (Section 8.49).
A geometrical set can be organized in the first branch of a specification tree using the list object
the HybridBodies property of the Part class (Section 8.168):

If a geometrical set is assigned to a body or to a geometrical set, the list object is defined
through the HybridBodies property and is defined with the Body (Section 8.9)
or HybridBody (Section 8.50) classes:

The Add method of the HybridBodies class adds a new geometrical set to the list:

Example 3.8: Creating a Geometrical Set


In an active, empty CATPart, two geometrical sets are created: “Hierarchy1” and “InBody.” The
geometrical set “Hierarchy1” is assigned in the first hierarchical level, and “InBody” is assigned
in the PartBody. The result is shown in Figure 3.3. Please note: “Hybrid-design” must be
disabled for the program to run error-free!

FIGURE 3.3 Result of the example “Creating a Geometrical Set”


3.3.2.2 Declaring Geometrical Sets

The declaration of a geometrical set is done with the Item method of the HybridBodies class
(Section 8.49). The declaration is made either by the name of the geometrical set or by its
“Index” value, which corresponds to the position of the geometrical set in the list:

Example 3.9: Declaring Geometrical Sets by Name


Multiple geometrical sets exist in an active, open CATPart. The geometrical set with the name
“Surfaces” is located in the first hierarchical level. “Surfaces” is assigned to an object. The
geometrical set is shown in Figure 3.4.

FIGURE 3.4 Result of the example “Declaring Geometrical Sets by Name”

Example 3.10: Declaring Geometrical Sets by Index


A body with the name “Screw” exists in an active, open CATPart and contains multiple
geometrical sets. The second of these geometrical sets, “OpenBody2,” is assigned as the “in-
work” object. The geometrical set is shown in Figure 3.5.
FIGURE 3.5 Result of the example “Declaring Geometrical Sets by Index”

3.3.3 Ordered Geometrical Sets

A geometrical set can be created or declared if it already exists in the specification tree.
3.3.3.1 Creating Ordered Geometrical Sets

An ordered geometrical set can be created either directly in the first hierarchical level, within a
body, or inside an ordered geometrical set of a CATPart. Reference geometrical sets are also
stored in ordered geometrical sets that are list objects of the OrderedGeometricalSets class
(Section 8.162). The list object is derived from the OrderedGeometricalSets property of
the Part (Section 8.168), Body (Section 8.9), or OrderedGeometricalSet (Section 8.161)
classes:

The Add method of the OrderedGeometricalSets class adds a new ordered geometrical set to
the list:

Example 3.11: Creating Ordered Geometrical Sets


Two ordered geometrical sets, “Hierarchy1” and “InBody,” are created in an active, empty
CATPart. The ordered geometrical set “Hierarchy1” is at the first hierarchical level; “InBody” is
assigned to the PartBody. The result is shown in Figure 3.6.

FIGURE 3.6 Result of the example “Creating Ordered Geometrical Sets”


3.3.3.2 Declaring Ordered Geometrical Sets

Declaring ordered geometrical sets is done with the Item method of


the OrderedGeometricalSets class (Section 8.162). The declaration is made either by the
name of the ordered geometrical set or by its “Index” value, which corresponds to the position of
the ordered geometrical set in the list (see Section 3.3.2.2):

Example 3.12: Declaring Ordered Geometrical Sets by Index


In an active, open CATPart, several ordered geometrical sets exist in the first hierarchical level.
The second ordered geometrical set is declared. This set is found and shown in Figure 3.7.

FIGURE 3.7 Result of the example “Declaring Ordered Geometrical Sets by Index”
3.3.4 Boolean Operations between Bodies

Two bodies can be linked to each other through a Boolean operation. A Boolean operation is an
addition, subtraction, or intersection of the geometries of two bodies. The result of an addition is
an object of the Add(Add), Assemble (Assemble), or Trim (Union Trim) class. The result of a
subtraction is an object of the Remove (Remove) class. The result of an intersection is an
object of the Intersect (Intersect) class. An overview is shown in Table 3.1.
TABLE 3.1 Overview of Boolean Operations between Two Bodies
A Boolean operation is created for a 3D toolbox (Section 7.1), an object of
the ShapeFactory class. A 3D toolbox can be declared with the ShapeFactory method of the
Part class (Section 8.168):

The two bodies can be combined with the following methods of the ShapeFactory class
(Section 8.199):

The parameter “Body2” determines the body formed by a Boolean operation with “Body1.” The
“Body1” parameter is the body being processed within the CATPart. “Body1” is set “in-work”
with the InWorkObjectproperty of the Part class:

Example 3.13: Addition of Two Bodies


In an open, active CATPart, there is the PartBody and a body named “Body.2.” “Body.2” is
added to the PartBody with the “Add” operation (Figure 3.8).

FIGURE 3.8 Result of the example “Addition of Two Bodies”


If the AddNewTrim method is applied, the association of the body to be removed can be
determined. A portion of the body is completely separated from the rest of the body.
To determine the body to be removed, a face of the body part being removed is selected. The
processes can also be selected in the opposite manner: a face of the body to remain is selected
as the “face to keep.”
The surface to be removed is defined with
the AddFaceToRemove and AddFaceToRemove2 methods of the Trim class (Section 8.221).
The AddFaceToKeep and AddFaceToKeep2 methods define an area to be retained. One
surface is defined and is removed or kept as a reference called a “Removed Surface” (Section
3.5.4).

There are two methods to define the surfaces to keep or to remove. They differ in the way the
surfaces are kept or removed based upon an intersecting surface. This intersecting surface is a
surface of dividing body, which separates the removed or kept surface into two halves.
If a body has a surface that does not intersect the dividing body,
the AddFaceToKeep and AddFaceToRemove methods are used. Case A is shown in Table
3.2 as an example: the upper circular surface belongs completely to the top of the body and
does not pass through the pad.
TABLE 3.2 Example of a Penetrating and Non-Penetrating Surface of a Body
If the surface of a body does intersect the dividing body,
the AddFaceToKeep2 and AddFaceToRemove2 methods are used. These methods also
allow the trimming of a removed or kept surface with an intersecting surface. This is shown in
Case B in Table 3.2. The lateral surface of the ellipsoid passes through the pad completely. The
upper or lower surface of the pad could be used as an intersecting surface.
Example 3.14: Union Trim
In an open, active CATPart, a PartBody has rectangular geometry and a body “Body.2” with
cylindrical geometry. The PartBody splits “Body.2” into two halves (Table 3.2, Case A). Both
bodies are united with only the upper portion of the cylinder remaining (Figure 3.9).

FIGURE 3.9 Result of the example “Union Trim”


3.4 Parameters and Relations

A parameter is a variable within a CATPart that stores a geometric dimension or value. Several
parameters can be linked with one relationship. A relationship is represented as a formula or a
design table. A design table is a list of parameters whose values are controlled by configuration.
A configuration is a parameter row of a design table. A formula establishes a relationship
between several parameters.
Parameters and relationships make it possible to design parametrically driven geometry so that
a user can easily modify a component. Parameters and relationships are shown in the
specification tree under the “Parameters” and “Relationships” nodes (Figure 3.10).
FIGURE 3.10 Representation of parameters and relationships in the design tree

These nodes are automatically created by CATIA when a macro generates a parameter or a
relationship. A list of parameters in a CATPart is represented by a list object of
the Parameters class (Section 8.167). A list of relations is represented by a list object of
the Relations class (Section 8.184).
3.4.1 Parameter

A parameter is generally represented by an object of the Parameters class (Section 8.166).


A Parameter is a parent class of all parameter types in CATIA. An overview of these common
types is shown in Figure 3.11.

FIGURE 3.11 Overview of common types of parameters

The creation of a parameter takes place via the Parameter class (Section 8.167). A list object of
the class can be declared with the Parameter property of the Part class (Section 8.168):

The Parameter class provides several methods to create a parameter. An overview of these
methods is given in Table 3.3.
TABLE 3.3 Methods to Create a Parameter with the “Parameter” Class
“Name” and “value” determine the names and values of the parameters. “Type” indicates
whether a geometric dimension is an angle or a length.
Example 3.15: Creating Parameters
In an open, active CATPart, the three parameters “Pi” (real number), “Height” (length), and
“Connection” (angle) are created and the values “3.14159,” 200 mm, and 100° are assigned.
The result is shown in Figure 3.12.

FIGURE 3.12 Result of the example “Creating Parameters”

3.4.2 Design Table


A design table is a set of parameters and values within a table. It is represented by an object of
the DesignTable class (Section 8.23). Each row of the table represents a configuration. An
example of a design table is given in Table 3.4.
TABLE 3.4 Example of a Design Table for Flat Steel

A design table can be imported into a CATPart if it exists as an Excel or text file. The
parameters coincide with the design table’s columns. The names of the parameters are in the
first row of the file. In a text file, the columns are delimited with the TAB key. The ENTER key
completes a row, then moves to the next one. The two examples are shown in Table 3.5.
TABLE 3.5 “Flat Steel” Design Table as a Text or Excel File

A design table can be created with the CreateDesignTable and CreateHorizontalDesignTable


of the Relations class (Section 8.184).

The “Name” parameter specifies the name of the design table. “Comment” is descriptive text.
“Copy” determines whether a copy of the table is created within a CATIA document. If “Copy” is
set to “True,” the table is copied. In the other case, only a link to the file is created. “Path” refers
to the absolute file name.
If a design table is created whose columns are also linked with the parameters of a CATIA
document, a configuration can be selected. This is done using the AddAssociation method and
the Configuration property of the DesignTable class.
“Parameter” defines the parameters in the CATIA document. “Column” is assigned to a vertical
column in the file. Configuration is a numeric value between “1” and the number of available
configurations. The number can be determined with the ConfigurationsNb property.

Example 3.16: Creating a Design Table


In an open, active CATPart, the three parameters “Length,” “Width,” and “Height” are created
along with the design table “Flat Steel.”
The values of the table are imported from a file “Flat Steel.txt” (Table 3.5) stored in the “C:\Temp”
directory. There is no copy of the values created in the CATPart. The result is shown in Figure
3.13.

FIGURE 3.13 Result of the example “Creating a Design Table”


3.4.3 Formulas

A formula is a calculation specification and sets parameters based on the relationship between
the parameters. A formula is represented by the Formula class (Section 8.43) and is created
with the CreateFormulamethod of the Relations class (Section 8.184).

The “Name” parameter defines the name of the formula. “Comment” stores descriptive text.
“Output” defines the parameter to be calculated. “Formula” describes the formula for calculating
the “Output” parameter.
Example 3.17: Creating a Formula
In an open, active CATPart, the parameters “Height” and “Width” and the formula “Height
Calculation” are created. The “Height” is always four times larger than the “Width.” The starting
value for the “Width” is 30 mm. The result is shown in Figure 3.14.

FIGURE 3.14 Result of the example “Creating a Formula”


3.5 References
A reference is a pointer to an object and therefore a neutral descriptor for the object. A
reference is made if a method is used as an input parameter. The method can be assigned to
objects of different classes and can be used for CATScripts in numerous places. It does not
mean that this method can handle all object classes.
A reference represents the Reference class (Section 8.181), which is created with
the CreateReferenceFrom... methods of the Part class (Section 8.168):

CreateReferenceFromGeometry derives a reference from a geometry object. A geometry


object is a wireframe, surface, or solid geometry. CreateReferenceFromObject creates a
reference to any single object (Section 1.3.3). CreateReferenceFromName creates a reference
to an object, and the object name is specified as “IDName.” If part geometry of object geometry
is needed for a reference, the CreateReferenceFromBRepName method is used. This method
is helpful for frequently used part geometry such as an edge or a face of a solid.
The name of the object referenced by a reference can be determined with the Display-
Name property of the Reference class (Section 8.181):

The following sections describe in detail the four ways of deriving a reference.
3.5.1 References to Geometry

If a macro knows geometric objects, references to these geometric objects are derived using
the CreateReferenceFromGeometry method of the Part class (Section 8.168):

Example 3.18: Reference to Geometry


In a macro, a geometric object “MyPoint” and an object “MyComponent” of the Part class are
defined. The name of the object geometry in “Point.999” is changed, and a reference to the
geometry object is created. As a check, the name of the object through its reference is
displayed in an output window (Figure 3.15).

FIGURE 3.15 Output of the example “References to Geometry”

3.5.2 References to Objects

A universal way to derive a reference from an object is with


the CreateReferenceFromObject method of the Part class (Section 8.168):

The parameter “Object” describes any single object. Since a geometry object is usually a single
object, the method in Section 3.5.1 is always the preferred way to create a macro.
3.5.3 References to Object Names

A reference can be defined using the name of an object. This is done using
the CreateReferenceFromName method of the Part class (Section 8.168):

The derivation of a reference with this method’s programming is seldom necessary. When an
object is already known, use the methods explained in the first two sections. The one exception
is if an empty reference is needed.
An empty reference is a reference that points to nothing. It is used whenever a method
requires a reference but the reference to the object is determined later in the process of a macro.
A practical application is when multiple edges or faces (fillets, measurements, etc.) will be
changed in a single operation (see Section 7.5.2, Example 7.8).
Example 3.19: Empty Reference
An empty reference is created in a macro.

3.5.4 References to the Name of the Boundary Representation

A “Boundary Representation” (BRep) is a point, edge, or face of a geometric element. If a


reference to a BRep of a geometric element is needed, the CreateReferenceFrom
BRepName method of the Part class (Section 8.168) is used:

The parameter “BRepName” specifies the name of a BRep “Object” that accompanies a
geometric object. The formation of the BRep name is nested. The nesting levels are:
1. Designation of a BRep
2. Name of a BRep
3. Name of an edge
4. Name of one or more sub-faces (“Face”) and points
5. Name of a contour element in a sketch. Depending upon how a BRep is used, CATIA knows
fixed designations that can be found in Table 3.6.
TABLE 3.6 Designations of BRep

The rules for creating the name of a BRep are presented in Table 3.7.
TABLE 3.7 Rules for Creating the Name of a BRep

“Face-Name” is the name of a parting “Face” of a feature. The history of a sub-face is stored in
its designation. If a part face is based on a Sketch, the syntax is:

The parameters “Geometry” and “Sketch” call the name of the object. An object must be
described in English, even if it is in another language version of CATIA! “Counter” is a value of
“1” to “n”. “n” is the number of geometric elements involved in the creation of geometry.
If a sub-face is not related to a sketch, the syntax is:

Example names of the sub-faces of a pad and a shaft are given in Tables 3.8 and 3.9. “Edge-
Name” is the name of an edge and has the following syntax:
TABLE 3.8 Examples of Creating Face-Names for a Pad
TABLE 3.9 Examples of Creating Face-Names for a Shaft/Revolved Body

“Ratio” is the relative position of a point on an edge to the ratio of the “Startpoint-Point,” and
“Startpoint-Endpoint” lengths. The ratio is always written with six decimal places. Examples:
This example shows the theory of reference BReps in practical terms.
Example 3.20: Edge Fillet
A pad “Pad.1” originated from sketch “Sketch.1” exists within the PartBody of an open, active
CATPart. One edge of the pad is filleted with a radius of 10 mm (Figure 3.16).

FIGURE 3.16 Result of the example “Edge Fillet”


3.6 Direction Definition
A direction definition is a set of parameters that describe a direction. It is needed to determine
the orientation of a line, curve, or surface. A direction definition is represented by
the HybridShapeDirection class (Section 8.78).
There are two types of direction definitions:
Direction definition by a vector
Direction definition by an object
A vector defines the direction with three coordinates. An object defines the direction through its
own orientation. The origin planes or axes in a CATPart are commonly used to define a
direction (Section 3.2). A definition direction is not visible to a user. It is an object that only a
macro knows.
3.6.1 Direction Defined by a Vector

A direction defined by a vector is created with the AddNewDirectionByCoord method of


the HybridShapeFactory class (Section 8.85). A HybridShapeFactory object is declared with
the HybridShapeFactory property of the Part class (Section 6.1).

Example 3.21: Direction Defined by a Vector


A direction definition is created that points in the direction (0, 1, 0).
3.6.2 Direction Defined by an Object

A direction defined by means of an object requires a reference object that is suitable for deriving
a direction definition. This is usually a line or a plane. A direction definition is created with
the AddNewDirectionmethod of the HybridShapeFactory class (Section 8.85):

Example 3.22: Direction Defined by a Reference Object


“MyLine” and “MyPart” objects are declared in a macro. The direction of the line indicates the
direction definition.
4. Components of CATProducts

The purpose of a CATProduct is to define assembly structures. To fulfill this purpose,


information is needed about the main CATProduct, CATParts, sub-assemblies, and components
as well as their positioning. CATProducts also store information such as descriptive attributes,
parameters, and formulas. This information is accessed with the Product anchor object
(Section 1.10.4).
An object of the Product class (Section 8.176) is derived with the Product method of
the ProductDocument class (Section 8.177).

The following sections describe how to access the attributes, parameters, and formulas of
CATProducts, CATParts, and components along with the conditions of a CATProduct.

4.1 Attributes
The attributes of CATProducts are divided into standard attributes and custom attributes.
Standard attributes are the part number, revision, definition, nomenclature, source, and
description. Custom attributes are attributes created by a user.
The attributes of CATProducts are accessed with the same properties as the attributes of
CATParts. For this reason, refer to Section 3.1 for the attributes of CATProducts.

4.2 Parameters and Formulas

The parameters and formulas of CATProducts are stored in the Parameter and Relations list
objects of the Product class (Section 8.176).

The processing and definition of parameters or formulas are made with the methods described
in Section 3.4.

4.3 Assembly Structure


An assembly structure is a CATProduct containing sub-assemblies, CATParts, or other
components. These CATProduct elements are stored in a list object and can be declared with
the Products property of the Product class (Section 8.176).

The Products class (Section 8.178) provides methods to analyze or modify the components of
the list.
4.3.1 Analyzing an Existing Structure

An element of the list object can be read with the Item method of the Products class.
To rename the element to be read, use the Item method as a parameter. It renames elements
either by their position in the list as a whole number or by the name of the element. The number
of elements in the list object can be determined using the Count property.

Example 4.1: Structure Analysis


A CATProduct is opened in CATIA V5 and the active document. The names of all tree nodes in
a CATProduct are displayed in individual output windows. If the CATProduct has sub-
assemblies, the sub-assemblies are also analyzed.

4.3.2 Adding Elements

CATProducts, components, and CATParts can be added to a CATProduct. This is to distinguish


whether a created item already exists on your hard disk or whether it exists in memory as a
CATIA document and is to be inserted.

If a completely new item is created, the AddNewComponent or AddNewProduct methods of


the Products class are used.
AddNewComponent creates a new CATPart or CATProduct. If a CATPart is created, the
attribute “DocumentType” is a “CATPart.” For a CATProduct the value is set to
“CATProduct.” AddNewProduct creates a new component. In both cases, the “PartNumber”
attribute determines which part number receives the new node to be created. An example is
in Section 4.4.

If an item already exists as a file but is not loaded in CATIA, it can be loaded with
the AddComponentsFromFiles method and will be hung in a CATProduct.

The “List” attribute is an array of document filenames to be loaded. “Type” defines the type of
documents to be added (e.g. “CATPart” or “CATProduct”). An example is the description of
the Products class (Section 8.178) in the Appendix. If an item is already available in memory of
CATIA as a document or product, it can be added to the list of a CATProduct using
the AddComponent or AddExternalComponent methods. In the first case the argument is
passed as an attribute of a product; in the second case the argument is passed as a document.
Two examples describe these two methods in the Appendix (Section 8.178).

4.3.3 Replacing Elements

One element of the list object can be replaced with


the ReplaceComponent and ReplaceProduct methods of the Products class.

The ReplaceComponent method requires the new element as a file. It is determined by its file
name (absolute path). The method loads the document of the new element and replaces
products from the list object. The ReplaceProduct method determines the new element by its
product object. In this case, the document of the new element is already loaded. The parameter
“AllInstances” determines whether all of the instances of the old element are to be replaced by
the new (value equals “True”).
Example 4.2: Replace Node
An active CATProduct document is opened in CATIA V5. The CATProduct contains at least two
sub-nodes. All instances of the second sub-node are replaced with the CATPart
“C:\temp\Test.CATPart.”
4.3.4 Deleting Elements

An element of the list object can be deleted using the Remove method of the Products class.

To rename an element that is read, use the Item method as a parameter. This method will give
either the element’s name or its position in the list as a whole number (see Section 4.3.1).
Example 4.3: Delete Node
A CATProduct and an active document are opened in CATIA V5. The CATProduct contains at
least one sub-node. The first sub-node is deleted.
4.4 Constraints

Constraints describe the position of geometric elements in a CATProduct (e.g. “Fix,” “offset,”
and “Contact”). A constraint is stored in a list object of the Constraints class. The list object is
not directly a property of the Product class (Section 8.176), but it can be derived using
the Connections method. The parameter—“Type” in this case—passes the string to
“CATIAConstraints.”

The creation of a constraint is referenced to the methods described in Section 5.4. These
methods require references to the geometric elements involved in the constraining. A reference
to a geometric element can be created using the CreateReferenceFromName method of
the Product class.

Identifiers must be specified as the full path name of a feature. A path name consists of the root
of the product part number, the name of the intermediate nodes, and the name of the CATParts,
which contains the geometry along with the name of the feature. The terms are separated by
slashes. The name of the feature is preceded by an exclamation mark. For example, to refer to
a geometric element that belongs to a CATPart that is installed directly in the root product, the
path is “RootProduct.PartNumber/CATPart. Name/!Geometry.Name.”
Example 4.4: Creating Constraints
A CATProduct with two CATParts, “01” and “02,” is created. The XY plane of CATPart “01” is
fixed. The XY plane of CATPart “02” is linked via a contact constraint with the XY plane of
CATPart “01.”
5. 2D Wireframe Geometry

Two dimensional wireframe geometries are points, lines, and planar curves. 2D wireframe
geometry is stored in a sketch, which is represented by the Sketch class (Section 8.202). From
a sketch, solids and surfaces can be created.
The creation of a sketch can be divided into three steps:
1. Creating sketch references and sketch objects
2. Creating sketch geometry
3. Creating constraints between the geometric elements in a sketch

5.1 Sketch References and Sketch Objects

A sketch reference is a plane or planar surface on which the 2D wire geometry of a sketch lies.
By using a sketch reference, a sketch is positioned in space. Commonly used sketch references
are origin planes (Section 3.2) or user-created planes (Section 6.4).
A sketch is always assigned to a body or geometrical set. This must be declared or created
(Section 3.3) before a sketch can be created. If a body or geometrical set already exists,
the Sketches property of the Bodyclass (Section 8.9) or the HybridSketches property of
the HybridBody class (Section 8.50) can be used to derive a list of all the sketches in a body.

The Sketches class (Section 8.204) enables the Add method to add another sketch to the
sketch list. A sketch always needs a sketch reference. A plane or planar surface is used for a
sketch reference. The result of this method is a sketch whose origin corresponds to the sketch
references. All position values are based on the sketch’s origin.

Example 5.1: Creating a Sketch


A sketch is created in the PartBody in a new CATPart. The reference of the sketch is the YZ
plane. The result is shown in Figure 5.1.
FIGURE 5.1 Result of the example “Creating a Sketch”

A sketch has a two-dimensional axis system with an H- and a V-axis that lie at the origin of the
sketch. The orientation of the axes is based on the reference sketches. The axis system can be
derived with AbsoluteAxisproperty of the Sketch class (Section 8.202).

The Axis2D class (Section 8.7) has the HorizontalReference, Origin, and Vertical-
Reference properties to read out the origin and the axes of a coordinate system. The origin
elements of a sketch are often used to define constraints.

Example 5.2: Read the Axes of a Sketch


The axes of a sketch “Sketch” are read, and the objects “HAxis” and “VAxis” are assigned.

The Sketch class offers more than the possibility of the SetAbsoluteAxisData method to
change the axis system of a sketch.

“Axis3D” is a field that is composed of nine values :


Values 0 to 2: origin of the sketch (X, Y, and Z)
Values 3 to 5: vector of the horizontal axis (DX, DY, and DZ)
Values 6 to 8: vector of the vertical axis (DX, DY, and DZ)
If the origin and the orientation of a sketch are to be read, the GetAbsoluteAxisData method is
used.

Example 5.3: Reading the Data of a 2D-Axis System


The origin and orientation of the axes of a sketch “Sketch” are read and displayed in a output
window.
5.2 Creating Sketch Geometry

The points, lines, and curves of a sketch are created with the help of a 2D toolbox. A 2D toolbox
is an object of the Factory2D class (Section 8.35) that provides the methods for defining
geometry. A 2D toolbox is declared with the OpenEdition method of the Sketch class (Section
8.202). The method also opens a sketch for editing.

2D geometric elements can be created with a toolbox. An overview of the key elements and
their methods is given in Table 5.1. The “X” and “Y” parameters always refer to the origin of a
sketch.
TABLE 5.1 Overview of the Methods of the “Factory2D” Class (For details of the
methods Factory2D, see Section 8.35.)
Once the geometric elements of a sketch are created, the sketch is closed with
the CloseEdition method of the Sketch class, and the CATPart is recalculated with
the Update method of the Part class (Section 8.168).

Example 5.4: Creating a Square


A sketch has been declared as an object “Sketch” and as a part “Component.” In the sketch, a
square with an edge length of 100 mm is drawn symmetrically about the origin of the sketch
(Figure 5.2).

FIGURE 5.2 Result of the example “Creating a Square”


The result is a square whose lines have no relation to each other. In Sketcher, the lines can be
moved using the arrow pointer (Figure 5.3). A relation between two lines can be prepared by the
start and end points of both lines, and the created lines can be assigned. A start and end points
can be assigned to a line with the Start-Point and EndPoint properties of the Curve2D class
(Section 8.22). Curve2D is a parent class of the Line2D class.

FIGURE 5.3 Square with shifted line

The expanded macro reads:


If you now move a point or a line with the arrow pointer, the lines move together (Figure 5.4).

FIGURE 5.4 Square with associated lines

5.3 Defining Construction Elements and the Rotation Axis


A construction element is a 2D geometric element that is not used for creating geometry but is
used as a positioning aid for other 2D geometric elements. A construction element is
represented by dashed lines in a sketch.
A rotation axis is the line that is defined as an axis of rotation for a revolved surface or revolved
solid. A rotation axis is represented as dotted lines in a sketch.

The definition, whether the 2D geometry element is a standard or construction element, is


performed with the Construction property of the Geometry2D class (Section 9.46). Since each
2D geometry element of the Geometry2D class has a parent class, it has this property. To
declare an element as a construction element, the property is set to “True.”

The rotation axis of a sketch can be defined using the CenterLine property of the Sketch class
(Section 8.202).

Example 5.5: Standard Element, Construction Element, and Rotation Axis


In a sketch “Sketch” that was opened with the toolbox “Wzk,” three lines are created. The first
line is a standard element, the second is a construction element, and the third is a rotation axis
in the sketch (Figure 5.5).

FIGURE 5.5 Result of the example “Standard Element, Construction Element, and Rotation Axis”

5.4 Creating Constraints


A constraint associates geometric elements of a sketch and allows a user to quickly modify the
sketch. A constraint is represented by an object of the Constraint class (Section 8.19) and is
stored in a list object of the Constraints class (Section 8.20). The list object is declared with
the Constraints property of the Sketch class (Section 8.20.2) :
A constraint is created using the AddMonoEltCst, AddBiEltCst, and AddTriEltCst methods of
the Constraints class. The methods differ by the number of references (Section 3.5) they
process: “Mono” for one, “Bi” for two, and “Tri” for three references. A sketch in which a
constraint is to be created must be opened with OpenEdition (Section 5.2).

The parameter “Type” defines the type of constraint and is designated by


a CATConstraintType identifier. An overview of the types of constraints is given in Table 5.2. A
complete list can be taken from the Typeproperty of the Constraint class.
TABLE 5.2 Important Constraint Types and Their Methods
In many cases, when a length, radius, distance, or angle is created, it should also be assigned a
value. Access to the value of a measurement is allowed through Dimension property of
the Constraint class (Section 8.19) :

The Dimension class (Section 8.24) offers a measurement with a value to be assigned
because of the parent classes of the Value property.

Example 5.6: Create Constraint


In a sketch, a line exists. The sketch and line are declared in a macro as the objects “Sketch”
and “Line.” The line receives a length constraint with a value of 50 mm.

6. 3D Wireframe Geometry and Surfaces

Wireframe is a generic term for points, lines, curves, and planes. If a wireframe is attached to
sketch geometry, it is called a 2D wireframe (see Chapter 5). 3D wireframe geometry can be
placed freely in space and is the foundation of describing a surface. (A surface is a two-
dimensional structure spanned by wireframe geometry.) 3D wireframe geometry or surfaces are
commonly referred to as HybridShapes and are represented by the HybridShape class
(Section 8.51).
This chapter describes the creation of 3D wireframe and surface geometry. In addition to the
general procedures of creating points, lines, planes, curves, and surfaces, transformation and
operations will be discussed. A transformation is a distortion, mirror, translation, or replication of
a feature. An operation links multiple geometric elements or changes its topology. Topological
changes modify the number of edges and functional surfaces of geometry.

6.1 General Procedure


The creation of 3D wireframe and surface geometry is made using a 3D toolbox, an object of
the HybridShapeFactory class (Section 8.85). A 3D toolbox can be declared with
the HybridShapeFactory property of the Part class (Section 8.168).
The HybridShapeFactory class offers various methods to define 3D wireframe geometry and
surfaces. The methods start with “AddNew …”.

If the definition of geometry is completed, it will be assigned to a body, geometrical set, or


ordered geometrical set. The assignment is made either with the AppendHybridShape method
of the HybridBody class (Section 8.50) or with the InsertHybridShape method of
the OrderedGeometricalSet (Section 8.161) and Body (Section 8.9) classes. Only by this
assignment is geometry in a CATIA document created and visible. It should be noted that an
assignment to a body is possible only if “Hybrid-design” has been enabled in CATIA.

An overview of the steps is shown in Table 6.1.


TABLE 6.1 General Procedure for Creating 3D Wireframe and Surface Geometry

Example 6.1: Create Points


In an open, active CATPart, the points (20/40.5/100.25) are created in the geometrical set
“Points”.
6.2 Points

A point is a geometric element without spatial definition. A point can be described using
coordinates or its relative location to another geometric element.
The parent class of all points is the Point class (Section 8.173), from which the basic methods
for all point types are available. An overview of the types of points is given in Table 6.2. Each
point type has a specialized class description beginning with “HybridShapePoint….”
Exceptions are extremum and control points that are derived directly from
the HybridShape class.
TABLE 6.2 Point Types and Their Parameters

The following two sections introduce the methods for creating points and include two case
studies.
6.2.1 Methods for Creating Points

The methods to create a point are assigned with the HybridShapeFactory class (Section 8.85).
An overview of the methods is given in Table 6.3.
TABLE 6.3 Methods for Creating Points
(Details of the methods: HybridShapeFactory class, Section 8.85)
For more information:
Reference: Section 3.5 (References)
HybridShapeDirection: Section 3.6 (Direction Definition)
6.2.2 Case Studies: Points

Example 6.2: Between Points


The geometric set “Points” with points “Point.1” and “Point.2” exist in an open, active CATPart.
Between these points, a point can be created that has half the distance from Point 1 to Point 2
(Figure 6.1).

FIGURE 6.1 Result of the example “Between Point”

Example 6.3: Middle Point


The geometrical set “Circle” with a circle “Circle. 1” exists in an open, active CATPart. The
center is to be created from this circle (Figure 6.2).

FIGURE 6.2 Result of the example “Middle Point”


6.3 Lines

A line is a one-dimensional geometry element. A line is defined by two points, two curves, or a
point and a direction.
The parent class of all lines is the Line class (Section 8.156). This class provides basic methods
for all types of lines that have a parameter. Each line type has a specialized class that begins
with the description “HybridShapeLine….” An exception is an axis that is defined through
the HybridShapeAxisLine class (Section 8.55) and is not shown in the inheritance hierarchy
of Line class. An overview of line types is given in Table 6.4.
TABLE 6.4 Line Types and Their Parameters

The following two sections introduce the methods for creating lines and include two case studies.
6.3.1 Methods for Creating Lines

The methods to create a line are assigned to the HybridShapeFactory class (Section 8.85). An
overview of these methods is given in Table 6.5.
TABLE 6.5 Methods for Creating Lines
(Details of the methods: HybridShapeFactory class, Section 8.85)
For more information:
Reference: Section 3.5 (References)
HybridShapeDirection: Section 3.6 (Direction Definition)
6.3.2 Case Studies: Lines

Example 6.4: Connecting Line


In an open, active CATPart, the geometrical set “MyLine” and a line are created. The line spans
the points (0, 0, 0) and (100, 50, 20) and is dependent on these two points (Figure 6.3).

FIGURE 6.3 Result of the example “Connecting Line”

Example 6.5: Direction Lines


The geometrical set “Hedgehog” and the point (0, 0, 0) are created in an open, active CATPart.
Lines extend from this point with the length of 100 mm. The lines’ vectors point in the directions
of the three coordinates in the range [-10, -5, 0, 5, 10] (Figure 6.4).

FIGURE 6.4 Result of the example “Direction Lines”


6.4 Planes

A plane is a planar, two-dimensional geometric element. A plane can be defined by parameters


or referenced to geometrical elements.
The parent class for all planes is the Plane class (Section 8.171) ; the basic methods for all
plane types are available. An overview of the plane types is given in Table 6.6. Each plane type
has a specialized class that begins with the description “HybridShapePlane….”
TABLE 6.6 Plane Types and Their Parameters
6.4.1 Methods for Creating Planes

The methods to create a plane are assigned to the HybridShapeFactory class (Section 8.85).
An overview of these methods is given in Table 6.7.
TABLE 6.7 Methods for Creating Planes
(Details of the Methods: HybridShapeFactory class, Section 8.85)
Some methods use a reference to geometry. The definition of objects in the Reference class is
described in Section 3.5.
6.4.2 Case Studies: Planes

Example 6.6: Offset Plane

The geometrical set “Planes” exists with one plane, “Plane.1,” in an active, open CATPart. From
this plane, a parallel plane is created that passes through the point (100, 50, 100) (Figure 6.5).
FIGURE 6.5 Result of the example “Offset Plane”

Example 6.7: Normal Plane

The geometrical set “Planes” exists with an arc “Circle. 1” in an active, open CATPart. A plane is
created that is perpendicular to the circular arc and passes through a point at the midpoint of the
circular arc (Figure 6.6).
FIGURE 6.6 Result of the example “Normal Plane”
6.5 Curves

A curve is a one-dimensional geometry element, the course of which is not linear. A curve can
be originally described or derived through an operation.
An originally described curve has a predefined curve course. Examples are a circle, arc, and
spline.
A curve that is derived by an operation is formed by the combination of several geometries.
Examples include an intersection, a projection, or the selection of a boundary curve. The course
of a derived curve can vary depending on the geometries used.
This section deals only with original curves and operations; the result is always a curve.
Operations can be the result of a point, curve, or surface (e.g. intersection) and are discussed
in Section 6.8.
TABLE 6.8 Types of Curves
The following two sections introduce the methods for creating a curve and include two case
studies.
6.5.1 Methods for Creating Curves
The methods for creating a curve are assigned with the HybridShapeFactory class (Section
8.85). An overview of methods for creating an original circle type is shown in Table 6.9 and that
of an original curve type is shown in Table 6.10. The methods used to derive an operation on a
curve from existing geometry are shown in Table 6.11.
TABLE 6.9 Methods for Creating Original Circles
(Details of the methods: HybridShapeFactory class, Section 8.85)
TABLE 6.10 Methods for Creating Original Curves
(Details of the Methods: HybridShapeFactory class, Section 8.85)
TABLE 6.11 Methods for Creating a Curve with an Operation
(Details of the Methods: HybridShapeFactory class, Section 8.85)

A spine, polyline, and spline are not yet fully defined after creation. Their planes or points are
specified by the methods of the object created.
The definition of a circular arc is completed with the SetLimitation,
EndAngle, and StartAngle methods of the HybridShapeCircle class (Section 8.59) after a
range object has been created. HybridShapeCircle is a parent class of all 3D circles and 3D
arcs.
Some methods use a reference to geometry. The definition of an object of the Reference class
is described in Section 3.5.
6.5.2 Case Studies: Curves

Example 6.8: Connecting Curves

In an open, active CATPart, the geometrical set “Curves” exists with two parallel lines, “Line.1”
and “Line.2,” with opposite orientation. The four endpoints “Point1A,” “Point1B,” “Point2A,” and
“Point2B” of the two lines also exist. The lines are complemented by two connecting curves,
creating a closed curve (Figure 6.7).

FIGURE 6.7 Result of the example “Connecting Curves”


Example 6.9: Circle through Three Points

The geometrical set “Curves” exists with three points, “Point.1,” “Point.2,” and “Point.3,” in an
open, active CATPart. A complete circle is created through the three points (Figure 6.8).

FIGURE 6.8 Result of the example “Circle through Three Points”


6.6 Surfaces

A surface is a two-dimensional geometrical element spanning a 2D or 3D wireframe or is


derived from an existing surface. The quality of a surface is determined largely by the quality of
the underlying curves. As a rule of thumb: an original curve has a better quality than one derived
by an operation because the curve geometry of an original curve has predetermined properties
(Section 6.5). An overview of the different types of surfaces is given in Table 6.12.
TABLE 6.12 Types of Surfaces
The following two sections introduce the methods for creating surfaces and include two case
studies.
6.6.1 Methods for Creating Surfaces

The methods for creating surfaces are assigned with the HybridShapeFactory class (Section
8.85). An overview of the methods is given in Table 6.13. The first column represents the
surface type, the second column describes the method, and the third column is the result of the
method.
TABLE 6.13 Methods for Creating Surfaces
(Details of the Methods: HybridShapeFactory class, Section 8.85)
The following characteristics are noted for some surfaces:
A HybridShapeBlend object is not fully defined with the creation of a 3D toolbox. It lacks the
curves between which a transition surface is spanned and possibly lacks connection definitions
as well. The additional parameters are added to the methods of the created surface objects. An
example is shown in Example 6.10.
The HybridShapeLoft and HybridShapeFill objects themselves are the methods available to
describe the sections or filling curves.
6.6.2 Case Studies: Surfaces

Example 6.10: Blend

The geometric set “Blend” exists with two curves, “Curve.1” and “Curve.2,” in an open, active
CATPart. The first curve has three points, “P11” to “P13.” The second has two points, “P21” and
“P22.” The blend is created between the two curves with the following couplings: P11-P21, P12-
P21, and P13-P22 (Figure 6.9).

FIGURE 6.9 Result of the example “Blend”


Example 6.11: Fill

The geometrical set “Fill” exists along with the curves “Curve.1,” “Curve.2,” “Curve.3,” and
“Curve.4” in an open, active CATPart. The four curves form a closed, planar curve. A fill is
created within the curve (Figure 6.10).
FIGURE 6.10 Result of the example “Fill”
6.7 Transformations

A transformation is a change or replication of geometry by the means of a transformation


instruction. A transformation instruction is a description of the way geometry is changing or
reproduced. Overviews of wireframe and surface transformations that can be created with
the HybridShapeFactory class are shown in Table 6.14.
TABLE 6.14 Overview of Wireframe and Surface Transformations

The following sections describe the methods for creating transformations and include two case
studies.
6.7.1 Methods for Creating Transformations

The methods for creating a transformation are assigned with the HybridShapeFactory class
(Section 8.85). An overview of the methods is given in Table 6.15.
TABLE 6.15 Methods for Creating Transformations
(Details of the Methods: HybridShapeFactory class, Section 8.85)
Many of the methods need a reference. Definitions of objects in the Reference class are
described in Section 3.5.
The AddNewTranslate method takes a direction definition as parameter. A description of how a
direction definition is created can be found in Section 3.6.
6.7.2 Case Studies: Transformations

Example 6.12: Affinity

The geometrical set “Box” exists along with a join “Surface_Box” in an open, active CATPart.
The join is enlarged in the X-direction by a factor of two and in the Y-direction and Z-direction by
a factor of 1.5. The result is stored in the geometrical set “Box” (Figure 6.11).
FIGURE 6.11 Result of the example “Affinity”

Example 6.13: Axis to Axis


The geometrical set “Envelope” exists with a surface “Rotation.1” in an open, active CATPart.
The CATPart has two axis systems, “Axis System.1” and “Axis System.2.” A second surface is
created relative to “Axis System.2” as “Rotation.1” is transferred from “Axis System.1.”
See Figure 6.12.
FIGURE 6.12 Result of the example “Axis to Axis”
6.8 Operations

An operation is a modification, derivation, or linking of existing geometry. A modification


changes the topology by deforming or cutting the geometry. A derivative generates a new
geometrical element when a region is replaced by existing geometry with an independent
identifier (e.g. the side faces of a cube). A link adds geometric elements together, creating a
federation or a new geometric element due to a combine instruction (e.g. an intersection or
projection).
An overview of operations is shown in Table 6.16. Operations only valid for curves are found
in Section 6.5.
TABLE 6.16 Overview of Types of Operations
6.8.1 Methods for Creating Operations

The methods for creating an operation are assigned with the HybridShapeFactory class
(Section 8.5). An overview of the methods is given in Table 6.17.
TABLE 6.17 Methods for Creating Operations
(Details of the Methods: HybridShapeFactory class, Section 8.85)
Many methods use a reference attribute. Definitions of objects in the Reference class are
described in Section 3.5.
6.8.2 Case Studies: Operations
Example 6.14: Join
The geometrical set “Join” exists along with three surfaces, “Extrude.1,” “Extrude.2,” and
“Extrude.3” in an open, active CATPart. The three surfaces are combined into a join. The result
is shown in Figure 6.13.

FIGURE 6.13 Result of the example “Join”

Example 6.15: Fillet


The geometric set “Fillet” exists along with two surfaces, “Extrude.1” and “Extrude.2,” in an open,
active CATPart. The two surfaces have a fillet with a radius of 10 mm and are trimmed together.
The result is shown in Figure 6.14.
FIGURE 6.14 Result of the example “Fillet”
7. Solids

A solid is a closed, solid body that is created in the “Part Design” workbench. A solid is generally
represented by the Shape class. Depending on the geometry to create, a solid is based on a
sketch, surface, operation, or transformation (Table 7.1). These respective solids are
represented by child classes of the Shape class.
TABLE 7.1 Solids and Their Classes

A sketch-based solid is defined by a sketch, which is drawn along a direction or rotated about
an axis. These solids are assigned to SketchBasedShape class.
A surface-based solid uses surface geometry to derive its features. It describes the envelope or
partial surfaces of the solid. These solids are represented with the SurfaceBasedShape class.
An operation changes the surface characteristics of an existing solid. A transformation
replicates an existing solid. These solids are made from
the DressUpShape and TransformationShape classes.
A special case is a solid created by a logical combination of two bodies (see Section 3.3.4). This
case is called a BooleanShape.
The following sections will show how the different types of solids can be created.

7.1 General Procedure


A solid is always assigned to a body (Section 3.3). To create a solid, you must first create or
declare a body. The result is an object of the Body class, in which a solid can be stored. The
creation and declaration of a body is presented in Section 3.3.1.
If a solid is generated, it is inserted in the tree structure after the object that is being processed.
An insertion point must therefore be activated before creating a solid body. This is accomplished
with the InWorkObject property of the Part class (Section 8.168). An insertion point is
underlined in the construction tree.

A solid is created using a 3D toolbox for solids. A 3D toolbox for solids is represented with
the ShapeFactory class (Section 8.199) and is declared with the ShapeFactory property of
the Part class (Section 8.168). A 3D toolbox for solids provides the “AddNew…” methods for
the creation of a solid.
A newly created solid receives “In-work” status and is highlighted in the tree structure.
The InWorkObject property automatically displays the new solid. Subsequent solids are added
under the “In-work” of the construction tree. After solids are created, the component can be
updated with the Update method of the Part class.
Sub PART.Update
Example 7.1: Creating Solids
The sketch “Sketch.1” exists inside the PartBody in an open, active CATPart. A pad with a
height of 20 mm is created based on this sketch (Figure 7.1).

FIGURE 7.1 Result of the example “Creating Solids”


7.2 Sketch-Based Solids

A sketch-based solid body is defined by one or more sketches. If a sketch-based solid is drawn
along a straight line, it is called a prism. A sketch that is rotated about an axis is called
a revolution. When a sketch is drawn along a curve, it is called a swept solid. A solid that
transitions between two or more sketches is called a transitional solid. An overview of sketch-
based solids is given in Table 7.2.
TABLE 7.2 Overview of Sketch-Based Solids

A solid may have a positive or negative definition. Solids with the same definition are added,
and bodies associated with different solid definitions are subtracted (see Section 3.3). For
example, if a pad and a pocket are created in a body, the intersection of the pad and pocket is
omitted.
The following two sections introduce the methods for creating sketch-based solids and include
two case studies.
7.2.1 Methods for Creating Sketch-Based Solids
The methods for creating a sketch-based volume body are assigned with
the ShapeFactory class (Section 8.199). An overview of these methods is provided in Table 7.3.
TABLE 7.3 Methods for Creating Sketch-Based Solids
(Details of the Methods: ShapeFactory class, Section 8.199)
These methods require either a sketch as a parameter for an object of Sketch class (Section
8.202) or a Reference (Section 8.181). The creation of a sketch is presented in Chapter 5, and
the declaration of a reference is presented in Section 3.5.
Some special objects are noted in the following section:
A hole can be defined by a sketch or a point in space. If a sketch is used, as a standard
practice it should only include one point.
A revolution (Shaft or Groove) of an axis of rotation is required within a sketch (Section 5.3).
A transitional solid (Multi-sections solid) is based on a transitional area in the internal CATIA
data model of the HybridShapeLoft class (Section 8.102). If an object of the Loft class is
created in the first step, the object is created and declared with
the AddNewLoft or AddNewRemovedLoft method using the HybridShape property of the
underlying surface object.
7.2.2 Case Studies: Sketch-Based Solids

Example 7.2: Pad with a Hole


The sketch “Sketch.1” exists with a 50 × 50 mm rectangle in the PartBody in an open, active
CATPart. The rectangle is on the XY plane, centrally positioned to the axis system. A pad with a
height of 20 mm is created in the PartBody, and in its center a hole is created with a diameter of
10 mm (Figure 7.2).

FIGURE 7.2 Result of the example “Pad with a Hole”


Example 7.3: Shaft with a Groove

The sketches “Sketch.1” and “Sketch.2” exist in the PartBody in an open, active CATPart.
“Sketch.1” describes the outer contour of the shaft, and “Sketch.2” describes the contour of the
groove. For both profiles in the PartBody, a shaft is created with a groove (Figure 7.3).
FIGURE 7.3 Result of the example “Shaft with a Groove”

7.3 Surface-Based Solids

A surface-based solid is a solid whose definition is based on a surface. Each surface-based


solid has the SurfaceBasedShape class (Section 8.211) as its parent class. There are two
possibilities for creating surface-based solids:
If a surface or polysurface is thickened in order to create a solid, it is called a volume
creation. A new solid is created in this case.
If a volume change modifies an existing solid, the surface is removed or added.
An overview of the surface-based solid, the surfaces used, and their quality requirements are
provided in Table 7.4.
TABLE 7.4 Overview of Surface-Based Solids

The following two sections describe the methods for creating surface-based solids, and two
case studies are presented.
7.3.1 Methods for Creating Surface-Based Solids

The methods for creating surface-based solids are assigned with the ShapeFactory class
(Section 8.199). An overview of these methods is given in Table 7.5.
TABLE 7.5 Methods for Creating Surface-Based Solids
(Details of the Methods: ShapeFactory class, Section 8.199)
The methods require a parameter for a surface as an object of the Reference class (Section
8.181). The creation of a reference is shown in Section 3.5.
A SewSurface object is the result of surface integration. The AddNewSewSurface method
integrates a surface in an existing solid by adding or removing a partial volume. Either the
surface must fully share the solid, or its edge curves must lay on the surface of the solid. The
same requirements apply for a surface geometry of the AddNewSplit method.
A CloseSurface object is a solid that is enclosed by a surface geometry. The surface geometry
must have no gaps or overlaps. If planar openings are present in the surface geometry, they are
closed automatically with the AddNewCloseSurface method. An opening is planar if its
boundary curves lie on a plane. The edge curves of the surface geometry must be present, so
an opening can be closed.
A ThickSurface object is the result of a surface thickening. The AddNewThickSurface method
may be required to thicken a surface or a polysurface whose radius of curvature is greater than
the thickness of the surface geometry.
7.3.2 Case Studies: Surface-Based Solids

Example 7.4: Thick Surface


The geometrical set “Surface” exists with the extrusion “Extrude.1” in an active, open CATPart.
The extrusion surface is thickened equally by 5 mm in both directions, and the result is stored in
the PartBody (Figure 7.4).
FIGURE 7.4 Result of the example “Thick Surface”

Example 7.5: Close Surface


The geometrical set “Surfaces” exists with four extrusion surfaces, “Extrude.1” through
“Extrude.4,” in an active, open CATPart. The extrusion surfaces are combined to form a joined
surface from which a closed surface is created. The solid will be built in the Part-Body (Figure
7.5).
FIGURE 7.5 Result of the example “Close Surface”
7.4 Transformation-Based Solids

A transform-based solid is a solid resulting from a transformation. A transformation is caused by


changing or replicating a solid. A change moves, rotates, or scales a solid.
A replication produces multiple identical features of a solid.
An overview of the change transformations is given in Table 7.6 and that of replication
transformations in Table 7.7.
TABLE 7.6 Overview of Change Transformations

TABLE 7.7 Overview of Replication Transformations


The following two sections describe the methods for creating transformation-based solids, and
two case studies are presented.
7.4.1 Methods for Creating Transformation-Based Solids

The methods for creating transformation-based solids are assigned with


the ShapeFactory class (Section 8.199). An overview of the methods for creating change
transformations is given in Table 7.8 and that for creating replication transformations in Table
7.9.
TABLE 7.8 Methods for Creating Change Transformations
(Details of the Methods: ShapeFactory class, Section 8.199)

TABLE 7.9 Methods for Creating Replication Transformations


(Details of the Methods: ShapeFactory class, Section 8.199)
Some methods require parameters as objects of the Reference class (Section 8.181). Creating
a reference is shown in Section 3.5.
The AddNewTranslate2, AddNewRotate2, AddNewScaling, AddNewScaling2,
AddNewSymmetry2, and AddNewMirror methods do not have a body as a parameter and
apply the transformation to the solid that is being processed (see Section 7.1).
Each pattern represents only the solid, which is specified as a parameter in its method. A user
pattern is determined by the execution of the AddNewUserPattern method. The positions in the
pattern must be determined later with the AddFeatureToLocate-Positions method of
the UserPattern class. This method generally uses a sketch that contains points.

7.4.2 Case Studies: Transformation-Based Solids

Example 7.6: Mirror


In an open, active CATPart, the PartBody contains the pad “Pad.1” and the geometrical set
“Plane” with a plane “Plane.1.” The pad should is mirrored around the plane. The result will
appear under the object “Pad.1” in the tree (Figure 7.6).
FIGURE 7.6 Result of the example “Mirror”

Example 7.7: Rectangular Pattern


In an open, active CATPart, the PartBody contains the pad “Pad.1” and the hole “Hole.1.” The
hole is to be replicated along the positive and negative X and Y directions with a distance of 20
mm. The result is a pattern with 3 × 3 holes, with the original hole located in the center of the
pattern (Figure 7.7).
FIGURE 7.7 Result of the example “Rectangular Pattern”
7.5 Operations

An operation is a change of any edges or faces of a solid. An operation can change the
topology of a body or just its BRep names (see Section 3.5.4). When an operation changes the
number of edges or sub-surfaces of a solid or its form, this is referred to as a topological change.
The creation of a fillet, chamfer, or shell element are examples of topological changes, since a
solid receives additional surfaces. The creation of a thread operation does not change the
topology of a solid, but the BRep names of the involved surfaces are modified. An overview of
the surface operations on a solid is given in Table 7.10 and that of edge operations on solids
in Table 7.11.
TABLE 7.10 Surface Operations on Solids

TABLE 7.11 Edge Operations on Solids


The following two sections describe the methods for creating operations on solids, and two case
studies are presented.
7.5.1 Methods for Creating Operations on Solids

The methods for creating operations on solids are assigned with the ShapeFactory class
(Section 8.199). An overview of the methods is given in Table 7.12.
TABLE 7.12 Methods for Creating Operations on Solids
(Details of the Methods: ShapeFactory class, Section 8.199)
When declaring a reference that is used as a parameter in one of the methods listed, note that:
An edge that accounts for an operation is declared a “Removed Edge” (REdge).
An area that is omitted or trimmed is called a “Removed Surface” (RSur).
To reflect this in a macro, the method should create the operation with an empty reference as a
parameter to pass. Then set the methods of the created object, even the edges or faces
(see Example 7.8). The declaration of an empty reference is explained in Section 3.5.3.
7.5.2 Case Studies: Operations

Example 7.8: Constant Fillets


The pad “Pad.1” exists in the PartBody in an open, active CATPart. The pad is based on the
sketch “Sketch.1.” The pad is filleted on all four vertical edges with radius of 10 mm (Figure 7.8).

FIGURE 7.8 Result of the example “Constant Fillets”


Example 7.9: Draft
In an open, active CATPart, the pad “Pad.1” exists in the PartBody with a circular contour. The
pad’s outer surface is drafted at 15°. The draft direction is (0, 0, 1). The edge at the top of the
pad must not be dimensionally changed. The result is shown in Figure 7.9.
FIGURE 7.9 Result of the example “Draft”
8. Featured Object Classes
In this chapter, featured CATScript classes have been collected alphabetically along with
their properties and methods. These classes are used in the creation of geometry in a
CATPart, the creation of product structures in a CATProduct, and to communicate with a user.

8.1 Add

This class represents a solid created by the Boolean operation “Add” (see Section 3.3.4). An
object of this class is created with the Add-NewAdd method of the ShapeFactory class
(Section 8.199). This class has no properties or methods. The properties and methods of the
parent classes are used.
Object Path: AnyObject.Shape.BooleanShape.Add

8.2 Angle
This class represents an angle parameter (see Section 3.4.1). To access the properties of this
parameter, use the parent Dimension (Section 8.24), RealParam (Section 8.179),
and Parameter (Section 8.166) classes. This class has no properties or methods.
Object Path: AnyObject.Parameter.RealParam.Dimension.Angle

8.3 AngularRepartition
This class represents a partial definition of the replication parameters of a circular pattern. An
object of this class is created in the CircPattern class (Section 8.15).
Object Path: AnyObject.Repartition.AngularRepartition
AngularSpacing As Angle (Read Only)
This property returns the angular distance between the instances of a circular pattern.

InstanceSpacing As Angle (Read Only)


This property returns the angular distance between the instances of a circular pattern for the
“Instances and Unequal Angular Spacing” mode.

8.4 AnyObject
This class is the base class of all individual objects and provides the basic methods and
properties that are available (see Section 1.3.3).
Object Path: CATBaseDispatch.AnyObject
Application As Application (Read Only)
This property is the root object for all the other objects.
Func GetItem ([IDName] As CATBSTR) As CATBaseDispatch
This method returns an object based on its identification name “IDName.”

Name As CATBSTR
This property returns the internal name of an object.

Parent As CATBaseDispatch (Read Only)


This property returns the parent object of an object (e.g. the angle of a draft is the DraftDomain).

8.5 Application

This class represents a CATIA application (see Section 1.10.1).


Object Path: AnyObject.Application
ActiveDocument As Document (Read Only)
This property returns the active CATIA document.

ActivePrinter As Printer
This property returns the currently active printer.
ActiveWindow As Window (Read Only)
This property returns the currently active CATIA window.

CacheSize As Long
This property returns the size of the DMU cache in MB.
Caption As CATBSTR
This property returns the name of an application. “CATIA V5” corresponds to the application
name in the main CATIA window.
CreateMail As Mail
This method creates an object of the “Mail” class, which defines an email and can then be sent.

DisplayFileAlerts As Boolean
This property returns whether or not system messages are displayed while a file is being
accessed.

Documents As Documents (Read Only)


This property returns a collection of all loaded CATIA documents. The collection includes all the
documents in the CATIA window and all the components and sub-assemblies of a CATProduct.

FileSearchOrder As CATBSTR
This property returns the search order when you open a CATIA document. Multiple search
paths are separated by colons.

Func FileSelectionBox ([Title] As CATBSTR, [Type] As CATBSTR, [Mode] As


CatFileSelectionMode) As CATBSTR
This property opens CATIA dialog box to open or save a file (Sections 2.2.2 and 2.2.3).
FileSystem As FileSystem (Read Only)
This property returns an interface that allows access to the file system of a computer.

FullName As CATBSTR (Read Only)


This property returns the full name including the absolute path of the CATIA application (e.g.
C:\Program Files\Dassault Systemes\code\bin\CNEXT.exe).

Func GetWorkBenchID As CATBSTR


This function returns the internal name of the current workbench. The name can be used in
the StartWorkBench method.
Height As Long
This property returns the height of the CATIA application window in pixels.
Sub Help [What] As CATBSTR
This method calls the CATIA online help based on the “What” topic. The path of the online
documentation must be set in the CATIA options.

Interactive As Boolean
This property returns whether a user can interact with the CATIA application.

Func InputBox ([Text], [Title], [Default Value] As String, [XPos], [YPos] As Integer,
[Helpfile] As String, [Index] As Long) As String
Input window, see Section 2.1.2.
Left As Long
This property returns the distance of the CATIA application window to the left of the screen in
pixels.
LocalCache As CATBSTR
This property returns the absolute path of the local cache.

Func MsgBox ([Text] As String, [Button] As Integer, [Title, Helpfile] As String, [Index] As
Long) As Integer
Input window, see Section 2.1.1.
Path As CATBSTR (Read Only)
This property returns the path name of the CATIA V5 program file.
Printers As Printers (Read Only)
This property returns a collection of available printers in CATIA V5.
Sub Quit
This method closes an application and saves all open documents.
RefreshDisplay As Boolean
This property returns whether the screen is updated during the execution of a macro. If the
property is “False,” computing power is saved.

SettingControllers As SettingControllers
This property returns the settings of the “Tools/Options.” Since each option method exists with
its own name, you should look up the individual names as needed. The command button
“Dumps Parameter Values” in the “Tools/Options” (see icon in the margin) dialog box creates an
extract of setting parameters exported as CATVBS. The script collects all of the necessary
information.

Sub StartCommand [ID] As CATBSTR


This method starts a CATIA command with the name or number of the “ID.”
Sub StartWorkbench [ID] As CATBSTR
This method starts a work environment with the name of the “ID.” For “Part Design,” the name is
“PrtCfg;” for “Generative Shape Design,” the name is “CATShapeDesignWorkbench.” Other
names may be obtained via the GetWorkBenchID function.

StatusBar As CATBSTR
This property returns the text in the CATIA status bar that displays in the lower-left corner of the
application window (see Section 1.8.1).
SystemConfiguration As SystemConfiguration
This property returns a service that provides access to the system configuration of CATIA.

SystemService As SystemService (Read Only)


This property returns an interface between CATIA V5 and an operating system. The interface
variables can read and print commands and run external programs (see Sections 2.7 and 2.8).
Top As Long
This property returns the distance of the CATIA application window to the top of the screen in
pixels.
Visible As Boolean
This property returns whether the CATIA application window is visible to a user.

ATTENTION: If the variable is set to “False,” CATIA will be running a process in the
background! In this case a user will have no access to a macro while running.
Width As Long
This property returns the width of the CATIA application window in pixels.
Windows As Windows (Read Only)
This property returns a collection of all open windows in a CATIA application. It is a subset of
the collection of the Documents property.

8.6 Assemble

This class represents a solid created by a Boolean “Assembly” (see Section 3.3.4). An object of
this class is derived with the AddNewAssemble method of the ShapeFactory class (Section
8.199). This class has no properties or methods. The properties and methods of its parent
classes are available.
Object Path: AnyObject.Shape.BooleanShape.Assemble

8.7 Axis2D
This class represents a 2D axis system of a sketch (see Section 5.4). An object of this class is
derived with the AbsoluteAxis property of the Sketch class (Section 8.202).
Object Path: AnyObject.GeometricElement.Geometry2D.Axis2D
HorizontalReference As Line2D (Read Only)
This property returns the horizontal axis of a 2D axis system.

Origin As Point2D (Read Only)


This property returns the origin of a 2D axis system.

VerticalReference As Line2D (Read Only)


This property returns the horizontal axis of a 2D axis system. Refer
to HorizontalReference above.

8.8 Bodies

This class represents a collection object bodies, including the PartBody in a CATPart
(see Section 3.3.1). An object of the class is declared with the Bodies property of the Part class
(Section 8.168).
Object Path: Collection.Bodies
Func Add As Body
This method creates a new body in the object collection.

Func Item ([Index] As CATVariant) As Body


This method reads a body from the object collection. “Index” can be described by a number or
the name of a body.
8.9 Body

This class represents a body (for example, the PartBody) in a CATPart (see Section 3.2). The
definition of a body is accomplished with the Part (Section 8.168) or Bodies (Section 8.8)
classes.
Object Path: AnyObject.Body
HybridBodies As HybridBodies
This property returns a collection of all geometrical sets (see Section 3.3) in a body. The
property searches only the first level of a body. Nested bodies are ignored.

HybridShapes As HybridShapes (Read Only)


This property returns a collection of all the 3D wireframe geometries and surfaces in a body.
Only the elements that are in the first level of a body will be considered.

Func InBooleanOperation As Boolean


This property returns whether a body is associated in a Boolean operation with another body. If
this is not the case, “False” is returned.

Sub InsertHybridShape [Object] As HybridShape


This method has a predefined 3D wireframe or surface in a body if the “Hybrid Design” mode is
enabled (see Section 6.1).

OrderedGeometricalSets As OrderedGeometricalSets (Read Only)


This property returns the collection of all ordered geometrical sets in a body. Only the items that
are in the first level of the body are taken into account.

Shapes As Shapes
This property returns a collection of all solids (pads, shafts, etc.) in a body. Boolean operators
are also called shapes (e.g. Assemble.1). The property searches only the first level of a body.
Nested bodies are ignored.

Sketches As Sketches
This property returns a collection of all the sketches in a body. The property searches only the
first level of a body. Nested bodies are ignored.
8.10 BooleanShape

This class represents a solid resulting from a Boolean operation (see Section 3.3.4). The class
provides basic features for the subordinate Add (Section 8.1), Assemble (Section
8.6), Intersect (Section 8.150), Remove (Section 8.185), and Trim (Section 8.221) classes.
Object Path: AnyObject.Shape.BooleanShape
Body As Body (Read Only)
This property returns a body that is inserted with a Boolean operation.

Sub SetOperatedObject [Body] As Reference


This method sets the body that is inserted via a Boolean operation into another body (second
operand).

8.11 BoolParam

This class represents a parameter of the CATIA “Boolean” type (see Section 3.4.1). An object of
the class is created with the CreateBoolean method of the Parameters class (Section 8.167).
Object Path: AnyObject.Parameter.BoolParam
Value As Boolean
This property returns the value of the parameter.

8.12 CATBaseDispatch
This class is the root class of all the objects of CATScript (see Section 1.3.3). The subordinate
classes AnyObject (Section 8.4) and Collection (Section 8.17) are derived from this class.
Object Path: CATBaseDispatch
8.13 Chamfer

This class represents a chamfer (see Section 7.5). An object of the class is derived with
the Add-NewChamfer method of the ShapeFactory class (Section 8.199).
Object Path: AnyObject.Shape.DressUpShape. Chamfer

Sub AddElementToChamfer [Edge] As Reference


This method adds an edge to a chamfer definition (“Objects to Chamfer” field).

Angle As Angle (Read Only)


This property returns the angle of a chamfer (“Angle” field).

ElementsToChamfer As References (Read Only)


This property returns the collection of edge references in a chamfer (“Objects to Chamfer” field).

Length1 As Length (Read Only)


This property returns the first length of a chamfer (“Length 1” field). The value can be edited with
the Value method.

Length2 As Length (Read Only)


This property returns the second length of a chamfer (“Length 2” field). The property is only
accessible when the Mode property is set to “catTwoLengthChamfer.” The value can be
changed with the Value method.
Mode As CATChamferMode
This property returns whether a chamfer is set to the “Length1/Angle” or the “Length1/Length2”
mode (“Mode” field). The value range is “catTwoLengthChamfer” (Length1/Length2) and
“catLengthAngleChamfer” (Length1/Angle).

Orientation As CATChamferOrientation
This property returns the orientation of a chamfer (“Reverse” check box). In a non-symmetrical
chamfer, the orientation affects the geometry (L1/L2 and L2/L1). The value range is
“catNoReverseChamfer” (as defined when created) and “catReverseChamfer” (reversed).
Propagation As CATChamferPropagation
This property returns the first length of a chamfer (“Length 1” field). The value can be edited with
the Value method.

Sub WithdrawElementToChamfer [Edge] As Reference


This method removes an edge from a chamfer definition.

8.14 Circle2D

This class represents a complete circle or an arc (see Section 5.2). An object of the class is
created with the CreateClosedCircle or CreateCircle methods of the Factory2D class (Section
8.35).
Object Path: AnyObject.GeometricElement.Geometrie2D.Curve2D.Circle2D
CenterPoint As Point2D
This property returns the center of a circle. A 2D-point can logically be assigned to a circle as a
center point through this property.

Sub GetCenter [Point] As CATSafeArrayVariant


This method reads the coordinates of the center of a circle.

Radius As Double (Read Only)


This property returns the radius of a circle.

Sub SetData [X, Y, R] As Double


This method uses the center and radius of a circle.
8.15 CircPattern

This class represents a solid resulting from the “Circular Pattern” transformation (see Section
7.4). An object of the class is created with
the AddNewCircPattern or AddNewSurfacicCircPattern methods of the ShapeFactory class
(Section 8.199).
Object Path: AnyObject.Shape.TransformationShape.Pattern.CircPattern

AngularDirectionRow As IntParam (Read Only)


This property returns the position at which an original object is located within a pattern in the
angular direction (“Row in Angular Direction” field).

AngularRepartition As AngularRepartition (Read Only)


This property returns the parameters of a pattern in the angular direction.

CircularPatternParameters As CATCircularPatternParameters
This property returns whether the instances are distributed equally around the circumference or
with a defined angle to one another (“Parameters” field). The value range is
“catInstancesAndAngularSpacing” (Instances and angular spacing type), “cat-Complete-Crown”
(complete crown), and “catUnequalAngularSpacing” (Instances and unequal angular spacing
type).

Sub GetRotationAxis [Vector] As CATSafeArrayVariant


This method reads the unit vector of the rotation axis in a circular pattern.

Sub GetRotationCenter [Point] As CATSafeArrayVariant


This method reads from the center point of a rotation field (if the point exists).

RadialAlignment As Boolean
This property returns the radial alignment of the instances in a circular pattern (“Radial
Alignment of Instances” check box). The property is “True” if the instances are rotated with the
angle and are the same orientation to the axis. The property is “False” if the orientation is not
changed with respect to the original element.

RadialDirectionRow As IntParam (Read Only)


This property returns the position at which an original object is located within a pattern in the
radial direction (“Row in Radial Direction” field).

RadialRepartition As LinearRepartition (Read Only)


This property returns the parameters of a circular pattern in the radial direction.

RotationOrientation As Boolean
This property returns the orientation of an axis of rotation (“Reverse” field). An axis is inverted if
the property is “False.” The angular direction and radial direction can be determined by the right-
hand rule (thumb = rotation axis, index finger = radial direction, middle finger = angle direction).
Sub SetInstanceAngularSpacing [Number] As Long, [Angle] As Double
This method sets the “Instances & unequal angular spacing” type in a circular pattern with the
angle of the instance at position “Number.”

Sub SetRotationAxis [Direction] As Reference


This method sets the rotation axis of a circular pattern. When a plane is used as a reference, it
is rotated around the normal vector of the plane.

Sub SetRotationCenter [Point] As Reference


This method sets the center of rotation.

Sub SetUnEqualInstanceNumber [Number] As Long


This method defines the number of instances in a circular pattern with the “Instances & unequal
angular spacing” type. The original element is included in this number.
8.16 CloseSurface

This class represents a solid resulting from the closure of surfaces (see Section 7.3). An object
of this class is created with the AddNewCloseSurface method of the ShapeFactory class
(Section 8.199). The class itself does not have properties or methods.
Object Path: AnyObject.Shape.SurfaceBasedShape.CloseSurface

8.17 Collection
This class is the base class of all collection objects (see Section 1.3.3). It provides basic
methods and properties for a collection object.
Object Path: CATBaseDispatch.Collection
Application As Application (Read Only)
This property returns the application, which includes an object collection.
Count As Long (Read Only)
This property returns the number of elements in an object collection.

Func GetItem ([IDName] As CATBSTR) As CATBaseDispatch


This method returns an object of the collection based on its name “IDName.”

Name As CATBSTR
This property returns the name of a collection object.

Parent As CATBaseDispatch (Read Only)


This property returns the parent object of a collection object.

8.18 ConstRadEdgeFillet

This class represents an edge fillet with a constant radius (see Section 7.5). An object of the
class is created with
the AddNewSolidEdgeFilletWithConstantRadius or AddNewSurfaceEdgeFilletWithConsta
ntRadius methods of the ShapeFactory class (Section 8.199). Additional methods are
available in the parent EdgeFillet class (Section 8.31).
Object Path: AnyObject.Shape.DressUpShape.Fillet.EdgeFillet.ConstRadEdgeFillet

Sub AddObjectToFillet [Edge] As Reference


This method adds an edge to the fillet definition (“Objects to Fillet” field). An edge is declared as
a “Removed Edge” (Section 3.5.4).

ObjectsToFillet As References (Read Only)


This property returns the collection of edges to be filleted (“Objects to Fillet” field).

Radius As Length (Read Only)


This property returns the parameter of the radius (“Radius” field).

Sub WithdrawObjectToFillet [Edge] As Reference


This method removes an edge from the fillet definition (“Objects to Fillet” field).

8.19 Constraint

This class represents a constraint (see Section 5.4). An object of this class is derived from
the Constraints class (Section 8.20).
Object Path: AnyObject.Constraint
Sub Activate
This method activates a constraint.

AngleSector As CATConstraintAngleSector
This property returns the orientation angle of a constraint to its elements. The value range is
“catCstAngleSector0” (same orientation, positive side), “catCstAngleSector1” (opposite
orientation, positive side), “catCstAngleSector2” (opposite orientation, negative side), and
“catCstAngleSector3” (same orientation, negative side).

Sub Deactivate
This method deactivates a constraint. A deactivated constraint is not considered when updating
a component.
Dimension As Dimension (Read Only)
This property returns the dimension of a length, distance, or angle constraint. The value of the
dimension can be changed with the Value property of the Dimension class (Section 8.24).

DistanceConfig As CATConstraintDistConfig
This property returns the orientation of each of the elements in a distance constraint. The value
range is “catCstDCUnspec” (no constraint), “catCstDCParallel” (parallel orientation free),
“catCstDCParallelSameOrient” (parallel, same orientation), and “catCstDCParallel-OppOrient”
(parallel, opposite orientation).

DistanceDirection As CATConstraintDistDirection
This property returns, for a distance constraint, whether the constraint is aligned with an axis or
at an element. The orientation of an element takes place with the “catCstDistDirectionNone”
value. The value range is “catCstDistDirectionNone” (no orientation), “catCstDistDirection1”
(orientation to the x-axis or h-axis, 2D and 3D), “catCstDistDirection2” (orientation to the y-axis
or v-axis, 2D and 3D), and “catCstDistDirection3” (orientation to the z-axis, 3D).

Func GetConstraintElement ([Index] As Long) As Reference


This method reads the reference number of the “Index” of a constraint. Exceeding the “Index”
number of references cancels a macro with an error message.

Sub GetConstraintVisuLocation [AnchorPoint, AnchorVector] As CATSafeArrayVariant


This method returns the location where a constraint is visualized. “AnchorPoint” is the body as
defined in 3D. “AnchorVector” is the direction normal to the plane of visualization as a unit
vector.

Func IsInactive As Boolean


This method reads the activation status of a constraint. The value of a disabled constraint is
“True.”
Mode As CATConstraintMode
This property returns whether a constraint is a driving constraint (value is
“catCstModeDrivingDimension”) or is driven (value equal to “catCstModeDrivenDimension”).

Orientation As CATConstraintOrientation
This property returns the orientation of a constraint. The property is used only under constraints
between two objects and returns the orientation of the second object to the first. The value
range is “catCstOrientSame” (same orientation), “catCstOrientOpposite” (opposite direction),
and “catCstOrientUndefined” (orientation is not defined).

ReferenceAxis As CATConstraintRefAxis
This property returns an axial parallelism or orthogonality to the reference axis. The range is
“catCstRefAxisX” (parallel or perpendicular to the x-axis), “catCstRefAxisY” (parallel or
perpendicular to the y-axis), and “catCstRefAxisZ” (parallel or perpendicular to the z-axis).
ReferenceType As CATConstraintRefType
This property returns an assembly constraint, such a component being moved. If the value is
“catCstRefTypeRelative,” the component does not move when updated. If the value is
“catCstRefTypeFixInSpace,” the component moves when updating the fixed position.

Sub SetContraintElement [Index] As Long, [Reference] As Reference


This method sets the reference number of the “Index” of a constraint. The “Index” may not
exceed the number of references to a constraint.

Sub SetConstraintVisuLocation [X, Y, Z] As Double


This method determines the location at which a constraint is visualized. There are always all
three coordinates to specify. In the case of a 2D constraint, this method ignores the value of
each unsuitable coordinate (e.g. a sketch in an YZ plane, the X value).

Side As CATConstraintSide
This property defines the side of a constraint associated with it. The value range is
“catCstSidePositive” (positive side), “catCstSideNegative” (negative side),
“catCstSideSameAsValue” (same side as value), “catCstSideOppositeToValue” (opposite side
as value), and “catCstSideUndefined” (side not defined).

Status As CATConstraintStatus (Read Only)


This property returns the status of a constraint. The value range is “catCstStatusOK” (constraint
in order), “catCstStatusKOStronglyNotSatisfied” (constraint is not applicable),
“catCstStatusKOWrongOrientOrSide” (constraint wrong orientation),
“catCstStatusKOWrongValue” (value of the constraint is not applicable),
“catCstStatusKOWrongGeomEltType” (geometry does not match the constraint), and
“catCstStatusKOBroken” (reference geometry is missing).

Type As CATConstraintType (Read Only)


This property returns the type of constraint.

Value ranges of CATConstraintType identifiers:


0: catCstTypeReference (Datum Fixes)
1: catCstTypeDistance (Distance)
2: catCstTypeOn (Identity, Coincidence)
3: catCstTypeConcentricity (Concentricity)
4: catCstTypeTangency (Tangency)
5: catCstTypeLength (Length)
6: catCstTypeAngle (Angle)
7: catCstTypePlanarAngle (Planar Angle)
8: catCstTypeParallelism (Parallelism)
9: catCstTypeAxisParallelism (Axis Parallelism)
10: catCstTypeHorizontality (Horizontality)
11: catCstTypePerpendicularity (Perpendicularity)
12: catCstTypeAxisPerpendicularity (Axis Perpendicularity)
13: catCstTypeVerticality (Verticality)
14: catCstTypeRadius (Radius)
15: catCstTypeSymmetry (Symmetry)
16: catCstTypeMidPoint (MidPoint)
17: catCstTypeEquidistance (Equidistance)
18: catCstTypeMajorRadius (Major Radius)
19: catCstTypeMinorRadius (Minor Radius)
20: catCstTypeSurfContact (Surface Contact)
21: catCstTypeLinContact (Line Contact)
22: catCstTypePoncContact (Contact)
23: catCstTypeChamfer (Chamfer)
24: catCstTypeChamferPerpend (Chamfer)
25: catCstTypeAnnulContact (Contact)
26: catCstTypeCylinderRadius (Cylinder Radius)

8.20 Constraints

This class represents a collection of the constraints in a sketch or CATPart (see Section 5.4).
An object of this class is declared with the Constraints property of the Part (Section 8.168)
or Sketch (Section 8.202) classes.
Object Path: Collection.Constraints
Func AddBiEltCst ([Type] As CATConstraintType, [Reference1, Reference2] As
Reference) As Constraint
This method creates a constraint between two references (see Section 5.4). “Type” must be a
value of the CATCONSTRAINTTYPE identifier (see Section 8.19, Type property).

Func AddMonoEltCst ([Type] As CATConstraintType, [Reference] As Reference) As


Constraint
This method creates a constraint to an object (see Section 5.4). “Type” must be a value of the
CATCONSTRAINTTYPE identifier (see Section 8.19, Type property).

Func AddTriEltCst ([Type] As CATConstraintType, [Reference1, Reference2, Reference3]


As Reference) As Constraint
This method creates a constraint between three references (see Section 5.4). “Type” must be a
value of the CATCONSTRAINTTYPE identifier (see Section 8.19, Type property).
BrokenConstraintsCount As Long (Read Only)
This property returns the number of broken constraints in the collection.

Func Item ([Index] As CATVariant) As Constraint


This method reads the constraint of the “Index” number from the collection. The “Index” can be
specified with a counter or the name of a constraint.

or

Sub Remove [Index] As CATVariant


This method deletes the constraint of the “Index” number from the collection. The “Index” can be
specified with a counter or the name of a constraint.

UnUpdatedConstraintsCount As Long (Read Only)


This property returns the number of non-updated constraints in the collection.

8.21 ControlPoint2D

This class represents a control point of 2D splines (see Section 5.2). An object of this class is
created with the CreateControlPoint method of the Factory2D class (Section 8.35).
Object Path: AnyObject.GeometricElement.Geometry2D.Point2D.ControlPoint2D
Curvature As Double
This property returns the curvature at a control point.

Sub GetTangent [RVector] As CATSafeArrayVariant


This method reads the direction of tangency to a spline through a control point as the “RVector”
field.

Sub SetTangent [DX, DY] As Double


This method sets the direction of tangency to a spline at a control point.

Sub UnsetCurvature
This method overrides a constraint that has been associated with Curvature.

Sub UnsetTangent
This method overrides a constraint that has been associated with SetTangent.

8.22 Curve2D
This class represents a 2D curve. It is a parent class of all 2D curves and provides the basic
properties and methods.
Object Path: AnyObject.GeometricElement.Geometry2D.Curve2D
Continuity As Short (Read Only)
This property returns the highest degree of geometric continuity of a curve (e.g. a line has the
value “2”).

EndPoint As Point2D
This property returns the end point of a curve.

Sub GetCurvature [Parameter] As Double, [Continuity] As CATSafeArrayVariant


This method reads the curvature and the unit vector of the curvature at a location (“Parameter”)
on a curve.

Sub GetDerivatives [Parameter] As Double, [Derivation] As CATSafeArrayVariant


This method reads the value of the first, second, and third derivatives at a location (“Parameter”)
on a curve.

Sub GetEndPoints [Coordinates] As CATSafeArrayVariant


This method reads the coordinates of a start and end point of a curve as a field.

Func GetLengthAtParam ([StartParameter, EndParameter] As Double) As Double


This method reads the length of a curve between the points “StartParameter” and “End-
Parameter.” The unit of length is based on the units of CATIA. By default these are in mm.

Func GetParamAtLength ([StartParameter, DeltaLength] As Double) As Double


This method reads the parameters of a point as measured from another point at the location
“Parameter.” The distance on the curve from this point is the “DeltaLength.” The direction is
determined by the logical progression of the curve. The unit of length is based on the units of
CATIA. By default these are in mm.
Sub GetParamExtents [Value] As CATSafeArrayVariant
This method determines the start and end point parameters of a curve.

Sub GetPointAtParam [Parameter] As Double, [Point] As CATSafeArrayVariant


This method determines the coordinates of a point on a curve “Parameter.”

Sub GetRangeBox [Coordinates] As CATSafeArrayVariant


This method determines the coordinates of the rectangle enclosing a curve. The edges of the
rectangle are axes aligned parallel and vertical.

Sub GetTangent [Parameter] As Double, [Vector] As CATSafeArrayVariant


This method reads the tangent vector of a curve at the location “Parameter.”

Func IsPeriodic As Boolean


This method checks whether a curve is periodic. For instance, a circle is periodic (“True”); a line
is not (“False”).
Period As Double (Read Only)
This property returns the period of a curve. If there is no period, “Null” is returned.

StartPoint As Point2D
This property returns the starting point of a curve.

8.23 DesignTable

This class represents a design table (Section 3.4.2). An object of this class is derived with
the CreateDesignTable or CreateHorizontalDesignTable methods of the Relations class
(Section 8.184).
Object Path: AnyObject.KnowledgeObject.KnowledgeActivateObject.Relation.DesignTable
Sub AddAssociation [Parameter] As Parameter, [Column] As CATBSTR
This method associates a parameter (“Parameter”) with a column (“Column”) of a design table.
The (“Column”) must exactly match the name of a parameter in a design table.

Sub AddNewRow
This method adds an additional configuration to a design table. The values are extracted from
the associated parameters.

Func CellAsString ([Row, Column] As Short) As CATBSTR


This method reads a value of the design table. Note: the row or column headings are in the first
row or column (depending on the orientation of the table).

ColumnsNb As Short (Read Only)


This property returns the number of columns in a design table.

Configuration As Short
This property returns the active configuration of a design table.

CopyMode As Boolean
This property returns whether the content of a CATIA document is included in a design table
(“True”: content is included).

FilePath As CATBSTR
This property returns the file name of a design table. The file name is described completely.

Sub RemoveAssociation [Column] As CATBSTR


This method removes the link between a parameter and a column (“Column”). The “Column”
must exactly match the name of the parameter in the design table.

Sub Synchronize
This method synchronizes a design table with its source file.
8.24 Dimension

This class represents a geometric parameter of the “Dimension” type. It is a parent class of
the Length (Section 8.154) and Angle (Section 8.2) classes.
Object Path: AnyObject.Parameter.RealParam.Dimension
Unit As CATIAUnit (Read Only)
This property returns the unit of a geometrical parameter. This class provides
the CATIAUnit methods of the AnyObject class (see Section 8.4).

Func ValueAsString2 ([Decimal Places] As Long, [Populate] As Boolean) As CATBSTR


This method returns the value of a parameter with a defined number of decimal places as a
string. If there are not enough decimal places, they will be filled with zeros when “Populate” is
set to “True.”

8.25 Document

This class represents a CATIA document such as a CATPart, CATDrawing, or CATProduct


(see Sections 1.10.2 and 2.2). This class provides basic methods and properties of
the PartDocument (Section 8.169), ProductDocument, and DrawingDocument child classes.
An object of this class is derived from the Application (Section 8.5) or Documents (Section
8.26) classes.
Object Path: AnyObject.Document
Sub Activate
This property method enables a document. The work environment is automatically adjusted for
the CATIA document.

Cameras As Cameras (Read Only)


This property defines a collection of cameras in a document.

Sub Close
This method closes a document. It does not check whether the document must be saved.

Sub CreateFilter [Name, Definition] As CATBSTR


This method creates a filter temporarily called “Name” according to the definition of “Definition.”
The definition is a logical combination of layers. An overview of the logical combinations of
layers in CATIA is under the menu item “Tools/Visualization Filters.”
Func CreateReferenceFromName ([Object Name] As CATBSTR) As Reference
This method creates a reference by the name of an object (see Section 3.5.3).
CurrentFilter As CATBSTR
This property returns the active filter of a document (also see CreateFilter).

CurrentLayer As CATBSTR
This property returns the active layer of a document. A layer is accessed by name, not by
number (e.g. “Grid” for the layer “3”).

Sub ExportData [Name, Format] As CATBSTR


This method saves a document with the name “Name” in an external data format (“Format”).
The name must include the path. The settings for export are made under “Tools/Options.”

Depending on your license, the following formats can be selected:


CGM: *.cgm
DXF: *.dxf
IGES: *.igs, *.ig2
STEP: *.stp
STL: *.stl
V4 Model: *.model
VRML: *.wrl
FullName As CATBSTR (Read Only)
This property returns the full name of a document (e.g. “C:\temp\Product1.CATProduct”). If a
document has not been saved, the name without a path is given (e.g. “Product1.CATProduct”).

Func GetWorkBench ([Environment] As CATBSTR) As Workbench


This method returns a location of a document.
Func Indicate2D ([Text] As CATBSTR, [Values] As CATSafeArrayVariant) As CATBSTR
This method requires a user to select a 2D document anywhere with the left mouse button.
During the selection, the contents of “Text” are displayed in the status bar. If the “Values” field is
successful, the coordinates of the selected location on the drawing sheet are displayed. The
return values of this method are “Normal” or “Cancel.”

Func Indicate3D ([Planar Object] As AnyObject, [Text] As CATBSTR, [Value2D, Value3D]


As CATSafeArrayVariant) As CATBSTR
This method requires a user to select a 3D document with the left mouse button anywhere on a
planar object. During the selection, the contents of “Text” are displayed in the status bar. If the
“Value2D” and “Value3D” fields are successful, the coordinates of the selected position relative
to the zero point of the planar object and the 3D document are displayed. The return values of
this method are “Normal” or “Cancel.”
Func NewWindow As Window
This method creates a new window for a document. The document is shown in this new window
and activated. If a document is already active, the same document is opened in a second
window.

Path As CATBSTR (Read Only)


This property defines the directory in which a document is stored (e.g. “C:\Temp”). If a
document has not been saved, an empty string will be passed.

ReadOnly As Boolean (Read Only)


This property defines whether a document is read-only (write protection activated: “True”). If a
document has not been saved, it returns “False.”

Sub RemoveFilter [Name] As CATBSTR


This method removes a temporary filter named “Name.”

Sub Save
This method saves a document (Section 2.2.3). The location of storage equals the full contents
of the variable name. If a document has no location, the macro stops with an error.

Sub SaveAs [Name] As CATBSTR


This method saves a document with the name “Name” (Section 2.2.3). The name must include
the path.

Saved As Boolean (Read Only)


This property defines whether a document is modified after it was loaded and was not saved
(save needed: “False”).

SeeHiddenElements As Boolean
This property returns whether a user states “Show” or “NoShow” in the display window
(“NoShow” = “True”).

Selection As Selection (Read Only)


This property defines a collection of all selected elements in a document (see Section 2.3).
8.26 Documents

This class represents a collection of all CATIA documents in the CATIA application
(see Sections 1.10.1 and 2.2). An object of this class is declared with the Documents property
of the Application class (Section 8.5).
Object Path: Collection.Documents
Func Add ([Type] As CATBSTR) As Document
This method adds a document to an active CATIA session. The value range of the “Type”
parameter is “Part” (CATPart), “Product” (CATProduct), and “Drawing” (CATDrawing).

Func Item ([Index] As CATVariant) As Document


This method returns the “Index” number of the document. “Index” is a counter or the name of
the document. If the name of a document is used, it is specified without a file path (e.g.
“Part1.CATPart”).

Func NewFrom ([Name] AS CATBSTR) As Document


This method creates a new document and assigns the entire contents of an existing document
to “Name.” The name of the file path must be included. If the document does not exist, the
macro stops with an error.

Func Open ([Name] AS CATBSTR) As Document


This method opens a document “Name.” The name of the file path must be included. If there is
no document, the macro stops with an error.

Func Read ([Name] AS CATBSTR) As Document


This method reads a document “Name,” without assigning it to a window or display. The name
of the file path must be included. If there is no document, the macro stops with an error.
8.27 Draft

This class returns a draft (Section 7.5). An object of this class is created with
the AddNewDraft method of the ShapeFactory class (Section 8.199).
Object Path: AnyObject.Shape.DressUpShape.Draft
DraftDomains As DraftDomains (Read Only)
This property defines a collection of all draft domains in draft angles. A draft domain contains a
reference surface and a draft angle.

Mode As CATDraftMode
This property returns draft angle types. The value ranges are “catStandardDraftMode” (draft’s
neutral element), “catReflectKeepFaceDraftMode” (draft’s neutral element is computed while
maintaining the adjacent faces), and “catReflectKeepEdgeDraftMode” (draft’s neutral element is
computed while maintaining the adjacent edges).

PartingElement As Reference
This property returns the parting element of a draft (“Parting Element” field). If a surface of a
body is used, it is referred to as a “Removed Surface” (Section 3.5.4).
8.28 DraftDomain

This class represents a draft domain and provides access to the parameters of a draft. An
object of this class is derived with the Item method of the DraftDomains class (Section 8.29).
Object Path: AnyObject.DraftDomain
Sub AddFaceToDraft [Face] As Reference
This method adds a face to the faces being drafted (“Face(s) to Draft” field). The face is defined
as a “Removed Surface” (Section 3.5.4).

DraftAngle As Angle (Read Only)


This property returns the angular parameters of a draft domain (“Angle” field). Its value can be
edited with the Value method.

FacesToDraft As References (Read Only)


This property defines a collection of all the surfaces to be drafted (“Face(s) to Draft” field).

Sub GetPullingDirection [Unit Vector] As CATSafeArrayVariant


This method reads the direction of vector components of the draft domain from the variable field
(“Pulling Direction” field).

MultiselectionMode As CATDraftMultiselectionMode
This property defines whether elements to be drafted can be selected explicitly or whether they
can be implicitly selected as neighbors of the neutral face (“Selection” field). The value range is
“catNoneDraftMultiselectionMode” (each face must be determined individually) and
“catDraftMultiselectionByNeutralMode” (neighbors of a neutral face determine the faces to be
drafted).

NeutralElement As Reference
This property returns the neutral element of a draft domain (“Neutral Element Selection” field). If
a surface of a body part is used, it is defined as “Removed Surface” (Section 3.5.4).

NeutralPropagationMode As CATDraftNeutralPropagationMode
This property returns whether or not a neutral surface is tangent to its adjacent faces (“Neutral
Element, Smooth” field). The value range is “catNoneDraftNeutralPropagationMode” (no
smoothing) and “catSmoothDraftNeutralPropagationMode” (smoothing).

PullingDirectionElement As Reference
This property returns the direction of the pulling direction (“Pulling Direction” field).
Sub RemoveFaceToDraft [Face] As Reference
This method removes a face from the faces to be drafted (“Face(s) to Draft” field).

Sub SetPullingDirection [DX, DY, DZ] As Double


This method sets the direction vector of a draft (“Pulling Direction” field).

Sub SetVolumeSupport [Element] As Reference


This method requires the support element of a draft.

8.29 DraftDomains

This class represents a collection of all draft domains of a draft. An object of this class is
declared with the DraftDomains property of the Draft class (see Section 8.27).
Object Path: Collection.DraftDomains
Func Item ([Index] As CATVariant) As DraftDomain
This method returns the “Index” number of draft domains. “Index” can be either a number or the
name of a draft domain.

or

8.30 DressUpShape
This class represents a transformation or an operation (see Sections 7.4 and 7.5). This class
does not have any properties or methods.
Object Path: AnyObject.Shape.DressUpShape
8.31 EdgeFillet

This class represents an edge fillet of a solid (see Section 7.5). It provides the basic methods
and properties for the ConstRadEdgeFillet (Section 8.18) and VarRadEdgeFillet (Section
8.224) child classes.
Object Path: AnyObject.Shape.DressUpShape.Fillet.EdgeFillet
Sub AddEdgeToKeep [Edge] As Reference
This method adds an edge to the collection of edges to be kept by an edge fillet. The edge is
defined as a functional edge (“Functional Edge”). See Section 3.5.4.
EdgePropagation As CATFilletEdgePropagation
This property sets the edge fillet propagation mode. The value range is
“catMinimalFilletEdgePropagation” (only the selected edge is applied) and
“catTangencyFilletEdgePropagation” (all contiguous edges that are tangent to the selected edge
are applied).

EdgesToKeep As References (Read Only)


This property returns a collection of edges kept by an edge fillet.

Sub WithdrawEdgeToKeep [Edge] As Reference


This withdraws an edge from the edges kept by an edge fillet.

8.32 Ellipse2D

This class represents a full or partial ellipse (see Section 5.2). An object of this class is created
with the CreateClosedEllipse or CreateEllipse methods of the Factory2D class (Section 8.35).
Object Path: AnyObject.GeometricElement.Geometrie2D.Curve2D.Ellipse2D
CenterPoint As Point2D
This property returns the center of an ellipse.

Sub GetCenter [Point] As CATSafeArrayVariant


This method reads the coordinates of the center of an ellipse in 2D space.

Sub GetMajorAxis [Unit Vector] As CATSafeArrayVariant


This method reads the unit vector of the major axis of an ellipse in 2D space.

Sub GetMinorAxis [Unit Vector] As CATSafeArrayVariant


This method reads the unit vector of the minor axis of an ellipse in 2D space.

MajorRadius As Double (Read Only)


This property returns the dimension of an ellipse in the major axis direction.

MinorRadius As Double (Read Only)


This property returns the dimension of an ellipse in the minor axis direction.

Sub SetData [X, Y, DX1, DY1, R1, R2] As Double


This method modifies the geometric parameters of an ellipse. The center point is X, Y; the
vector of the major axis is DX1, DY1; and the dimensions in the minor axis direction are “R1”
and “R2.”

8.33 FaceFillet

This class represents a face fillet between solid bodies (see Section 7.5). An object of this class
is created with the AddNewSolidFaceFillet or AddNewSurfaceFaceFillet methods of
the ShapeFactory class (Section 8.199).
Object Path: AnyObject.Shape.DressUpShape.Fillet.FaceFillet
FirstFace As Reference
This property returns the reference of the first face (“Faces to Fillet” field).

Radius As Length (Read Only)


This property returns the radius (“Radius” field). The value can be edited with the Value method.

SecondFace As Reference
Reference to the second face. Refer to FirstFace.

8.34 Factory
This class represents a 3D toolbox. This class does not have any properties or methods. Child
classes are HybridShapeFactory (Section 8.85) and ShapeFactory (Section 8.199).
Object Path: AnyObject.Factory

8.35 Factory2D
This class represents a 2D toolbox (see Section 5.2). A 2D toolbox allows the creation of 2D
geometry in a sketch. An object of this class is declared with the Factory2D property or
the OpenEdition method of the Sketch class (Section 8.202).
Object Path: AnyObject.Factory2D
Func CreateCircle ([X, Y, R, Start, End] As Double) As Circle2D
This method creates a circular arc around a center point (X, Y) with a radius “R.” “Start” and
“End” indicate the angle to the horizontal axis. “Start” is an angle value between 0 included and
2PI excluded. “End” takes any value between “Start” excluded and 4PI included.

Func CreateClosedCircle ([X, Y, R] As Double) As Circle2D

This method creates a closed circle around a center point (X, Y) with a radius “R.”

Func CreateClosedEllipse ([X, Y, DX1, DY1, R1, R2] As Double) As Ellipse2D

This method creates a closed ellipse around a center point (X, Y). The vector of the major axis
is DX1, DY1. The dimension is “R1” in the direction of the major axis and “R2” in the direction of
the minor axis.

Func CreateControlPoint ([X, Y] As Double) As ControlPoint2D

This method creates a closed ellipse around a center point (X, Y). The control point is used to
control a spline.

Func CreateEllipse ([X, Y, DX1, DY1, R1, R2, Start, End] As Double) As Ellipse2D

This method creates an ellipse around a center point (X, Y). The vector of the major axis is DX1,
DY1. The dimension is “R1” in the direction of the major axis and “R2” in the direction of the
minor axis. “Start” is an angle value between 0 included and 2PI excluded. “End” takes any
value between “Start” excluded and 4PI included.

Func CreateHyperbola ([X, Y, DX, DY, A, B] As Double) As Hyperbola2D

This method produces a hyperbola with a center point (X, Y), an opening direction (DX, DY),
and the major and minor radius “A” and “B.”

Func CreateIntersection ([Geometry] As Reference) As Geometry2D

This method creates and returns the intersection of an object with the sketch. If the feature does
not intersect the sketch, the macro ends with a runtime error.

Func CreateIntersections ([Reference]) As GeometricElements


See CreateIntersection.
Func CreateLine ([X1, Y1, X2, Y2] As Double) As Line2D

This method creates a line between the points (X1, Y1) and (X2, Y2). The end points of the line
will not be generated (see Example 5.4).

Func CreateLineFromVector ([X, Y, DX, DY] As Double) As Line2D

This method creates a short, symmetrical line through the point (X, Y) in the direction (DX, DY).
The length of the line cannot be specified upon creation. The end points are not generated.

Func CreateParabola ([X, Y, DX, DY, F] As Double) As Parabola2D


This method creates a parabola through a vertex (X, Y) with an opening direction (DX, DY) and
a focus, “F.”

Func CreatePoint ([X, Y] As Double) As Point2D

This method creates and returns a 2D point.

Func CreateProjection ([Geometry] As Reference) As Geometry2D

This method creates a projection of an object on the sketch. The projection is normal to the
plane.

Func CreateProjections ([Reference]) As GeometricElements

Func CreateSpline ([Point] As CATSafeArrayVariant) As Spline2D

This method produces a spline with control points. The control points are given as a field.
8.36 File

This class represents a file (see Section 2.6). An object of this class is derived from
the FileSystem (Section 8.39) or Files (Section 8.38) classes.
Object Path: AnyObject.FileComponent.File
Func OpenAsTextStream ([Mode] As CATBSTR) As TextStream
This method opens a file to read or write data. The value range of the “Mode” parameter is
(Read data) “ForReading,” (Write data) “ForWriting,” and (Write appending data)
“ForAppending.”

Size As Long (Read Only)


This property returns the file size in bytes.

Type As CATBSTR (Read Only)


This property returns the type of file (e.g. “CATIA.Part” or “html file”).

8.37 FileComponent

This class provides the basic methods for processing files.


Object Path: AnyObject.FileComponent
Path As CATBSTR (Read Only)
This property returns the path of a file.

ParentFolder As Folder
This property returns the file folder where a file is located.
8.38 Files

This class represents a collection of files. An object of this class is declared with
the Files property of the Folder class (Section 8.41).
Object Path: Collection.Files
Func Item ([Index] As Long) As File
This method returns a file by using its “Index” number or its name from the file collection.

8.39 FileSystem

This class represents a file toolbox (see Section 2.6) to create, copy, and delete directories and
reference files.
Object Path: AnyObject.FileSystem
Func ConcatenatePaths ([PathPortion1, PathPortion 2] As CATBSTR) As CATBSTR
This method combines two path strings to create a completely new path.

Sub CopyFile [Source, Destination] As CATBSTR, [Overwrite] As Boolean


This method copies a file from one location “Source” to another “Destination.”

Sub CopyFolder [Source, Destination] As CATBSTR


This method copies a folder from one location “Source” to another “Destination.”

Func CreateFile ([Name] As CATBSTR, [Overwrite] As Boolean) As File


This method creates an empty file “Name.” “Overwrite” controls whether an existing file with the
same name can be overwritten (yes: “True”).

Func CreateFolder ([Path] As CATBSTR) As Folder


This method creates a file folder “Path.”

Sub DeleteFile [Name] As CATBSTR


This method deletes a file “Name.” The method fails if the file does not exist.

Sub DeleteFolder [Path] As CATBSTR


This method deletes a directory “Path” and its subdirectories. The method fails if the folder does
not exist.

Func FileExists ([Name] As CATBSTR) As Boolean


This method checks whether a file exists and returns the result.

FileSeparator As CATBSTR (Read Only)


This property defines the separator between directories of a file name (e.g. for Windows “\,” for
UNIX “/”).
Func FolderExists ([Path] As CATBSTR) As Boolean
This method checks whether a directory exists, and returns the result.

Func GetFile ([Name] As CATBSTR) As File


This method returns a file using its full path. The method fails if the file does not exist.

Func GetFolder ([Name] As CATBSTR) As Folder


This method returns a folder “Name” using its full path. The method fails if the folder does not
exist.

PathSeparator As CATBSTR (Read Only)


This property returns the path separator string (e.g. “;” on Windows and “:” on UNIX).

TemporaryDirectory As Folder (Read Only)


This property returns the temporary location of an operating system.

8.40 Fillet

This class represents a fillet shape. It provides the basic methods for the FaceFillet (Section
8.33) and EdgeFillet (Section 8.31) classes.
Object Path: AnyObject.Shape.DressUpShape.Fillet
FilletBoundaryRelimitation As CATFilletBoundaryRelimitation
This property returns or sets the fillet boundary relimitation mode. This boundary relimitation
mode is used when computing the fillet. In “Part Design,” the parameter is
“catAutomaticFilletBoundaryLimitation.” The value range is
“catAutomaticFilletBoundaryRelimitation” (automatic), “catUVFilletBoundaryRelimitation”
(smooth path), “catConnectFilletBoundaryRelimitation” (straight path),
“catMinimumFilletBoundaryRelimitation” (up to the limits of the smallest shell), and
“catMaximumFilletBoundaryRelimitation” (up to the limits of the largest shell).

FilletTrimSupport As CATFilletTrimSupport
This property returns whether or not the supporting surfaces of a fillet are trimmed. In the “Part
Design” work environment, only the first value is used. The value range is “catTrimFilletSupport”
(supporting surfaces are trimmed) and “catNoTrimFilletSupport” (supporting surfaces are not
trimmed).

8.41 Folder

This class represents a file folder. An object of this class is derived from
the FileSystem (Section 8.39) or Folder (Section 8.42) classes.
Object Path: AnyObject.FileComponent.Folder
Files As Files
This property defines a collection of all files in a file folder. Directories are not considered.

SubFolders As Folders
This property defines myFolder of all subdirectories of a file folder.

8.42 Folders

This class represents a collection of directories. An object of this class is declared with
the SubFolders property of the Folder class (Section 8.41).
Object Path: Collection.Folders
Func Item ([Index] As Long) As Folder
This method returns a folder using its “Index” number or its name from the folder collection.

8.43 Formula

This class represents a formula (Section 3.4.3). A formula is created with


the CreateFormula method of the Relations class (Section 8.184). This class does not have
any properties or methods. The contents of a formula are accessed through the Relation class
(Section 8.183).
Object Path: AnyObject.KnowledgeObject.KnowledgeActivateObject.Relation.Formula

8.44 GeometricElement
This class represents a wireframe geometric element (see Section 2.4.2). It provides the basic
methods for a wire geometry element.
Object Path: AnyObject.GeometricElement
GeometricType As CATGeometricType (Read Only)
This property returns the geometric element type.

8.45 GeometricElements
This class represents a collection of geometric elements (see Section 2.4.2).
Object Path: Collection.GeometricElements
Func Item ([Index] As CATVariant) As GeometricElement
This method returns a geometric element using its “Index” or its name. “Index” can be specified
by a counter or the name of an element.

8.46 Geometry2D

This class represents a 2D geometric element (see Sections 5.2 and 5.3).
Object Path: AnyObject.GeometricElement.Geometry2D
Construction As Boolean
This property returns whether geometry is a construction element or a standard element
(construction element: “True”). A construction element is represented by dashed lines in a
sketch.

ReportName As Long
This property returns the report name of the 2D geometry.

8.47 Groove

This class represents a groove (see Section 7.2). An object of this class is created with
the AddNewGroove and AddNewGrooveFromRef methods of the ShapeFactory class
(Section 8.199). This class does not have any properties or methods. The properties and
methods of the parent classes are used.
Object Path: AnyObject.Shape.SketchBasedShape.Revolution.Groove

8.48 Hole

This class represents a hole (see Section 7.2). An object of this class is created with
the AddNewHole method of the ShapeFactory class (Section 8.199).
Object Path: AnyObject.Shape.SketchBasedShape.Hole
AnchorMode As CATHoleAnchorMode
This property returns the hole anchor mode. The property is only available if the Type property
is “catCounterboredHole” or “catCounterdrilledHole.” The value range for the property is
“catExtremPointHoleAnchor” (hole is anchored with the top of its head) and
“catMiddlePointHoleAnchor” (hole is anchored with the bottom of its head).

BottomAngle As Angle (Read Only)


This property returns the hole bottom angle. It is only valid when the hole bottom type is
“catVHoleBottom.” The value can be edited with the Value method.

BottomLimit As Limit (Read Only)


This property returns the bottom limit. It is only valid when the hole bottom type is “cat-BlindHole”
or “catThruHole.” An object controlling the hole bottom limit is modified with the methods of the
Limit class (Section 8.155).

BottomType As CATHoleBottomType
This property returns the hole bottom type (“Bottom” field). The value range for the property is
“catFlatHoleBottom” (flat bottom) and “catVHoleBottom” (V-bottom).

CounterSunkMode As CATCSHoleMode
This property returns the countersunk hole mode. This property is only available if
the Type property is “CatCountersunkHole.” The value range of the property is “catCSMode-
DepthAngle” (depth and angle), “catCSModeDepthDiameter” (depth and diameter), and
“catCSModeAngleDiameter” (angle and diameter).

Sub CreateStandardThreadDesignTable [Type] As catHoleThreadStandard


This method creates a Standard Thread design table. This method only works
if ThreadingMode is set to “catThreadedHoleThreading.” The value range of the property is
“catHoleMetricThinPitch” (Thin Pitch) and “catHoleMetricThickPitch” (Thick Pitch).
Sub CreateUserStandardDesignTable [Name, Path] As CATBSTR
This method creates a UserStandard Thread design table. “Path” is the full path and file name
of the thread table. “Name” defines the name by which the thread table is displayed in CATIA.
This method only works if ThreadingMode is set to “catThreadedHoleThreading.”

Diameter As Length (Read Only)


This property returns the hole diameter. The value can be edited with the Value method.

Sub GetDirection [Unit Vector] As CATSafeArrayVariant


This method returns the hole direction with absolute coordinates.

Sub GetOrigin [Coordinates] As CATSafeArrayVariant


This method returns the origin point that the hole is anchored to.

HeadAngle As Angle (Read Only)


This property returns the hole head angle when the Type property is set to “catTaperedHole,”
“catCountersunkHole,” or “catCounterdrilledHole.” The value can be edited with
the Value method.

HeadDepth As Length (Read Only)


This property returns the hole head depth when the Type property is set to
“catCounterboredHole,” “catCountersunkHole,” or “catCounterdrilledHole.” The value can be
edited with the Value method.

HoleThreadDescription As StrParam (Read Only)


This property returns the hole thread description parameter provided when ThreadingMode is
set to “catThreadedHoleThreading” and there is a thread table.

Sub Reverse
This method reverses the hole direction (“Reverse” button).

Sub SetDirection [Directional Element] As Reference


This method sets the hole associative direction. The directional element may be a line or edge.

Sub SetOrigin [X, Y, Z] As Double


This method sets the origin point that the hole is anchored to.

ThreadDepth As Length (Read Only)


This property returns the hole thread depth if the ThreadingMode property is set to
“catThreadedHoleThreading.” The value can be edited with the Value method.

ThreadDiameter As Length (Read Only)


This property returns the hole thread diameter if the ThreadingMode property is set to
“catThreadedHoleThreading.” The value can be edited with the Value method.

ThreadingMode As CATHoleThreadingMode
This property returns the hole threading mode. The value range of the property is
“catThreadedHoleThreading” (with threads) and “catSmoothHoleThreading” (without threads).

ThreadPitch As Length (Read Only)


This property returns the hole thread pitch if the ThreadingMode property is set to
“catThreadedHoleThreading.” The value can be edited with the Value method.

ThreadSide As CATHoleThreadSide
This property returns the hole thread side. This property is only available if
the ThreadingMode is set to “catThreadedHoleThreading.” The value range of the property is
“catRightThreadSide” (clockwise) and “catLeftThreadSide” (counterclockwise).

Type As CATHoleType
This property returns the hole type. The value range is “catSimpleHole” (simple),
“catTaperedHole” (tapered), “catCounterboredHole” (counterbored), “catCountersunkHole”
(countersunk), and “catCounterdrilledHole” (counterdrilled).

8.49 HybridBodies

This class represents a collection of geometrical sets of components, bodies, or geometrical


sets (see Section 3.3). An object of this class is declared with the HybridBodiesHyb property of
the Part (Section 8.168), Body (Section 8.9), or HybridBody (Section 8.50) classes.
Object Path: Collection.HybridBodies
Func Add As HybridBody
This method creates a new geometrical set.

Func Item ([Index] As CATVariant) As HybridBody


This method returns the “Index” of a geometrical set in a collection. “Index” is a number or the
name of a geometrical set.

or
8.50 HybridBody

This class represents a geometrical set (see Section 3.3). An object of this class is defined by
the HybridBodies class (Section 8.49).
Object Path: AnyObject.HybridBody
Sub AppendHybridShape [Geometry] As HybridShape
This method appends a wireframe or surface element to a geometrical set (Section 6.1).

Bodies As Bodies (Read Only)


This property returns a collection of all the bodies in a geometrical set.

GeometricElements As GeometricElements (Read Only)


This property returns the list of geometrical elements included in a hybrid body. Geometrical
sets inside the geometrical set are not included.

HybridBodies As HybridBodies (Read Only)


This property returns the hybrid body’s HybridBodies collection. Nested geometrical sets are
not included.

HybridShapes As HybridShapes (Read Only)


This property returns the list of hybrid shapes included in the hybrid body. Nested geometrical
sets are not searched.

HybridSketches As Sketches (Read Only)


This property returns the collection of all the sketches in geometrical sets. Sketches in nested
geometrical sets are considered.

8.51 HybridShape

This class represents an arbitrary 3D wireframe or surface geometry (see Chapter 6). It is the
parent class for points, lines, curves, planes, and surfaces.
Object Path: Collection.HybridShape
Sub AppendHybridShape [Geometry] As HybridShape
This method adds wireframe or surface elements to an object.

Sub Compute
This method computes new geometry.

Thickness As HybridShapeThickness (Read Only)


This property returns the thickness from objects of the HybridShape class.

8.52 HybridShape3DCurveOffset
This class represents a 3D curve offset. An object of this class is created with the AddNew-
3DCurveOffset method of the HybridShapeFactory class (Section 8.85).
Object Path: AnyObject.HybridShape.HybridShape3DCurveOffset
CornerRadiusValue As Length
This property returns or sets the 3D corner “Radius” parameter of a 3D curve offset.

CornerTensionValue As Double
This property returns or sets the 3D corner “Tension” parameter of a 3D curve offset.

CurveToOffset As Reference
This property returns or sets the curve to offset.

Direction As HybridShapeDirection
This property returns or sets the direction of a 3D curve offset.

InvertDirection As Boolean
This property returns or sets the direction of a 3D curve offset. “True” means that the orientation
is inverted.

OffsetValue As Length
This property returns or sets the offset of a 3D curve offset.
8.53 HybridShapeAffinity

This class represents an “Affinity” transformation type (see Section 6.7). An object of the class is
created with the AddNewAffinity method of the HybridShapeFactory class (Section 8.85).
Object Path: AnyObject.HybridShape.HybridShapeAffinity
AxisFirstDirection As Reference
This property returns or sets the first direction (“X-Axis” field) of the reference coordinate system.

AxisOrigin As Reference
This property returns or sets the origin (“Origin” field) of the reference coordinate system.

AxisPlane As Reference
This property returns or sets the reference plane (“XY Plane” field) of the reference coordinate
system.

CreationMode As Boolean
This property returns or sets the creation mode. “True” is a creation feature; “False” is a
modification feature.

ElemToTransform As Reference
This property returns or sets the element to transform (“Element” field).

VolumeResult As Boolean
This property returns or sets the resulting element as a volume (“True”) or a surface (“False”).

XRatios As RealParam (Read Only)


This property returns the affinity ratio along the x-direction of the reference coordinate system.
The value can be edited with the Value method.

YRatios As RealParam (Read Only)


This property returns the affinity ratio along the y-direction of the reference coordinate system.
Refer to XRatios.
ZRatios As RealParam (Read Only)
This property returns the affinity ratio along the z-direction of the reference coordinate system.
Refer to XRatios.

8.54 HybridShapeAssemble

This class represents an assemble feature object (see Section 6.8). An object of this class is
created with the AddNewJoin method of the HybridShapeFactory class (Section 8.85).
Object Path: AnyObject.HybridShape.HybridShapeAssemble

Sub AddElement [Element] As Reference


This method adds an element to the assemble feature object. The element types must match
(e.g. curve-to-curve).
Sub AddSubElement [Element] As Reference
This method adds a sub-element to the assemble feature object (“Sub-Elements to Remove”
field).

Sub AppendFederatedElement [Element] As Reference


This method appends an element to the list of elements to federate.

Func GetAngularTolerance As Double


This method gets the angular tolerance (“Angular Threshold” field).

Func GetAngularToleranceMode As Boolean


This method reads the state of the “Angular Threshold” check box. The check box can be
activated depending on whether angular deviations are tolerated (check box is “True”).

Func GetConnex As Boolean


This method reads the state of the “Check Connexity” check box (check box is “True”).

Func GetDeviation As Double


This method reads the “Merging Distance” parameter. This parameter specifies what maximum
deviation exists between elements.

Func GetElement ([Index] As Long) As Reference


This method returns an element from an “Index” number used by the assemble feature object.

Func GetElementsSize As Long


This method returns the size of the list of elements to assemble in the assemble feature object.

Func GetFederatedElement ([Index] As Long) As Reference


This method returns the federated elements from an “Index” number used by the assemble
feature object.

Func GetFederatedElementsSize As Long


This method returns the number of federated elements used by the assemble feature object.

Func GetFederationPropagation As Long


This method returns the propagation mode of the federation. The value range is “0” (no
federation), “1” (all), “2” (point continuity), and “3” (tangent continuity).

Func GetManifold As Boolean


This method reads the state of the “Manifold” check box (check box is “True”).
Func GetSimplify As Boolean
This method reads the state of the “Simplify the Result” check box (check box is “True”).

Func GetSubElement ([Index] As Long) As Reference


This method returns an element from the “Index” number of the list of elements to remove
(“Sub-elements to remove” tab).

Func GetSubElementsSize As Long


This method returns the size of the list of sub-elements to remove in the shape assemble
feature object (“Sub-elements to remove” tab).

Func GetSuppressMode As Boolean


This method reads the state of the “Ignore Erroneous Elements” check box (check box is “True”).

Func GetTangencyContinuity As Boolean


This method reads the state of the “Check Tangency” check box (check box is “True”).

Invert As Boolean
This property returns whether a connection is inverted (“True”) or not (“False”).
Sub RemoveElement [Index] As Long
This method removes an element used by the assemble feature object.

Sub RemoveFederatedElement [Index] As Long


This method removes an element from the list of elements to federate.

Sub RemoveSubElement [Index] As Long


This method removes an element from the “Index” number of the list of elements to remove
(“Sub-elements to remove” tab).

Sub ReplaceElement [Pos] As Long, [New Element] As Reference


This method replaces the element at the specified position “Pos” in the assemble feature object
with a new element “New Element.”

Sub SetAngularTolerance [Angular Tolerance] As Double


This method sets the “Angular Threshold” parameter. The parameter specifies the maximum
deviation angle between elements. The value is specified in degrees.

Sub SetAngularToleranceMode [Mode] As Boolean


This method sets the “Angular Threshold” mode check box (check box is “True”). The check box
can be activated regardless of whether angular deviations can be tolerated.

Sub SetConnex [State] As Boolean


This method sets the “Check connexity” state check box (check box is “True”).
Sub SetDeviation [Distance] As Double
This method sets the “Merging Distance” parameter. This parameter specifies the maximum
deviation between elements.

Sub SetFederationPropagation [Mode] As Long


This method sets the propagation mode of federation. The value range is “0” (no federation), “1”
(all), “2” (point continuity), and “3” (tangent continuity).

Sub SetManifold [State] As Boolean


This method sets the “Check manifold” state check box (check box is “True”).

Sub SetSuppressMode [State] As Boolean


This method sets the “Ignore erroneous elements” state check box (check box is “True”).

Sub SetTangencyContinuity [State] As Boolean


This method sets the “Check tangency” state check box (check box is “True”).

8.55 HybridShapeAxisLine

This class represents an axis definition. An object of this class is created with
the AddNewAxisLine method of the HybridShapeFactory class (Section 8.85).
Object Path: AnyObject.HybridShape.HybridShapeAxisLine
AxisLineType As Long
This property returns or sets the orientation of an axis line type. The value range is “1” (Major
axis/Revolution axis), “2” (Minor axis), and “3” (Normal).

Direction As HybridShapeDirection
This property returns the direction definition (Section 3.6) of an axis.

Element As Reference
This property returns or sets the element (“Element” field) from which an axis is computed.
8.56 HybridShapeAxisToAxis

This class represents an “Axis to Axis” transformation type (see Section 6.7). An object of the
class is created with the AddNewAxisToAxis method of the HybridShapeFactory class
(Section 8.85).
Object Path: AnyObject.HybridShape.HybridShapeAxis-ToAxis
CreationMode As Boolean
This property returns or sets the creation mode. “True” is a creation feature; “False” is a
modification feature.

ElemToTransform As Reference
This property returns or sets the element (“Element” field) to transform.

ReferenceAxis As Reference
This property returns or sets the reference axis system (“Reference” field).

TargetAxis As Reference
This property returns or sets the target axis system (“Target” field). Refer to ReferenceAxis.
VolumeResult As Boolean
This property returns or sets the resulting element as a volume (“True”) or a surface (“False”).
8.57 HybridShapeBlend

This class represents a blend (see Section 6.6). An object of the class is created with
the AddNewBlend method of the HybridShapeFactory class (Section 8.85).
Object Path: AnyObject.HybridShape. HybridShapeBlend

Coupling As Long
This property returns or sets the type of coupling between the limits of a blend.

Range of values:
1: Ratio
Curves are coupled according to the curvilinear abscissa ratio.
2: Tangency
Curves are coupled according to their tangency discontinuity points. An error occurs if they do
not have the same number of tangency discontinuity points.
3: Tangency then Curvature
Curves are coupled according to their tangency discontinuity points first, then according to their
curvature discontinuity points.
4: Vertices
Curves are coupled according to their vertices. An error occurs if they do not have the same
number of vertices.
Func GetBorderMode ([Index] As Long) As Long
This method returns the type of border to a limit of the blend. “Index” is “1” or “2” for the first or
second boundary curve. The value range of this method is equivalent to the “BorderType”
parameter of the SetBorderMode method.

Func GetClosingPoint ([Index] As Long) As Reference


This method returns the end point of the first or second support curve. “Index” is “1” or “2.”

Func GetContinuity ([Index] As Long) As Long++


This method returns the connection type of a blend to the first or second support member.
“Index” is “1” or “2” for the connection to the first or second support element. The value range of
this method corresponds to the SetContinuity method.

Func GetCurve ([Index] As Long) As Reference


This method reads the first or second support curve. “Index” is “1” or “2.”

Func GetOrientation ([Index] As Long) As Long


This method returns the orientation of the first or second support curve. “Index” is “1” or “2.” The
orientation is “1” or “–1”—“1” is the same orientation as the original orientation of the curve; “–1”
is the curve used to calculate a blend inverted.

Func GetRuledDevelopableSurfaceConnection ([Curve] As Long) As Long


This function returns or sets the ruled developable surface connection type. “Curve” is equal to
“1” for the first curve and equal to “2” for the second curve. This function returns the following
values: “1” equals “Connect to both extremities,” “2” is “Free first curve,” and “3” equals “free
second curve.”

Func GetSupport ([Index] As Long) As Reference


This method returns the first or second support from the blend. “Index” is “1” or “2.”

Func GetTensionInDouble ([Index, Value] As Long) As RealParam


This method returns the tension values of a limit of the blend. “Index” is “1” or “2.” An error
occurs if no tension values are defined.

Func GetTensionType ([Index] As Long) As Long


This method returns the tension type for the first or second limit of the blend. “Index” is “1” or “2.”
The return value of the method corresponds to the value range in the “Type” parameter of
the SetTensionInDoublemethod.

Func GetTransition ([Index] As Long) As Long


This method returns the transition orientation from the first or second limit of a blend. “Index” is
“1” or “2.” The result of the method is “1” or “–1”—“1” is a transition away from a supporting
surface; “–1” is a transition toward a supporting surface.

Func GetTrimSupport ([Index] As Long) As Long


This method returns whether the first or second support of the blend will be trimmed. “Index”
determines the support element “1” or “2.”

Sub InsertCoupling [Index] As Long


This method inserts a coupling into the blend. If the “Index” is zero, the definition is appended at
the end of the list of connection definitions. Otherwise the “Index” determines the position in the
list.

Sub InsertCouplingPoint [Coupling, Position] As Long, [Point] As Reference


This method inserts a coupling point to the coupling of the blend. “Coupling” describes the
number of the coupling definition. “Position” is the position of a point in the list of coupling points
in a coupling definition. If the “Position” is zero, it will be added to the end of the list. “Point”
defines the coupling point. The coupling point must lie on the support curve corresponding to
the “Position” number.
RuledDevelopableSurface As Boolean
This method returns or sets the state of the “Create a Developable Ruled Surface” option. If the
property is “True,” the option is enabled.

Sub SetBorderMode [Index, BorderType] As Long


This property sets the type of border to a limit of the blend. “Index” is “1” or “2” for the first or
second edge curve.

Value range for the “Border” parameter:


1: Border of the blend will be tangent to the border of the support surface.
2: Border of the blend is not constrained.
3: Border of the blend will be tangent to the border of the support surface at the start
extremity of the curve.
4: Border of the blend will be tangent to the border of the support surface at the end
extremity of the curve.
Sub SetClosingPoint [Index] As Long, [Point] As Reference
This method sets a new closing point of the first or second support curve of a blend. “Index” is
“1” or “2.” This point must lay on the curve of the blend limit.

Sub SetContinuity [Index, Continuity] As Long


This method sets the continuity type to the first or second support of a blend. “Index” is “1” or “2.”
The value range for the “Connection Type” parameter is “0” (Point continuity), “1” (Tangency
continuity), and “2” (Curvature continuity).

Sub SetCurve [Index] As Long, [Reference Curve] As Reference


This method sets the first or second support curve. “Index” is “1” or “2.”

Sub SetOrientation [Index, Orientation] As Long


This method sets the orientation of the first or second support curve. “Index” is “1” or “2.”
“Orientation” is “1” or “–1.” (“–1” is the orientation of a support curve inverted.)

Sub SetRuledDevelopableSurfaceConnection [Curve] As Long, [Connection Type] As


Long
This method sets the first or second curve of a blend surface to the Isoparameter type that the
surface is connected to the boundary curve. “Curve” is equal to “1” for the first curve and “2” for
the second curve. “Connection Type” is equal to “1” for “Connect to both extremities,” equal to
“2” for “Free first curve,” and is “3” for “Free second curve.”

Sub SetSmoothAngleThreshold [Angle] As Double


This method sets the limit for the correction angle in degrees. Important: the
“SmoothAngleThresholdActivity” property must equal “True.”
Sub SetSmoothDeviation [Deviation] As Double
This method sets the limit for the deviation correction. Important: the “SmoothDeviationActivity”
property must equal “True.”

Sub SetSupport [Index] As Long, [Support] As Reference


This method sets the first or second support element. “Index” is “1” or “2.”

Sub SetTensionInDouble [Index, Type] As Long, [Value1, Value2] As Double


This method sets the tension of a blend to the first or second support element. “Index” is “1” or
“2.” “Type” describes the tension type: “1” for Default tension, “2” for Constant tension, and “3”
for Linear tension. “Value1” is for the first tension. It must be used with any tension type.
“Value2” is for the second tension. It can be used with linear tension only.

Sub SetTensionType [Index, Tension Type] As Long


This method sets the tension type of a limit at “Index” of a blend. “Index” has the value range “1”
or “2” for the first or second support curve. Tension type is “1” (Default tension), “2” (Constant
tension), “3” (Linear tension), or “4” (S-type tension).

Sub SetTransition [Index, Transition] As Long


This method sets the transition orientation to a limit of the blend. “Index” is “1” or “2.” “Transition”
is “1” or “–1”—“1” is a transition away from the supporting surface, and “–1” is a transition
toward the supporting surface. The method is only effective if the transition mode of a blend is
not point continuous.

Sub SetTrimSupport [Index, Trim Support Mode] As Long


This method sets whether a support of the blend is to be trimmed. “Index” is “1” or “2.” “Trim
Support Mode” is “1” (No trim) or “2” (Support trimmed).

SmoothAngleThreshold As Angle (Read Only)


This property returns the angular threshold parameter. Important: the
“SmoothAngleThresholdActivity” property must equal “True.”

SmoothAngleThresholdActivity As Boolean
This property returns or sets information whether or not a blending operation is smoothed. If the
value is “True,” a correction is made.

SmoothDeviation As Length (Read Only)


This property returns the deviation correction value. Important: the “SmoothDeviationActivity”
property must equal “True.”
SmoothDeviationActivity As Boolean
This property returns or sets whether a deviation correction should be performed. If the value is
“True,” a correction is made.

Spine As Reference
This property returns or sets a curve used as spine for coupling in blend.
Sub UnsetClosingPoint [Index] As Long
This method removes the definition of an end point of the first or second support curve. “Index”
is “1” or “2.”

Sub UnsetSupport [Index] As Long


This method removes the first or second support element from the definition of a blend. “Index”
is “1” or “2.”

8.58 HybridShapeBoundary

This class represents a boundary (see Section 6.5). An object of the class is created with
the AddNewBoundary and AddNewBoundaryOfSurface methods of
the HybridShapeFactory class (Section 8.85).
Object Path: AnyObject.HybridShape.HybridShapeBoundary
From As Reference
This property returns or sets the second end limit of a boundary (“Limit2” field).

FromOrientation As Long
This property returns or sets the orientation of the second boundary. The value is “1” for normal
orientation and “2” for inverted orientation.

InitialElement As Reference
This property returns or sets the output element (e.g. “surface edge”).

Propagation As Long
This property returns or sets the boundary propagation type (“Propagation type” field). The
value can be “0” (Complete boundary), “1” (Point continuity), “2” (Tangent continuity), or “3” (No
propagation).

Support As Reference
This property returns or sets the support surface around which the boundary is computed.

To As Reference
This property returns or sets the first end limit of a boundary (“Limit1” field).

ToOrientation As Long
This property returns or sets the orientation of the first boundary. The value is “1” for a normal
orientation and “2” for an inverted orientation.

8.59 HybridShapeCircle

This class represents a parent class of all 3D wireframe geometry representing a circle or an arc
(see Section 6.5).
Object Path: AnyObject.HybridShape.HybridShapeCircle
AxisComputation As Boolean
This property returns or sets the axis computation mode. If the value is “True,” an axis is
computed.

AxisDirection As HybridShapeDirection
This property returns or sets the axis direction (“Axis Direction” field).
EndAngle As Angle (Read Only)
This property returns the circle end angle (“End” field). Its value can be edited with
the Value method.

Sub GetAxis [Type] As Long, [Axis] As Reference


This method returns the axis of a circle. The value for “Type” can be “3” (NormalToCircle), “2”
(NormalToDirection, “Axis Direction” field), or “1” (AlignedWithDirection).

Sub GetCenter [X, Y, Z As Double]


This method gets the coordinates of the circle center.

Sub GetFreeCenter [Center Point] As CATSafeArrayVariant


This method gets the center of a circle or an arc as an array (“Center Point” field).

Sub GetFreeRadius [Radius] As Double


This method returns the radius of a circle or an arc (“Radius” field).

Func GetLimitation As Long


This method gets the limitation type for the circle. The value range can be found in
the SetLimitation method.

Sub SetLimitation [Mode] As Long


This property sets the limitation mode for a circle or an arc (“Circle Limitations” button). A
specific circle object cannot always accept all modes.

Value range for the “Mode” parameter:


0: Angle
Arc is determined by two angles.
1: Whole Circle
Circle is a complete circle.
2: Trimmed Circle
Circle is trimmed based on its input parameters.
3: Complementary Circle
Complementary portion of a trimmed circle is based on its input parameters.
StartAngle As Angle (Read Only)
This property returns the start angle of a circle or an arc (“Start” field). This value can be edited
with the Value method.

8.60 HybridShapeCircle2PointsRad

This class represents a circle or an arc that is defined by two points and a radius (see Section
6.5). An object of the class is created with the AddNewCircle2PointsRad method of
the HybridShapeFactory class (Section 8.85).
Object Path: AnyObject.HybridShape.HybridShapeCircle.HybridShapeCircle2PointsRad

Diameter As Length (Read Only)


This property returns the circle diameter (“Diameter” field). It only succeeds if DiameterMode is
set to “True.”

DiameterMode As Boolean
This property returns whether the circle is a diameter (“True”) or radius (“False”).

Func IsGeodesic As Boolean


This method queries whether a circle is geodesic. The geodesic type is “True” when the circle is
geodesic.
Orientation As Long
This property returns or sets the circle orientation. This property can have the value “1” or “–1”—
“1” means that the center point on the side of the line “Pt1-Pt2” is placed in the position of the
cross product of vectors of the supporting surface and the line.

Pt1 As Reference
This property returns or sets the first passing point (“Point 1” field).

Pt2 As Reference
This property returns or sets the second passing point (“Point 2” field).
Radius As Length (Read Only)
This property returns the circle radius (“Radius” field).

Sub SetGeometryOnSupport
This method enables the geodesic calculation mode (“Geometry on Support” check box) and
disables the Euclidean calculation.

Support As Reference
This property returns or sets the circle support surface (“Support” field).

Sub UnsetGeometryOnSupport
This method disables the geodesic calculation mode (“Geometry on Support” check box) and
activates the Euclidean mode.

8.61 HybridShapeCircle3Points

This class represents a circle or an arc that that passes through three points (see Section 6.5).
An object of the class is created with the AddNewCircle3Points method of
the HybridShapeFactory class (Section 8.85).
Object Path: AnyObject.HybridShape.HybridShapeCircle.HybridShapeCircle3Points
Element1 As Reference
This property returns or sets the first passing point (“Point 1” field).

Element2 As Reference
This property returns or sets the second passing point (“Point 2” field). Refer to Element1.
Element3 As Reference
This property returns or sets the third passing point (“Point 3” field). Refer to Element1.
Sub RemoveSupport
This method removes the support surface and disables the “Geometry on Support” mode.

Support As Reference
This property returns or sets the circle support surface (“Support” field).

8.62 HybridShapeCircleBitangentPoint

This class represents a circle or an arc that is tangent to two curves through a point
(see Section 6.5). An object of the class is created with
the AddNewCircleBitangentPoint method of the HybridShapeFactoryclass (Section 8.85).
Object Path: AnyObject.HybridShape.HybridShapeCircle.HybridShapeCircleBitangentPoint
BeginOfCircle As Long
This property returns or sets the beginning curve of the circle.

Curve1 As Reference
This property returns or sets the first curve (“Element 1” field).

Curve2 As Reference
This property returns or sets the second curve (“Curve 2” field). Refer to Curve1.
DiscriminationIndex As Long
This property returns or sets the number of the selected solution (“Next Solution” button).

Orientation1 As Long
This property returns or sets the orientation of the first curve to which the circle is tangent. The
property can have the value “1” or “–1.” With a value of “1,” the center is placed on the side of
the curve, showing the cross product of vectors of the support surface and the orientation of the
curve. Depending on the orientation of each curve, the result may not be geometrically possible.

Orientation2 As Long
This property returns or sets the orientation of the second curve (refer to Orientation1).
Pt As Reference
This property returns or sets the circle passing point. This point must lie on the second curve.

Support As Reference
This property returns or sets the circle support surface (“Support” field). A support is a plane or
surface.
TangentOrientation1 As Long
This property returns or sets the tangent orientation of the circle’s first reference element. The
property can have the value “1” or “–1.” Depending on the orientation of each curve, the result
may not be geometrically possible.

TangentOrientation2 As Long
This property returns or sets the tangent orientation of the circle’s second reference element
(refer to TangentOrientation1).
TrimMode As Long
This property returns or sets the trim mode (“Trim Element 1” and “Trim Element 2”). If the value
is “0,” no elements are trimmed. If the value is “1,” both elements are trimmed. If the value is “2,”
only the first element is trimmed, and if the value is “3,” only the second element is trimmed.

8.63 HybridShapeCircleBitangentRadius

This class represents a circle or an arc that is tangent to two curves with a defined radius
(see Section 6.5). An object of the class is created with
the AddNewCircleBitangentRadius method of the HybridShapeFactory class (Section 8.85).
Object Path: AnyObject.HybridShape.HybridShapeCircle.HybridShapeCircleBitangentRadius

BeginOfCircle As Long
This property returns or sets the beginning curve of the circle.

Curve1 As Reference
This property returns or sets the first curve (“Element 1” field).
Curve2 As Reference
This property returns or sets the second curve (“Curve 2” field). Refer to Curve1.
Diameter As Length (Read Only)
This property returns the circle diameter (“Diameter” field). It only succeeds if DiameterMode is
set to “True.”

DiameterMode As Boolean
This property returns whether the circle is a diameter (“True”) or radius (“False”).

DiscriminationIndex As Long
This property returns or sets the number of the selected solution (“Next Solution” button).

Orientation1 As Long
This property returns or sets the orientation of the first curve to which the circle is tangent. The
property can have the value “1” or “–1.” With a value of “1,” the center is placed on the side of
the curve, showing the cross product of vectors of the support surface and the orientation of the
curve. Depending on the orientation of each curve, the result may not be geometrically possible.

Orientation2 As Long
This property returns or sets the orientation of the second curve (refer to Orientation1).
Radius As Length (Read Only)
This property returns the circle radius (“Radius” field). The value can be edited with
the Value method.

Support As Reference
This property returns or sets the circle support surface (“Support” field). A support is a plane or
surface.

TangentOrientation1 As Long
This property returns or sets the tangent orientation of the circle’s first reference element. The
property can have the value “1” or “–1.” Depending on the orientation of each curve, the result
may not be geometrically possible.

TangentOrientation2 As Long
This property returns or sets the tangent orientation of the circle’s second reference element
(refer to TangentOrientation1).
TrimMode As Long
This property returns or sets the trim mode (“Trim Element 1” and “Trim Element 2”). If the value
is “0,” no elements are trimmed. If the value is “1,” both elements are trimmed. If the value is “2,”
only the first element is trimmed, and if the value is “3,” only the second element is trimmed.
8.64 HybridShapeCircleCenterAxis

This class represents a circle or an arc that is defined by a center and an axis. An object of the
class is created with the AddNewCircleCenterAxis method of the HybridShapeFactory class
(Section 8.85).
Object Path: AnyObject.HybridShape.HybridShapeCircle.HybridShapeCircleCenterAxis

Axis As Reference
This property returns or sets the axis of the circle (“Axis/Line” field).

Diameter As Length (Read Only)


This property returns the circle diameter (“Diameter” field). It only succeeds if DiameterMode is
set to “True.”

DiameterMode As Boolean
This property returns whether the circle is a diameter (“True”) or radius (“False”).

Point As Reference
This property returns or sets the point of the circle (“Point” field).

ProjectionMode As Boolean
When determining the center of a circle, this property returns or sets whether the point is
projected onto the axis (“True”) or is center of the circle (“False”).
Radius As Length (Read Only)
This property returns the circle radius (“Radius” field). It only succeeds if DiameterMode is set
to “True.”

8.65 HybridShapeCircleCenterTangent

This class represents a circle or an arc that is defined by a center and tangent. An object of the
class is created with the AddNewCircleCenterTangent method of
the HybridShapeFactory class (Section 8.85).
Object Path: AnyObject.HybridShape.HybridShapeCircle.HybridShapeCircleCenterTangent

BeginOfCircle As Long
This property returns or sets the beginning curve of the circle.

CenterElem As Reference
This property returns or sets the center element of the circle (“Center Element” field).

Diameter As Length (Read Only)


This property returns the circle diameter (“Diameter” field). It only succeeds if DiameterMode is
set to “True.”

DiameterMode As Boolean
This property returns whether the circle is a diameter (“True”) or radius (“False”).
DiscriminationIndex As Long
This property returns or sets the number of the selected solution (“Next Solution” button).

Orientation1 As Long
This property returns or sets the orientation of the first curve to which the circle is tangent. The
property can have the value “1” or “–1.” With a value of “1,” the center is placed on the side of
the curve, showing the cross product of vectors of the support surface and the orientation of the
curve. Depending on the orientation of each curve, the result may not be geometrically possible.

Orientation2 As Long
This property returns or sets the orientation of the second curve (refer to Orientation1).
Radius As Length (Read Only)
This property returns the circle radius (“Radius” field). The value can be edited with
the Value method.

Support As Reference
This property returns or sets the circle support surface (“Support” field).

TangentCurve As Reference
This property returns or sets the tangent curve to which the circle will be tangent (“Tangent
Curve” field).

TangentOrientation1 As Long
This property returns or sets the tangent orientation of the circle’s first reference element.

TangentOrientation2 As Long
This property returns or sets the tangent orientation of the circle’s second reference element
(refer to TangentOrientation1).

8.66 HybridShapeCircleCtrPt

This class represents a circle or an arc that is defined by a center and point (see Section 6.5).
An object of the class is created with
the NewCircleCtrPt and AddNewCircleCtrPtWithAngles methods of
the HybridShapeFactory class (Section 8.85).
Object Path: AnyObject.HybridShape.HybridShapeCircle.HybridShapeCircleCtrPt
Center As Reference
This property returns or sets the circle center (“Center” field).

CrossingPoint As Reference
This property returns or sets the crossing point (“Point” field).

Func IsGeodesic As Boolean


This method queries whether a circle is geodesic. The geodesic type is (“True”) when the circle
is geodesic.

Sub SetGeometryOnSupport
This method enables the geodesic calculation mode (“Geometry on Support” check box) and
disables the Euclidean calculation. The support is defined by the Support property.

Support As Reference
This property returns or sets the circle support surface (“Support” field). A support is a plane or
surface.

Sub UnsetGeometryOnSupport
This method disables the geodesic calculation mode (“Geometry on Support” check box) and
activates the Euclidean mode.

8.67 HybridShapeCircleCtrRad

This represents a circle or an arc that is defined by a center and a radius (see Section 6.5). An
object of the class is created with
the AddNewCircleCtrRad and AddNewCircleCtrRadWithAngles methods of
the HybridShapeFactory class (Section 8.85).
Object Path: AnyObject.HybridShape.HybridShapeCircle.HybridShapeCircleCtrRad

Center As Reference
This property returns or sets the circle center (“Center” field).

Diameter As Length (Read Only)


This property returns the circle diameter (“Diameter” field). It only succeeds if DiameterMode is
set to “True.”

DiameterMode As Boolean
This property returns whether the circle is a diameter (“True”) or radius (“False”).

FirstDirection As HybridShapeDirection
This property returns or sets the first direction used to set the angle’s reference.

Sub GetSecondDirection [X, Y, Z] As Double


This method reads the coordinates of the second direction vector for the orientation of the circle.
The direction must be kept perpendicular to the first direction.

Func IsGeodesic As Boolean


This method queries whether a circle is geodesic. The geodesic type is (“True”) when the circle
is geodesic.

Radius As Length (Read Only)


This property returns the circle radius (“Radius” field). The value can be edited with
the Value method.
Sub SetGeometryOnSupport
This method enables the geodesic calculation mode (“Geometry on Support” check box) and
disables the Euclidean calculation.

Sub SetSecondDirection [X, Y, Z] As Double


This method sets the coordinates of the second direction vector for the orientation of the circle.
The direction has to be kept perpendicular to the first direction.

Support As Reference
This property returns or sets the circle support surface (“Support” field). A support is a plane or
surface.

Sub UnsetGeometryOnSupport
This method disables the geodesic calculation mode (“Geometry on Support” check box) and
activates the Euclidean mode.

8.68 HybridShapeCircleExplicit

This class represents a circle or an arc without history (see Section 6.5). An object of the class
is created with the AddNewCircleDatum method of the HybridShapeFactory class (Section
8.85). This class has no properties or methods. Explicit geometry cannot be changed via
parameters.
Object Path: AnyObject.HybridShape.HybridShapeCircleExplicit

8.69 HybridShapeCircleTritangent

This class represents a circle or an arc that is tangent to three curves (see Section 6.5). An
object of the class is created with the AddNewCircleTritangent method of
the HybridShapeFactory class (Section 8.85).
Object Path: AnyObject.HybridShape.HybridShapeCircle.HybridShapeCircleTritangent
BeginOfCircle As Long
This property returns or sets the beginning curve of the circle.

Curve1 As Reference
This property returns or sets the first curve (“Element 1” field).

Curve2 As Reference
This property returns or sets the second curve (“Element 2” field). Refer to Curve1.
Curve3 As Reference
This property returns or sets the third curve (“Element 3” field). Refer to Curve1.
DiscriminationIndex As Long
This property returns or sets the number of the selected solution (“Next Solution” button).

Orientation1 As Long
This property returns or sets the orientation of the first curve to which the circle is tangent. The
property can have the value “1” or “–1.” With a value of “1,” the center is placed on the side of
the curve, showing the cross product of vectors of the support surface and the orientation of the
curve. Depending on the orientation of each curve, the result may not be geometrically possible.

Orientation2 As Long
This property returns or sets the orientation of the second curve (refer to Orientation1).
Orientation3 As Long
This property returns or sets the orientation of the third curve (refer to Orientation1).
Support As Reference
This property returns or sets the circle support surface (“Support” field). A support is a plane or
surface.

TangentOrientation1 As Long
This property returns or sets the tangent orientation of the circle’s first reference element. The
property can have the value “1” or “–1.” Depending on the orientation of each curve, the result
may not be geometrically possible.

TangentOrientation2 As Long
This property returns or sets the tangent orientation of the circle’s second reference element
(refer to TangentOrientation1).
TangentOrientation3 As Long
This property returns or sets the tangent orientation of the circle’s third reference element (refer
to TangentOrientation1).
TrimMode As Long
This property returns or sets the trim mode (“Trim Element 1” and “Trim Element 2”). If the value
is “0,” no elements are trimmed. If the value is “1,” both elements are trimmed, and if the value
is “2,” only the first element is trimmed. If the value is “3,” only the second element is trimmed.

8.70 HybridShapeCombine

This class represents a combine (see Section 6.5). An object of the class is created with
the AddNewCombine method of the HybridShapeFactory class (Section 8.85).
Object Path: AnyObject.HybridShape.HybridShapeCombine
Direction1 As HybridShapeDirection
This property returns or sets the first direction used to create the combined curve (“Direction 1”
field). The SolutionTypeCombine property must equal “1” for the property to exist.
Direction2 As HybridShapeDirection
This property returns or sets the second direction used to create the combined curve
(“Direction2” field). Refer to Direction1.
Elem1 As Reference
This property returns or sets the first curve (“Curve1” field).

Elem2 As Reference
This property returns or sets the second curve (“Curve2” field). Refer to Elem1.
NearestSolution As Long
This property returns or sets whether the combined curve is created as the curve closest to the
first curve. The value is 0 for the nearest solution and 1 for all possible solutions.

SolutionTypeCombine As Long
This property returns or sets whether the curves are projected along its normal plane. The value
is 0 for the normal to the curve planes (default mode), and 1 for the given directions.

8.71 HybridShapeConic

This class represents a conic (see Section 6.5). An object of the class is created with
the AddNewConic method of the HybridShapeFactory class (Section 8.85).
Object Path: AnyObject.HybridShape.HybridShapeConic
ConicParameter As Double
This property returns or sets the conic parameter. The parameter must be greater than 0 and
less than 1. A value smaller than “0.5” is an elliptical conic, a value equal to “0.5” is a parabolic
conic, and a value greater than “0.5” is a hyperbola conic.

ConicUserTol As Length (Read Only)


This property returns or sets the user tolerance of a conic.

EndPoint As Reference
This property returns or sets the end points of a conic (“Points/End” field). The point must lie on
the support.

EndTangent As HybridShapeDirection
This property returns or sets the tangent direction of a conic end point (“Tangents/End” field).

Sub GetEndTangentDirectionFlag [Orientation] As Long


This method reads the orientation of the tangents at the end point of a conic. If the parameter
“Orientation” is “1,” the tangent is not inverted. If the parameter is equal to “–1,” the orientation is
inverted.

Sub GetIntermediatePoint [Index] As Long, [Point] As Reference


This method returns the “Index” number of a passing point (“Intermediate Constraints/Point”
fields). “Index” can be “1,” “2,” or “3.”

Sub GetIntermediateTangent [Index] As Long, [Direction] As HybridShapeDirection


This method returns the tangent direction of one of the conic intermediate points. “Index” can be
“1” or “2.”

Sub GetIntermediateTangentDirectionFlag [Index, Orientation] As Long


This method returns the tangent direction orientation of one of the conic intermediate points.
“Index” can be “1” or “2.” If the “Orientation” parameter is “1,” the tangent is not inverted. If the
parameter is equal to “–1,” the orientation is inverted.

Sub GetStartTangentDirectionFlag [Orientation] As Long


This method returns the tangent direction orientation at the conic start point. If the “Orientation”
parameter is “1,” the tangent is not inverted. If the parameter is equal to “–1,” the orientation is
inverted.

Sub SetEndTangentDirectionFlag [Orientation] As Long


This method sets the orientation of the tangents at the end point of a conic. If the “Orientation”
parameter is “1,” the tangent is not inverted. If the parameter is equal to “–1,” the orientation is
inverted.

Sub SetIntermediatePoint [Index] As Long, [Point] As Reference


This method sets one of the conic intermediate passing points (“Intermediate Constraints/Point”
field). “Index” can be “1,” “2,” or “3.”

Sub SetIntermediateTangent [Index] As Long, [Direction] As HybridShapeDirection


This method sets the tangent direction at one of the conic intermediate passing points. “Index”
can be “1” or “2.”

Sub SetIntermediateTangentDirectionFlag [Index, Orientation] As Long


This method sets the tangent direction orientation of one of the conic intermediate points. If the
“Orientation” parameter is “1,” the tangent is not inverted. If the parameter is equal to “–1,” the
orientation is inverted.

Sub SetStartAndEndTangentsPlusConicParamter [Start Direction, End Direction] As


HybridShapeDirection, [Parameter] As Double
This method sets the directions at the start and end and sets the parameters of the conic
section. The directions must lie on the support plane of the conic. The parameter must be
greater than 0 and less than 1. A value smaller than “0.5” is an elliptical conic, a value equal to
“0.5” is a parabolic conic, and a value greater than “0.5” is a hyperbola conic.

Sub SetStartAndEndTangentsPlusPassingPoint [Start Direction, End Direction] As


HybridShapeDirection, [Point] As Reference
This method sets the tangent directions at conic start and end points and at a passing point.
The directions and the point must lie in the support plane of the conic.

Sub SetStartTangentDirectionFlag [Orientation] As Long


This method sets the tangent direction orientation at the conic start point. If the “Orientation”
parameter is “1,” the tangent is not inverted. If the parameter is equal to “–1,” the orientation is
inverted.

Sub SetTangentIntersectPointPlusConicParm [Point] As Reference, [Parameter] As


Double
This method sets the intersection point of the conic tangents (“Tangents/End” field) to the start
and end points, and sets the conic parameter. The parameter must be greater than 0 and less
than 1. A value smaller than “0.5” is an elliptical conic, a value equal to “0.5” is a parabolic conic,
and a value greater than “0.5” is a hyperbola conic.
Sub SetTangentIntersectPointPlusPassingPoint [Tangent Point, Intermediate Point] As
Reference
This method sets the intersection point of the conic tangents to the start and end points, and
sets a passing point. Both points must lie on the supporting element.

Sub SetThreeIntermediatePassingPoints [Point1, Point2, Point3] As Reference


This method sets three conic intermediate passing points (“Intermediate Constraints/Point” field).
All points must lie on the supporting element.

Sub SetTwoIntermediatePassingPointsPlusOneTangent [Point1, Point2] As Reference,


[Direction] As HybridShapeDirection, [Location] As Long
This method sets two conic intermediate passing points and a tangent at one of the passing
points. If “Location” is “1,” the direction applies to the starting point; “2” is for the end point. The
points and the direction must lie on the support.

StartPoint As Reference
This property returns or sets the starting point of the conic (“Points/Start” field). The point must
lie on the support.

StartTangent As HybridShapeDirection
This property returns or sets the tangent direction at the conic start point (“Tangents/Start” field).

SupportPlane As Reference
This property returns or sets the conic supporting plane.

Sub SwitchEndTangentDirection
This method inverts the tangent direction orientation at the conic end point.

Sub SwitchIntermediateTangentDirection [Index] As Long


This method inverts the tangent direction orientation of one of the conic intermediate points.

Sub SwitchStartTangentDirection
This method inverts the tangent direction orientation at the conic start point.
TangentIntPoint As Reference
This property returns or sets the conic tangent intersection point. The point must lie on the
support.

8.72 HybridShapeConnect

This class represents a connect curve (see Section 6.5). An object of the class is created with
the AddNewConnect method of the HybridShapeFactory class (Section 8.85).
Object Path: AnyObject.HybridShape.HybridShapeConnect
BaseCurve As Reference
This property returns or sets the base curve (“Base Curve” field). The property is only available
if ConnectType is “1.”

ConnectType As Long
This property returns or sets how the connect curve is created (“Connection Type” field). The
value range is “0” for a normal connection and “1” for a connection to the base curve.
FirstContinuity As Long
This property returns or sets the continuity with the first curve (“Continuity” field). The value is “0”
point for continuity, “1” for tangent continuity, and “2” for curvature continuity.

FirstCurve As Reference
This property returns or sets the first curve (“Curve” field).

FirstOrientation As Long
This property returns or sets the orientation of first curve. “1” is used to set the first orientation.
“–1” is used to set the same orientation. “2” is used to invert the orientation.

FirstPoint As Reference
This property returns or sets the first reference point (“Point” field).

FirstTension As RealParam (Read Only)


This property returns the tension on the first curve (“First Curve, Tension” field). The value must
be greater than 0. The value can be edited with the Value method.

SecondContinuity As Long
This property returns or sets the continuity with the second curve. Refer to FirstContinuity.
SecondCurve As Reference
This property returns or sets the first curve. Refer to FirstCurve.
SecondOrientation As Long
This property returns or sets the orientation of the second curve. Refer to FirstOrientation.
SecondPoint As Reference
This property returns or sets the second reference point. Refer to FirstPoint.
SecondTension As RealParam (Read Only)
This property returns or sets the tension on the second curve. Refer to FirstTension.
Support As Reference
This property returns or sets the curve supporting face.

Trim As Boolean
This property returns or sets the trim mode (“Trim Elements” check box).
8.73 HybridShapeCorner

This class represents a connect curve (see Section 6.5). An object of the class is created with
the AddNew3DCorner or AddNewCorner methods of the HybridShapeFactory class (Section
8.85).
Object Path: AnyObject.HybridShape.HybridShapeCorner
BeginOfCorner As Long
This property returns or sets the number of the beginning curve of the corner. The value range
is “1” or “2.”

CornerType As Long
This property returns or sets the corner type. The values are “0” for “Corner On Support” or “1”
for “3D Corner.”

Direction As HybridShapeDirection
This property returns or sets the 3D corner direction (“Direction” field). This property exists only
if the corner type is a “3D Corner” (“Corner Type” field). The direction is normal to the plane that
the corner lies on.

DiscriminationIndex As Long
This property returns or sets the index of the current corner, if there are multiple solutions to
define a corner. The index corresponds to the selection by using the “Next Solution” button.
FirstElem As Reference
This property returns or sets the first reference element of the corner (“Element 1” field).

FirstOrientation As Long
This property returns or sets the orientation of the corner’s first reference element. The value
range is “1” or “–1.” The value is “1” if the orientation of the corner’s first reference element is
the same as the cross product; “–1” is the inverse.

FirstTangentOrientation As Long
This property returns or sets whether the first element and the corner have the same orientation
(same orientation: “1;” opposite orientation: “–1”).

Sub InvertFirstOrientation
This method inverts the orientation of the first element.

Sub InvertSecondOrientation
This method inverts the orientation of the second element.

OnVertex As Boolean
This property returns or sets the “On Vertex” mode (enabled: “True”).

Radius As Length (Read Only)


This property returns the radius (“Radius” field). The value can be edited with the Value method.

SecondElemAs Reference
This property returns or sets the second reference element of the corner (“Element 2” field).

SecondElem As Long
This property returns or sets the orientation of the corner’s second reference element. Refer
to FirstOrientation.
SecondTangentOrientation As Long
This property returns or sets whether the second element and the corner have the same
orientation (same orientation: “1;” opposite orientation: “–1”).

Support As Reference
This property returns or sets the corner support when the corner type is “Corner on Support.”

Trim As Boolean
This property returns or sets the trim mode (“Trim Elements” check box).

TrimMode As Long
This property returns or sets the trim mode (“Trim Element 1” and “Trim Element 2”). If the value
is “0,” no elements are trimmed. If the value is “1,” both elements are trimmed, and if the value
is “2,” only the first element is trimmed. If the value is “3,” only the second element is trimmed.
8.74 HybridShapeCurveExplicit

This class represents a curve without history (see Section 6.5). An object of the class is created
with the AddNewCurveDatum method of the HybridShapeFactory class (Section 8.85). This
class has no properties or methods. Explicit geometry cannot be changed via parameters.
Object Path: AnyObject.HybridShape.HybridShapeCurveExplicit

8.75 HybridShapeCurvePar

This class represents a parallel curve (see Section 6.5). An object of the class is created with
the AddNewCurvePar method of the HybridShapeFactory class (Section 8.85).
Object Path: AnyObject.HybridShape.HybridShapeCurvePar
CurveOffseted As Reference
This property returns or sets the reference curve (“Curve” field).

CurveParLaw As Reference
This property returns or sets the offset law (“Law” button).

CurveParType As Long
This property returns or sets the corner type of the parallel curve (“Parallel Corner Type” field).
The value range is “1” for “Round” type and “0” for “Sharp” type.

Geodesic As Boolean
This property returns or sets whether a Geodesic parallel (“True”) or Euclidean parallel (“False”)
is computed (“Geodesic Mode” field).

Sub GetPlaneNormal [Vector] As CATSafeArrayVariant


This method returns the normal plane created when the support of the curve is not specified.

InvertDirection As Boolean
This property returns or sets the orientation of a parallel curve. If InvertDirection is “False,”
there is no inversion of the curve orientation. If InvertDirection is “True,” the curve orientation is
inverted.

InvertMappingLaw As Boolean
This property returns or sets the mapping orientation of the law (“Inverse Law” check box). If the
value is “True,” the law is reversed.

KeepBothSides As Boolean
This property returns or sets the both sides mode of the parallel curve (“Both Sides” check box).
If the value is “True,” both sides are computed.

LawType As Long
This property returns or sets the law type after a parallel curve is computed. The law type has
the following values: “0” (Undefined), “1” (Constant), “2” (Linear), “3” (S-type), and “4”
(Advanced).

MaximumDeviationValue As Double
This property returns or sets the maximum deviation allowed for the smoothing operation
(“Deviation” field).

Offset As Length (Read Only)


This property returns or sets the distance between the parallel and the reference curve
(“Constant” field). The value can be edited with the Value method.
Offset2 As Length (Read Only)
This property returns or sets the second offset value.

OtherSide As Reference (Read Only)


This property returns the other side of the parallel curve if the KeepBothSides mode is on.

p3DSmoothing As Boolean
This property returns or sets whether the 3D smoothing method is used (“True”) or not (“False”)
(“3D Smoothing” check box).

PassingPoint As Reference
This property returns or sets the passing point of the parallel curve (“Point” field).

Sub PutPlaneNormal [Vector] As CATSafeArrayVariant


This method sets the vector of the normal plane of the parallel curve, provided no support is
defined.

SmoothingType As Long
This property returns or sets the smoothing type (“Smoothing” check box). The values are “0” for
no smoothing, “2” for tangent continuity, and “3” for curvature continuity.

Support As Reference
This property returns or sets the parallel curve support.
8.76 HybridShapeCurveSmooth

This class represents a curve smooth (see Section 6.5). An object of the class is created with
the AddNewCurveSmooth method of the HybridShapeFactory class (Section 8.85).
Object Path: AnyObject.HybridShape.HybridShapeCurveSmooth
Sub AddFrozenCurveSegment [Curve As Reference]
This method adds a frozen curve to the curve smooth.

Sub AddFrozenPoint [Point As Reference]


This method adds a frozen point to the curve smooth.

CorrectionMode As Long
This property returns or sets the correction mode applied to the smoothed curve. Value “0” =
threshold, value “1” = point, value “2” = tangency, and value “3” = curvature.

CurvatureThreshold As Double
This property returns or sets the curvature threshold of the smoothed curve. Note:
the CurvatureThresholdActivity property must be enabled.

CurvatureThresholdActivity As Boolean
This property returns or sets the curvature threshold activity. If the threshold is met, the property
must be “True.”

CurveToSmooth As Reference
This property returns or sets the curve to smooth.
EndExtremityContinuity As Long
This property returns or sets the continuity condition applied to the smoothed curve at the end
extremity of the input curve. Value “0” = point, value “1” = tangency, and value “2” = curvature.

Func GetFrozenCurveSegment (Index As Long) As Reference


This function returns the frozen curve segment’s “Index” number.

Func GetFrozenCurveSegmentsSize As Long


This function returns the number of frozen curve segments in the curve smooth.

Func GetFrozenPoint [Index As Long] As Reference


This function returns the frozen curve point’s “Index” number.

Func GetFrozenPointsSize As Long


This function returns the number of frozen points in the curve smooth.

MaximumDeviation As Length (Read Only)


This property returns or sets the maximum deviation allowed for the curve smooth.

MaximumDeviationActivity As Boolean
This property returns or sets whether the maximum deviation activity is applied to the curve
smooth. If the threshold is met, the property must be “True.”

Sub RemoveAllFrozenCurveSegments
This method removes all frozen curve segments of the curve smooth.

Sub RemoveAllFrozenPoints ( )
This method removes all frozen curve points of the curve smooth.

Sub RemoveFrozenCurveSegment [Curve As Reference]


This method removes a frozen curve segment from the list of frozen curves in the curve smooth.

Sub RemoveFrozenPoint [Point As Reference]


This method removes a frozen point from the list of frozen points in the curve smooth.

SetMaximumDeviation [Maximum Deviation As Double]


This method sets the maximum deviation of the curve smooth. Note:
the CurvatureThresholdActivity property must be “True.”

Sub SetTangencyThreshold [Threshold Angle As Double]


This method sets the tangency threshold in degrees.

StartExtremityContinuity As Long
This property returns or sets the continuity condition applied to the smoothed curve at the start
extremity of the input curve. Value “0” = point, value “1” = tangency, and value “2” = curvature.

Support As Reference
This property returns or sets the support of the smooth curve.

TangencyThreshold As Angle (Read Only)


This property returns the threshold angle for the tangent continuity.

TopologySimplificationActivity As Boolean
This property returns or sets whether the result is topologically simplified. To activate a
topological simplification, this property must be set to “True.”

8.77 HybridShapeCylinder

This class represents a cylinder (see Section 6.5). An object of the class is created with
the AddNewCylinder method of the HybridShapeFactory class (Section 8.85).
Object Path: AnyObject.HybridShape.HybridShapeCylinder
Center As Reference
This property returns or sets the center of the cylinder (“Point” field).

Direction As HybridShapeDirection
This property returns the direction definition (Section 3.6) of a cylinder.
Sub InvertOrientation
This method inverts the value of the Orientation property.

Length1 As Length (Read Only)


This property returns or sets the length of the cylinder in the first direction (“Length 1” field).

Length2 As Length (Read Only)


This property returns or sets the length of the cylinder in the second direction (“Length 2” field).
Refer to Length1.
Orientation As Boolean
This property returns or sets the inversion of extrusion direction. If the value is
“False,” Length1 is oriented in the Direction orientation.

Radius As Length (Read Only)


This property returns the radius (“Radius” field).

8.78 HybridShapeDirection
This class represents a direction definition (see Section 3.6). An object of this class is derived
with the AddNewDirection and the AddNewDirectionByCoord method of
the HybridShapeFactory class (Section 8.85).
Object Path: AnyObject.HybridShape.HybridShapeDirection
Func DirectionSpecification As Long
This method reads the status of a defined direction. The return values are: “0” (direction is not
specified), “1” (direction is specified and is valid), and “–1” (direction is specified but is not valid).

Func GetX As RealParam


This method returns the X component of a direction vector if Type is equal to “1.”

Func GetXVal As Double


This method returns the X component value of a direction vector if Type is equal to “1.”

Func GetY As RealParam


This method returns the Y component of a direction vector. Refer to GetX.
Func GetYVal As RealParam
This method returns the Y component value of a direction vector. Refer to GetXVal.
Func GetZ As RealParam
This method returns the Z component of a direction vector. Refer to GetX.
Func GetZVal As RealParam
This method returns the Z component value of a direction vector. Refer to GetXVal.
Object As Reference
This property returns or sets the object that specifies the direction. The object can be a line or a
plane. The property must have the same type.
RefAxisSystem As Reference
This property returns or sets the reference Axis System for Direction feature. If the property is
“Nothing,” the absolute axis system is used.

Type As Long (Read Only)


This property returns the direction definition type. The value range is “0” (definition of a plane or
line) and “1” (direction is specified by using its components X, Y, and Z).

X As Length (Read Only)


This method returns the X component of the direction vector. The value can be changed with
the Value method.

Y As Length (Read Only)


This method returns the Y component of the direction vector.
Z As Length (Read Only)
This method returns the Z component of the direction vector.

8.79 HybridShapeExtract
This class represents an extract (see Section 6.5). An object of the class is created with
the AddNewExtract method of the HybridShapeFactory class (Section 8.85).
Object Path: AnyOject.HybridShape.HybridShapeExtract
AngularThreshold As Double
This property returns or sets the angular threshold (“Angular Threshold” field).
AngularThresholdActivity As Boolean
This property returns the state of angular threshold activity.
ComplementaryExtract As Boolean
This property returns or sets the “Complementary Mode” for the extract (activated: “True”).

CurvatureThresholdActivity As Boolean
This property returns or sets whether curvature threshold activity is activated. When activated,
the value equals “True.”

DistanceThreshold As Double
This property returns the distance threshold (“Distance Threshold” field).
AngularThresholdActivity As Boolean
This property returns the state of distance threshold activity.
Elem As Reference
This property returns or sets the sub-element used for propagation (“Elements to Extract” field).

IsFederated As Boolean
This property returns or sets the state of “Federation” option (activated: “True”).

PropagationType As Long
This property returns or sets the type of propagation for the extract (“Propagation Type” field).
The value range is “1” for point continuity, “2” for tangent continuity, and “3” for without
propagation.

Support As Reference
This property returns or sets the support for the extract.
8.80 HybridShapeExtractMulti

This class represents a multiple extract (see Section 6.5). An object of the class is created with
the AddNewExtractMulti method of the HybridShapeFactory class (Section 8.85).
Object Path: AnyObject.HybridShape.HybridShapeExtractMulti

Sub AddConstraintTolerant [Element] As Reference, [Type] As Long, [Complementary,


Federated] As Boolean, [Distance Threshold, Angular Threshold, Curvature Threshold]
As Double, [Position] As Long
This property adds a constraint to the list of extracted elements. “Type” determines whether
neighboring elements should be included (see SetPropagationType). “Complementary”
enables (“True”) or disables the complementary mode (see SetComplementaryExtractMulti).
“Federated” specifies whether the found items are to be joined (“True”) or not
(see SetIsFederated). “Distance, Angular & Curvature” return or set their respective threshold.
“Position” determines rhe position in the list of elements that the element is inserted. The value
of “Position” is the first element “1.”

Func GetAngularThreshold ([Position] As Long) As Double


This function returns the threshold value for the angle at “Position.” The value of “Position” is “1”
for the first element.

Func GetAngularThresholdActivity ([Position] As Long) As Boolean


This function returns whether the angular threshold activity of an element is active (“True”) or
not (“False”). The value of “Position” is “1” for the first element.

Func GetComplementaryExtractMulti ([Position] As Long) As Boolean


This function returns the “Complementary Mode” for the extract. The value of “Position” is “1” for
the first element.

Func GetCurvatureThreshold ([Position] As Long) As Double


This method returns the curvature threshold of the list of constraints at a specified position. The
value of “Position” is “1” for the first element.

Func GetCurvatureThresholdActivity ([Position] As Long) As Boolean


This method returns whether the curvature threshold activity of an element is activated. When
activated, the value equals “True.” The value of “Position” is “1” for the first element.

Func GetDistanceThreshold ([Position] As Long) As Double


This function returns the distance threshold of the list of constraints at specified “Position.” The
value of “Position” is “1” for the first element.

Func GetDistanceThresholdActivity ([Position] As Long) As Boolean


This function returns whether the distance threshold activity of an element is active (“True”) or
not (“False”). The value of “Position” is “1” for the first element.

Func GetElement ([Position] As Long) As Reference


This method returns the sub-element used for propagation. The value of “Position” is “1” for the
first element.

Func GetIsFederated ([Position] As Long) As Boolean


This method returns the state of the “Federation” option. The value of “Position” is “1” for the
first element.

Sub GetListOfConstraints [List] As CATSafeArrayVariant


This method returns the list of extracted elements. The index of the field runs from “0” to the
number of elements minus one.

Sub GetNbConstraints [Quantity] As Long


This method returns the number of extracted elements.
Func GetPropagationType ([Position] As Long) As Long
This method returns the type of propagation of the list of constraints at a specified position. The
value range can be taken from the SetPropagationType method. The value of “Position” is “1”
for the first element.

Func GetSupport ([Position] As Long) As Reference


This method returns the support of the list of constraints at a specified “Position.” The value of
“Position” is “1” for the first element.

Sub RemoveElement [Position] As Long


This method removes an element from the list of elements to be extracted.

Sub ReplaceElement [Old, New] As Reference, [Position] As Long


This method exchanges an element from the list of elements to be extracted with a new element.
The value of “Position” is “1” for the first element.

Sub SetAngularThreshold [Position] As Long, [Angular Threshold Value] As Double


This method sets the angular threshold in the list of constraints at a specified “Position.” The
value of “Position” is “1” for the first element.

Sub SetAngularThresholdActivity [Position] As Long, [Activity] As Boolean


This method sets the angular threshold activity in the list of constraints at a specified “Position.”
The value of “Position” is “1” for the first element. If an angular threshold is used, the activity is
“True.”

Sub SetComplementaryExtractMulti [Position] As Long, [Mode] As Boolean


This method sets the complementary mode of an element to be extracted. The value of
“Position” is “1” for the first element.

Sub SetCurvatureThreshold [Position] As Long, [Value] As Double


This method sets the “Curvature Threshold” of an element to be extracted. The value of
“Position” is “1” for the first element.

Sub SetCurvatureThresholdActivity [Position] As Long, [Mode] As Boolean


This method sets the curvature threshold activity of an element to be activated. The value of
“Position” is “1” for the first element.

Sub SetDistanceThreshold [Position] As Long, [Distance Threshold] As Double


This method sets the distance threshold at the “Position.” The value of “Position” is “1” for the
first element.

Sub SetDistanceThresholdActivity [Position] As Long, [Activity] As Boolean


This method sets the distance threshold activity in the list of constraints at a specified “Position.”
The value of “Position” is “1” for the first element. If a distance threshold is used, the activity is
“True.”

Sub SetElement [Position] As Long, [Element] As Reference


This method sets the sub-element used for the propagation. The value of “Position” is “1” for the
first element.

Sub SetIsFederated [Position] As Long, [Mode] As Boolean


This method sets the state of the “Federation” option. The value of “Position” is “1” for the first
element.

Sub SetPropagationType [Position, Type] As Long


This method sets the type of propagation for the extract. The value of “Position” is “1” for the
first element. The value range for “Type” is “1” (point continuity), “2” (tangent continuity), “3” (no
propagation), and “4” (curvature continuity).

8.81 HybridShapeExtrapol
This class represents an extrapolation (see Section 6.5). An object of the class is created with
the AddNewExtrapolLength and AddNewExtrapolUntil methods of
the HybridShapeFactory class (Section 8.85).
Object Path: AnyObject.HybridShapeExtrapol
BorderType As Long
This property returns or sets the border type of an extrapolation. The border type is either
normal to the boundary (value of “0”) or tangent to the edges of the extrapolated surface (value
of “1”).

Boundary As Reference
This property returns or sets the boundary of an extrapolated curve or surface.

ConstantLengthMode As Boolean
This property returns or sets the state of the “Constant Distance Optimization” option. The
option is enabled if the value is “True.”

ContinuityType As Long
This property returns or sets whether the extrapolated element has tangent continuity. Value “0”
= curvature continuity, and value “1” = “Continuity” field.

ElemToExtrapol As Reference
This property returns or sets the curve or surface to extrapolate (“Extrapolated” field).

ElemUntil As Reference
This property returns or sets the surface or volume specifying the extrapolation limit (“Up to”
field). The LimitType property must equal “1” for this property to exist.
ExtendEdgesMode As Boolean
This property returns or sets the extension of extrapolated edges mode (“Extend Extrapolated
Edges” check box). The option is enabled if the value is “True.”

Func GetInternalEdgesElement ([Index] As Long) As Reference


This function gets an element in the list of internal elements (“Internal Edges” list). “Index” starts
at “1.”

Func IsAssemble As Boolean


This method returns whether extrapolation is assembled with extrapolated curve or surface
(“Assemble Result” check box). If the value is “True,” the elements are assembled.
Length As Length (Read Only)
This property returns the length specifying the extrapolation (“Length” field). The value can be
edited with the Value method. The LimitType property must equal “0” for this property to exist.

LimitType As Long
This property returns or sets the limit type of the extrapolation. If the type is “0,” the
extrapolation is defined by length. If the type is “1,” the extrapolation is defined by an up-to-limit
element (“Type” field).

PropagationMode As Long
This property returns or sets the propagation mode (“Continuity” field). The values are “0” for
“No Propagation” and “1” for “Tangent Continuity.”

Sub RemoveAllInternalEdgesElement
This method removes all internal elements (“Internal Edges” list).

Sub SetAssemble [Value] As Boolean


This method sets whether extrapolation is to be assembled with an extrapolated curve or
surface (“Assemble Result” check box).

Support As Reference
This property returns or sets the support surface. If a support element is given (for example, an
extrapolated curve), it will lie on a supporting surface.

8.82 HybridShapeExtremum

This class represents an extremum (see Section 6.2). An object of the class is created with
the AddNewExtremum method of the HybridShapeFactory class (Section 8.85). The class is
only available with a Generative Shape Design license.
Object Path: AnyObject.HybridShape.HybridShapeExtremum
Direction As HybridShapeDirection
This property returns or sets the first direction in which the extremum is determined (“Direction”
field).

Direction2 As HybridShapeDirection
This property returns or sets the second direction in which the extremum is determined. Refer
to Direction.
Direction3 As HybridShapeDirection
This property returns or sets the third direction in which the extremum is determined. Refer
to Direction.
ExtremumType As Long
This property returns or sets whether the first direction is determined as minimum (value “0”) or
maximum (value “1”).

ExtremumType2 As Long
This property returns or sets the second direction. Refer to ExtremumType.
ExtremumType3 As Long
This property returns or sets the third direction. Refer to ExtremumType.
ReferenceElement As Reference
This property returns or sets the element on which the extremum is determined (“Element” field).

8.83 HybridShapeExtremumPolar

This class represents a polar extremum (see Section 6.2). An object of the class is created with
the AddNewExtremumPolar method of the HybridShapeFactory class (Section 8.85).
Object Path: AnyObject.HybridShape.HybridShapeExtremumPolar
Angle As Angle (Read Only)
This property returns the resulting angle of extremum (“Angle” field). The angle is only available
if the ExtremumType equals “2” or “3.” The value can be edited with the Value method.

Contour As Reference
This property returns or sets the input contour (“Contour” field).

Dir As HybridShapeDirection
This property returns or sets the direction in which the extremum is determined (“Reference
Direction” field).

ExtremumType As Long
This property returns or sets the type of extremum (“Type” field). The value is “0” for a minimum
radius, “1” for a maximum radius, “2” for a minimum angle, and “3” for a maximum angle.

Origin As Reference
This property returns or sets the origin (“Origin” field).

Radius As Length (Read Only)


This property returns the resulting radius of the extremum (“Radius” field). The radius property is
only available when ExtremumType equals “0” or “1.” The value can be edited with
the Value method.

Support As Reference
This property returns or sets the support (“Support” field).
8.84 HybridShapeExtrude

This class represents an extrusion (see Section 6.6). An object of this class is created with
the AddNewExtrude method of the ShapeFactory class (Section 8.199).
Object Path: AnyObject.HybridShape.HybridShapeExtrude
BeginOffset As Length (Read Only)
This property returns the distance of the first limit (“Limit 1” field).

Context As Long
This property returns whether an extrusion is created as a surface (value “0”) or volume (value
“1”).

Direction As HybridShapeDirection
This property returns or sets the direction in which the profile is extruded (“Direction” field).

EndOffset As Length (Read Only)


This property returns the distance of the second limit (“Limit 2” field).

ExtrudedObject As Reference
This property returns or sets the extruded element (“Profile” field). The element may be a point,
a line, a curve, sketch, or surface.
FirstLimitType As Long
This property returns or sets whether the first limit of an extrusion is a dimension (value “1”) or
an up-to element (value “2”) (“Type” field).

FirstUpToElement As Reference
This property returns or sets the first up-to element used to limit the extrusion (“Up-to Element”
field), provided FirstLimitType is equal to “2.”

Orientation As Boolean
This property returns or sets whether the orientation direction of the element is used (“True”) or
whether the direction is inverted (“False”).
SecondLimitType As Long
This property returns or sets the second limit of an extrusion. Refer to FirstLimitType.
SecondUpToElement As Reference
This property returns or sets the second up-to element used to limit the extrusion. Refer
to FirstUpToElement.

8.85 HybridShapeFactory
This class represents a 3D toolbox for wire geometry and surfaces (see Section 6.1). An object
of the class is created with the HybridShapeFactory property of the Part class (Section 8.168).
The methods listed in the following section are just a portion of the methods used by the
Generative Shape Design license.
Object Path: AnyObject.Factory.HybridShapeFactory
Func AddNew3DCorner ([Curve1, Curve2] As Reference, [Direction] As
HybridShapeDirection, [Radius] As Double, [Orientation1, Orientation2] As Long, [Trim]
As Boolean) As HybridShapeCorner

This method creates a 3D corner curve between a point and a curve or two curves along a
direction. “Direction” is normal to the plane that the 3D curve lies on. The orientations
“Orientation1” and “Orientation2” determine the location of the corner center position with
respect to the curves. The orientation equals “1” when the center should lie in the direction of
the cross product vectors of the curve, and the parameter “Direction.” “–1” determines the other
side. If the curves are to be trimmed and assembled, “Trim” is set to “True.”
Func AddNew3DCurveOffset ([Curve] As Reference, [Direction] As HybridShapeDirection,
[Offset, Corner Radius, Corner Tension] As Double) As HybridShape3DcurveOffset

This method creates a 3D curve offset. “Curve” defines the output curve. “Direction” determines
the direction in which the curve offset is computed. “Offset” defines the offset distance of the
initial curve. “Corner Radius” and “Corner Tension” define the 3D corner parameters.

Func AddNewAffinity ([Element] As Reference, [XRatio, YRatio, ZRatio] As Double) As


HybridShapeAffinity

This method creates a new element, distorting an original element in the three principal
directions (see Example 6.12).

Func AddNewAxisLine ([Output Element] As Reference) As HybridShapeAxisLine

This method creates an axis from a circle, ellipse, oblong, sphere, or revolution.

Func AddNewAxisToAxis ([Element, Reference Axis, Target Axis] As Reference) As


HybridShapeAxisToAxis
This method creates an axis-to-axis transformation of the “Element” geometry. This defines a
transformation of an origin axis system to a target axis system, “Reference Axis” and “Target
Axis” (see Example 6.13).

Func AddNewBlend As HybridShapeBlend

This method creates a blend. The geometry of a blend (Section 8.57) is defined with the
methods of the HybridShapeBlend class (see Example 6.10).

Func AddNewBoundary ([Initial Element, Support] As Reference, [Propagation] As Long)


As HybridShapeBoundary

This method creates a new boundary of a support. The limit is computed based on an output
element. “Propagation” determines what additional elements are included in the boundary
geometry (“0”: all edges, “1”: all edges that are connected to a point, “2”: all edges that are
tangent, “3”: no propagation).

Func AddNewBoundaryOfSurface ([Surface] As Reference) As HybridShapeBoundary


This method creates a new boundary of a surface. All boundaries will then be computed.

Func AddNewCircle2PointsRad ([Point1, Point2, Support] As Reference, [OnSurface] As


Boolean, [Radius] As Double, [Orientation] As Long) As HybridShapeCircle2PointsRad

This method creates a circle passing through two points “Point1” and “Point2.” The points must
lie on the support surface “Support.” If “OnSurface” is “True,” the circle is created on the surface
(Geodesic mode). If “OnSurface” is “False,” the circle is created through “Point1” tangent to the
surface on a plane. “Orientation” is “1” or “–1” and defines the side where the circle is computed
by using the normal direction of line between “Point1” and “Point2.”

Func AddNewCircle3Points ([Point1, Point2, Point3] As Reference) As


HybridShapeCircle3Points

This method creates a circule passing through three points “Point1,” “Point2,” and “Point3”
(see Section 6.5.2).

Func AddNewCircleBitangentPoint ([Curve1, Curve2, Point, Support] As Reference,


[Orientation1, Orientation2] As Long) As HybridShapeCircleBitangentPoint
This method creates a new circle tangent to “Curve1” and “Curve2” passing through “Point.”
“Point” must lie on “Curve2.” The orientations specify the position of the circle center point to a
curve. Their values can be “1” or “–1.” The center point is placed in an orientation of “1” on the
side of the curve, illustrating the cross product of vectors of the surface and the orientation of
the curve. “–1” uses the inverted orientation of the curve. Depending on the orientation of each
curve, it may not be geometrically possible to create the circle.

Func AddNewCircleBitangentRadius ([Curve1, Curve2, Support] AsReference, [Radius]


As Double, [Orientation1, Orientation2] As Long) As HybridShapeCircleBitangentRadius

This method creates a new circle tangent to “Curve1” and “Curve2” and has a defined radius.
The orientations specify the position of the circle center point to a curve. Their values can be “1”
or “–1.” The center point is placed in an orientation of “1” on the side of the curve, illustrating the
cross product of vectors of the surface and the orientation of the curve. “–1” uses the inverted
orientation of the curve. Depending on the orientation of each curve, it may not be geometrically
possible to create the circle.

Func AddNewCircleCenterAxis ([Axis, Point] As Reference, [Radius] As Double,


[Projection] As Boolean) As HybridShapeCircleCenterAxis

This method creates a circle that is defined by an axis and a point. When “Projection” is “False,”
the “Point” will be the center of the circle. When “Projection” is “True,” the “Point” will be
projected on to the “Axis.”

Func AddNewCircleCenterAxisWithAngles ([Axis, Point] As Reference, [Radius] As


Double, [Projection] As Boolean, [Start Angle, End Angle] As Double) As
HybridShapeCircleCenterAxis

This method creates a circle that is defined by an axis, a point, and two angles (refer
to AddNewCircleCenterAxis).

Func AddNewCircleCenterTangent ([Center Element, Tangent, Support] As Reference,


[Radius] As Double) As HybridShapeCircleCenterTangent

This method creates a circle that is defined by a center element, a tangent, a radius, and a
support surface. The central element determines the position of the center, which may be a
point or a curve. The central element and tangent must lie on the support, if one exists. If one
does not, the “Nothing” value can be used in place of a support (see example shown here).

Func AddNewCircleCtrPt ([Center, Passing Point, Support] As Reference, [OnSurface] As


Boolean) As HybridShapeCircleCtrPt

This method creates a circle that is defined by a center point and a passing point. Both points
must lie on the support. If “OnSurface” is “True,” the circle is created on the surface (Geodesic
mode). If “OnSurface” is “False,” the circle is created on a plane which is oriented tangent to the
support at the center. The passing point is projected normal to this plane on the plane.
Func AddNewCircleCtrPtWithAngles ([Center, Passing Point, Support] As Reference,
[OnSurface] As Boolean, [Start Angle, End Angle] As Double) As HybridShapeCircleCtrPt

This method creates a circle that is defined by a center, a passing point, and two angles. Both
points must lie on the support. If “OnSurface” is “True,” the circle is created on the surface
(Geodesic mode). If “OnSurface” is “False,” the circle is created on a plane which is oriented
tangent to the support at the center. The passing point is projected normal to this plane on the
plane.

Func AddNewCircleCtrRad ([Center, Support] As Reference, [OnSurface] As Boolean,


[Radius] As Double) As HybridShapeCircleCtrRad

This method creates a circle defined by a center and a radius. The center must lie on the
support. If “OnSurface” is “True,” the circle is created on the surface (Geodesic mode). If
“OnSurface” is “False,” the circle is created on a plane which is oriented tangent to the support
at the center.

Func AddNewCircleCtrRadWithAngles ([Center, Support] As Reference, [OnSurface] As


Boolean, [Radius, Start Angle, End Angle] As Double) As HybridShapeCircleCtrRad
This method creates a circle defined by a center, a radius, and two angles. The center must lie
on the support. If “OnSurface” is “True,” the circle is created on the surface (Geodesic mode). If
“OnSurface” is “False,” the circle is created on a plane which is oriented tangent to the support
at the center.

Func AddNewCircleDatum ([Element] As Reference) As HybridShapeCircleExplicit

This method creates a circle as explicit geometry without history of the output “Element.” The
output element must be a circle or an arc. The output element is not deleted. (An output element
can be deleted with the DeleteObjectForDatum method.)

Func AddNewCircleTritangent ([Curve1, Curve2, Curve3, Support] As Reference,


[Orientation1, Orientation2, Orientation3] As Long) As HybridShapeCircleTritangent

This method creates a circle that is tangent to three curves. The curves must lie on the support.
The orientations specify the position of the circle center point to a curve. Their values can be “1”
or “–1.” The center point is placed in an orientation of “1” on the side of the curve illustrating the
cross product of vectors of the surface and the orientation of the curve. “–1” uses the inverted
orientation of the curve.

Func AddNewCombine ([Curve1, Curve2] As Reference, [Index] As Long) As


HybridShapeCombine
This method creates a combine by using two planar extruded curves, “Curve1” and “Curve2,” in
the direction of its plane normals and combining the extrusions. If there are several solutions, a
specific solution can be selected by using the index. An index of “0” results in the nearest
solution of the first curve. “1” yields all the solutions.

Func AddNewConic (Plane, Start Point, End Point As Reference) As HybridShapeConic

This method creates a conic. The missing parameters of the conic can be defined with the
properties of the HybridShapeConic class (Section 8.71). The start and end points must lie on
the plane.

Func AddNewConicalReflectLineWithType (iSupport As Reference, iOrigin As Reference,


iAngle As Double, iOrientationSupport As Long, iType As Long) As
HybridShapeReflectLine
See AddNewReflectLineWithType.
Func AddNewConnect ([Curve1, Point1] As Reference, [Orientation1, Continuity1] As
Long, [Tension1] As Double, [Curve2, Point2] As Reference, [Orientation2, Continuity2]
As Long, [Tension2] As Double, [Trim] As Boolean) As HybridShapeConnect

This method creates a connect of the “Normal” type between “Curve 1” at “Point 1” and “Curve2”
at “Point2” (see Example 6.8). The points must lie on the curves. The orientation is the direction
of a curve (no inversion: “1”; inversion: “–1”). Continuity determines whether the connection
point of the curve has tangent or curvature continuity (values: “0,” “1,” or “2”). Tension indicates
the characteristics of the curve: the larger the value, the stronger the effect. If “Trim” is “True,”
the two curves and connect are trimmed to each other and assembled.
Func AddNewCorner ([Curve1, Curve2, Support] As Reference, [Radius] As Double,
[Orientation1, Orientation2] As Long, [Trim] As Boolean) As HybridShapeCorner

This method creates a corner between two curves. The curves must lie on the support. The
orientations “Orientation1” and “Orientation2” determine the location of the corner center with
respect to the curves. The orientation equals “1” when the center should lie in the direction of
the cross product of the vectors of the curve and direction. “–1” determines the other direction. If
the curves are trimmed to the corner and assembled, “Trim” is set to “True.”

Func AddNewCurveDatum ([Element] As Reference) As HybridShapeCurveExplicit

This method creates a curve as explicit geometry without the history of the output curve
“Element.” The output element must be a circle or an arc. The output element is not deleted. (An
output element can be deleted by using the DeleteObjectForDatum method.)

Func AddNewCurvePar ([Curve, Support] As Reference, [Distance] As Double,


[OnSurface, Inversion] As Boolean) As HybridShapeCurvePar

This method creates a parallel curve. The curve must lie on the surface. “Inversion” determines
the side the parallel is created on. When “Inversion” is “False,” the parallel lies in the direction of
the cross product of the curve and the surface vector. If the geodesic mode is to be computed,
“OnSurface” must equal “True.”

Func AddNewCurveSmooth (CurveToSmooth As Reference) As


HybridShapeCurveSmooth
This method creates a smooth curve.

Func AddNewCylinder ([Point] As Reference, [Radius, Length1, Length2] As Double,


[Direction] As HybridShapeDirection) As HybridShapeCylinder

This method creates a cylinder starting from a point and a direction. “Length1” determines the
length of the cylinder orientation with respect to “Direction.” “Length2” determines the length in
the opposite orientation.

Func AddNewDirection ([Element] As Reference) As HybridShapeDirection


This method creates a direction definition (see Section 3.6.2) where element axes, lines, or
planes are used. A direction definition cannot be assigned with
the AppendHybridShape method.

Func AddNewDirectionByCoord ([DX, DY, DZ] As Double) As HybridShapeDirection


This method creates a direction definition defined by a specific direction vector (see Section
3.6.1). A direction definition cannot be assigned with the AppendHybridShape method.

Func AddNewEmptyRotate As HybridShapeRotate


This method creates an undefined transformation of the “Rotate” type. The transformation is
defined with the properties of the HybridShapeRotate class (Section 8.130).

Func AddNewEmptyTranslate As HybridShapeTranslate

This method creates an undefined transformation of the “Translate” type. The transformation is
defined with the properties of the HybridShapeTranslate class (Section 8.147).

Func AddNewExtract ([Element] As Reference) As HybridShapeExtract

This method creates an associative derivation of a geometric element.

Func AddNewExtractMulti ([FirstElement] As Reference) As HybridShapeExtractMulti

This method creates a multiple derivation and assigns it to a list of elements. It can also be
created by using “Nothing,” which is an empty list that you can fill with
the AddConstraint method of the HybridShapeExtractMulti class (Section 8.80).

Func AddNewExtrapolLength ([Boundary, BaseElement] As Reference, [Length] As


Double) As HybridShapeExtrapol
This method creates an extrapolation of a base element to a defined length. If the base element
is a curve, the boundary is a point. If the base element is a surface, the boundary is a curve.

Func AddNewExtrapolUntil ([Boundary, BaseElement, LimitingElement] As Reference)


As HybridShapeExtrapol

This method creates an extrapolation of a base element up to a limiting element. If the base
element is a curve, the boundary is a point. If the base element is a surface, the boundary is a
curve.

Func AddNewExtremum ([Object] As Reference, [Direction] As HybridShapeDirection,


[MinMax] As Long) As HybridShapeExtremum

This method creates an extremum at the “Object” in the direction of “Direction.” “MinMax”
defines whether the maximum direction (value “1”) or minimum direction (value “0”) is used. This
method is only available with the Generative Shape Design license.

Func AddNewExtremumPolar ([Type] As Long, [Contour] As Reference) As


HybridShapeExtremumPolar
This method creates an extremum polar. The “Type” parameter defines the type of extremum
(value “0”: minimum radius, value “1”: maximum radius, value “2”: minimum angle, value “3”:
maximum angle). “Contour” controls the contour that the extremum is created on. The definition
of the extremum is complemented by the creation of properties with
the HybridShapeExtremumPolar class (Section 8.83). This method is only available with the
Generative Shape Design license.

Func AddNewExtrude ([Element] As Reference, [Distance1, Distance2] As Double,


[Direction] As HybridShapeDirection) As HybridShapeExtrude

This method creates an extrusion of a geometric element. The distances define the distance of
the extrusion. The element may be a point, line, curve, sketch, or surface. Typically only lines,
sketches, and curves can be extruded.

Func AddNewFill As HybridShapeFill

This method creates a fill surface. Boundary curves can be defined with
the AddBound methods of the HybridShapeFill class (Section 8.86). See Example 6.11.
Func AddNewFilletBiTangent ([Surface1, Surface2] As Reference, [Radius] As Double,
[Orientation1, Orientation2, TrimMode, LimitMode] As Long) As
HybridShapeFilletBiTangent

This method creates a fillet between two surfaces. “Orientation1” and “Orientation2” describe
the side of the surfaces that the center line of the fillet lies on. If the orientation is “1,” the center
line lies on the side of the direction vector of a surface. If the orientation is “–1,” the center line
lies on the other side of a surface. “TrimMode” defines whether the supporting surfaces are
trimmed with the fillet. “LimitMode” determines the side of the surface to be trimmed. “LimitMode”
has the following values: “0” (Smooth), “1” (Straight), “2” (Maximum), or “3” (Minimum).

Func AddNewFilletTriTangent ([Surface1, Surface2, RemoveElement] As Reference,


[Orientation1, Orientation2, RemoveOrientation, TrimMode, LimitMode) As
HybridShapeFilletTriTangent

This method creates a fillet between three surfaces. “Orientation1,” “Orientation2,” and
“RemoveOrientation” describe the sides of the surfaces that the center line of the fillet lies on. If
the orientation is “1,” the center line lies on the side of the direction vector of a surface. If the
orientation is “–1,” the center line lies on the other side of the surface. “TrimMode” defines
whether the supporting surfaces are trimmed with the fillet. “Trim-Mode” has the following
values: “0” (no trim), “1” (both surfaces), “2” (only surface 1), and “3” (only surface 2).
“LimitMode” determines the side of the surface to be trimmed. “LimitMode” has the following
values: “0” (Smooth), “1” (Straight), “2” (Maximum), or “3” (Minimum).

Func AddNewHelix ([Axis] As Reference, [Inversion] As Boolean, [Start Point] As


Reference, [Pitch, Height] As Double, [Clockwise] As Boolean, [Start Angle, Taper Angle]
As Double, [Taper Outward] As Boolean) As HybridShapeHelix
This method creates a helix. When “Inversion” is “False,” the helix follows the axis direction.
“Start Point” defines the starting point of the helix. The start point can be positioned about the
axis with the “Start Angle” parameters. “Pitch” defines the distance per revolution. “Height” is the
total height of the helix. Use the “Taper Angle” parameter to define a linearly tapering or
widening helix (default value equals “0”). If “Taper Outward” is “False,” the helix radius
decreases with height; if it is “True,” the helix radius increases.

Func AddNewHybridScaling ([Element, Reference Point] As Reference, [Ratio] As


Double) As HybridShapeScaling

This method creates a scaled element based on a reference point.

Func AddNewHybridSplit ([ElementToCut, CuttingElement] As Reference, [Orientation]


As Long) As HybridShapeSplit

This method creates a split. “Orientation” determines the kept side of the split. The value range
is “1” or “–1.” If the value is “1,” the returned side is the direction vector of the cutting element or
the cross product of two vectors. When two curves are cut, the first portion of the cut curve
remains.

Func AddNewHybridTrim ([Element1] As Reference, [Orientation1] As Long, [Element2]


As Reference, [Orientation2] As Long) As HybridShapeTrim
This method creates a trim. The trimmed elements are assembled. “Orientation” determines the
kept side of the trim. The value range is “1” or “–1.” If the value is “1,” the returned side is the
direction vector of the cutting element or the cross product of two vectors. When two curves are
cut, the first portion of the cut curve remains.

Func AddNewIntegratedLaw ([Type] As Long) As HybridShapeIntegratedLaw


This method creates an integrated law. The types of laws are “0” (None), “1” (Constant), “2”
(Linear), “3” (S-type), “4” (Advanced), and “5” (Implicit). An integrated law is assigned directly to
an object (see example). Note that the AppendHybridShape method (see Section 6.1) is not
applicable.

Func AddNewIntersection ([Element1, Element2] As Reference) As


HybridShapeIntersection

This method creates an intersection of two elements.

Func AddNewInverse ([Element] As Reference, [Orientation] As Long) As


HybridShapeInverse

This method creates a geometric element with a geometrically identical or inverted orientation.
“Orientation” determines which orientation the geometry creates. If the parameter is “1,” the
original orientation of the element is maintained; “–1” reverses the orientation.
Func AddNewJoin ([Element1, Element2] As Reference) As HybridShapeAssemble

This method creates a join between curves or surfaces. The methods of


the HybridShapeAssemble class (Section 8.54) make it possible to add other elements to a
join.

Func AddNewLawDistProj ([ReferenceCurve, DefinitionCurve] As Reference) As


HybridShapeLawDistProj

This method creates a law. The law is derived from the distance between the reference curve
and the definition curve. The distance is measured normal to the reference curve.

Func AddNewLineAngle ([Curve, Support, Point] As Reference, [Geodesic] As Boolean,


[Distance1, Distance1, Angle] As Double, [Inversion] As Boolean) As
HybridShapeLineAngle

This method creates a line on a support with an angle to a curve passing through a point. The
distances describe the distance between the start point and end point along the direction of the
line to the reference point. “Inversion” is the orientation of the line (Inversion is “True”). If
“Geodesic” is “True,” the line is on the support. If it is “False,” the line is on a plane tangent to
the supporting surface. The angle is the side of the curve that defines the cross product of the
direction vectors of the curve and supporting geometry.
Func AddNewLineBisecting ([Line1, Line2] As Reference, [Distance1, Distance2] As
Double, [Inversion] As Boolean, [Solution] As Long) As HybridShapeLineBisecting

This method creates a bisecting line between two lines. The distances describe the distance
between the start point and end point along the direction of the line to the intersecting point.
“Solution” selects either the first solution (value equal to “1”) or the second solution (value equal
to “2”). The orientation of the line lies in the direction of the two directional vectors of the lines
when the first solution is used. The “Inversion” parameter is the orientation of the line (Inversion
is “True”).

Func AddNewLineBisectingOnSupport ([Line1, Line2, Surface] As Reference, [Distance1,


Distance2] As Double, [Inversion] As Boolean, [Solution] As Long) As
HybridShapeLineBisecting

This method creates a bisecting line between two lines on a surface. The distances describe the
distance between the start and end points along the direction of the line to the intersecting point.
“Solution” selects either the first solution (value equal to “1”) or the second solution (value equal
to “2”). The orientation of the line lies in the direction of the two directional vectors of the lines
when the first solution is used. The “Inversion” parameter is the orientation of the line (Inversion
is “True”).

Func AddNewLineBisectingOnSupportWithPoint ([Line1, Line2, Point, Surface] As


Reference, [Distance1, Distance2] As Double, [Inversion] As Boolean, [Solution] As
Long) As HybridShapeLineBisecting
This method creates a bisecting line between two lines on a surface. The bisecting line passes
through the reference “Point.” The distances describe the distance between the start and end
points along the direction of the line to the intersecting point. “Solution” selects either the first
solution (value equal to “1”) or the second solution (value equal to “2”). The orientation of the
line lies in the direction of the two directional vectors of the lines, when the first solution is used.
The “Inversion” parameter is the orientation of the line (Inversion is “True”).

Func AddNewLineBisectingWithPoint ([Line1, Line2, Point] As Reference, [Distance1,


Distance2] As Double, [Inversion] As Boolean, [Solution] As Long) As
HybridShapeLineBisecting

This method creates a bisecting line between two lines passing through the reference “Point.”
The distances describe the distance between the start and end points along the direction of the
line to the intersecting point. “Solution” selects either the first solution (value equal to “1”) or the
second solution (value equal to “2”). The orientation of the line lies in the direction of the two
directional vectors of the lines, when the first solution is used. The “Inversion” parameter is the
orientation of the line (Inversion is “True”).

Func AddNewLineBiTangent ([Curve1, Curve2, Support] As Reference) As


HybridShapeLineBiTangent

This method creates a line that is tangent to two curves.


Func AddNewLineDatum ([Element] As Reference) As HybridShapeLineExplicit

This method creates a line as explicit geometry without history. The output line will be preserved
and not deleted. An output element can be deleted with the DeleteObjectForDatum method.

Func AddNewLineNormal ([Surface, Point] As Reference, [Distance1, Distance2] As


Double, [Inversion] As Boolean) As HybridShapeLineNormal

This method creates a line perpendicular to a surface through a reference “Point.” The
distances describe the distance between the start and end points along the direction of the line
to the intersecting point. The orientation of the line is in the direction of the surface normal
vector. The “Inversion” parameter is the orientation of the line (Inversion is “True”).

Func AddNewLinePtDir ([Point] As Reference, [Direction] As HybridShapeDirection,


[Distance1, Distance2] As Double, [Inversion] As Boolean) As HybridShapeLinePtDir

This method creates a line starting from a point along a direction (see Example 6.5). The
distances describe the distance between the start and end points along the direction of the line
to the point. The line is oriented in the direction of the “Direction” parameter. The “Inversion”
parameter is the orientation of the line (Inversion is “True”).
Func AddNewLinePtDirOnSupport ([Point] As Reference, [Direction] As
HybridShapeDirection, [Support] As Reference, [Distance1, Distance2] As Double,
[Inversion] As Boolean) As HybridShapeLinePtDir

This method creates a line on a support that starts from a point along one direction. The
distances describe the distance between the start and end points along the direction of the line
to the point. The line is oriented in the direction of the “Direction” parameter. The “Inversion”
parameter is the orientation of the line (Inversion is “True”).

Func AddNewLinePtPt ([Point1, Point2] As Reference) As HybridShapeLinePtPt

This method creates a line between two points (see Example 6.4).

Func AddNewLinePtPtExtended ([Point1, Point2] As Reference, [Length1, Length2] As


Double) As HybridShapeLinePtPt

This method creates a line between two points. The line is extended from the start point at
“Length1” and from the end point at “Length2.”
Func AddNewLinePtPtOnSupport ([Point1, Point2, Support] As Reference) As
HybridShapeLinePtPt

This method creates a line between two points on a support surface.

Func AddNewLinePtPtOnSupportExtended ([Point1, Point2, Support] As Reference,


[Length1, Length2] As Double) As HybridShapeLinePtPt

This method creates a line between two points on a support surface. The line is extended from
the start point at “Length1” and from the end point at “Length2.”

Func AddNewLineTangency ([Curve, Point] As Reference, [Distance1, Distance2] As


Double, [Inversion] As Boolean) As HybridShapeLineTangency

This method creates a line tangent to a curve through a point. The distances describe the
distance between the start and end points along the direction of the line to the point. The
“Inversion” parameter is the orientation of the line (Inversion is “True”).
Func AddNewLineTangencyOnSupport ([Curve, Point, Support] As Reference, [Distance1,
Distance2] As Double, [Inversion] As Boolean) As HybridShapeLineTangency

This method creates a line on a support that is tangent to a curve through a point. The distances
describe the distance between the start and end points along the direction of the line to the point.
The “Inversion” parameter is the orientation of the line (Inversion is “True”).

Func AddNewLoft As HybridShapeLoft

This method creates a lofted surface. The section definitions are made with
the AddSectionToLoft method of the HybridShapeLoft class (Section 8.102).

Func AddNewNear ([MultiElement, Reference] As Reference) As HybridShapeNear

This method creates a near derivative from multiple elements. It selects the element that is
closest to the reference geometry.

Func AddNewOffset ([Surface] As Reference, [Distance] As Double, [Orientation] As


Boolean, [Accuracy] As Double) As HybridShapeOffset
This method creates an offset surface from the “Surface.” The “Orientation” parameter
determines the side that the offset is created on. If the parameter is “True,” the result is in the
direction of the orientation of the surface. The “Accuracy” parameter defines the computational
accuracy of the surface.

Func AddNewPlane1Curve ([PlanarCurve] As Reference) As HybridShapePlane1Curve

This method creates a new plane passing through one planar curve.

Func AddNewPlane1Line1Pt ([Line, Point] As Reference) As HybridShapePlane1Line1Pt

This method creates a new plane passing through one line and one point.

Func AddNewPlane2Lines ([Line1, Line2] As Reference) As HybridShapePlane2Lines

This method creates a new plane passing through two lines.


Func AddNewPlane3Points ([Point1, Point2, Point3] As Reference) As
HybridShapePlane3Points

This method creates a new plane passing through three points.

Func AddNewPlaneAngle ([Plane, Axis] As Reference, [Angle] As Double, [Inversion] As


Boolean) As HybridShapePlaneAngle

This method creates a new angle plane. The axis must be in the reference plane. The rotation
follows the right-hand rule of the axis. The rotation can be reversed by the “Inversion” parameter
(value: “True”). The angle is measured between the normal vectors of the created plane and the
reference plane.

Func AddNewPlaneDatum ([Element] As Reference) As HybridShapePlaneExplicit

This method creates a plane as explicit geometry without history. The output plane will be
retained and not deleted. An output element can be deleted with
the DeleteObjectForDatum method.

Func AddNewPlaneEquation ([A, B, C, D] As Double) As HybridShapePlaneEquation


This method creates a plane in accordance with the equation “A * B * X + Y + Z = C * D.”

Func AddNewPlaneMean ([PointsList] As CATSafeArrayVariant, [Number] As Long) As


HybridShapePlaneMean

This method creates a new plane through mean points. The point cloud is described as an array
of point objects. The “Number” parameter is the number of points in the “PointsList.”

Func AddNewPlaneNormal ([Curve, Point] As Reference) As HybridShapePlaneNormal

This method creates a plane normal to a curve through a point of the curve (see Section 6.4.2).

Func AddNewPlaneOffset ([Plane] As Reference, [Distance] As Double, [Inversion] As


Boolean) As HybridShapePlaneOffset

This method creates a plane parallel to a reference plane. The plane is in the direction of the
normal vector of the reference plane. The direction can be reversed by the “Inversion”
parameter (value: “True”).

Func AddNewPlaneOffsetPt ([Plane, Point] As Reference) As HybridShapePlaneOffsetPt

This method creates a plane parallel to a reference plane through a point (see Example 6.6).

Func AddNewPlaneTangent ([Surface, Point] As Reference) As


HybridShapePlaneTangent

This method creates a plane that is tangent to a surface through a point on the surface.

Func AddNewPointBetween ([Point1, Point2] As Reference, [Ratio] As Double,


[Orientation] As Long) As HybridShapePointBetween

This method creates a point that lies on an imaginary straight line passing through the points
“Point1” and “Point2” (see Example 6.2). The “Ratio” parameter determines the position of the
points on the straight line as a ratio of lengths “Pt1-Pt” to “Pt1-Pt2.” The value must be greater
than “1” and smaller than “0.” The “Orientation” parameter determines the point that the ratio is
measured from (Point 1: “1,” Point 2: “−1”).

Func AddNewPointCenter ([CircleOrEllipse] As Reference) As HybridShapePointCenter


This method creates the center point of a circle, circular arc, ellipse, or elliptical arc
(see Example 6.3).

Func AddNewPointCoord ([X, Y, Z] As Double) As HybridShapePointCoord

This method creates a coordinate point (see Example 6.1).

Func AddNewPointCoordWithReference ([X, Y, Z] As Double, [ReferencePoint] As


Reference) As HybridShapePointCoord

This method creates a coordinate point. The coordinates of the point are measured relative to a
reference point.

Func AddNewPointDatum ([Element] As Reference) As HybridShapePointExplicit

This method creates a point as explicit geometry without history. The starting point will be
preserved and not deleted. An output element can be deleted with
the DeleteObjectForDatum method.

Func AddNewPointOnCurveFromDistance ([Curve] As Reference, [Distance] As Double,


[Inversion] As Boolean) As HybridShapePointOnCurve
This method creates a point on a curve that has a defined distance from the start point or end
point of the curve. The “Inversion” parameter determines whether the distance is measured in
the orientation of the curve or the opposite orientation (from the starting point: “False”; from the
end point: “True”).

Func AddNewPointOnCurveFromPercent ([Curve] As Reference, [Ratio] As Double,


[Inversion] As Boolean) As HybridShapePointOnCurve

This method creates a point on a curve. The position of the point is defined as the ratio of the
“Start Point” or “End Point” lengths to “Start Point-End Point.” The value range of the “Ratio”
parameter is “0” to “1.” The “Inversion” parameter determines whether the distance is measured
in the orientation of the curve or the opposite orientation (from the starting point: “False”; from
the end point: “True”).

Func AddNewPointOnCurveWithReferenceFromDistance ([Curve, Point] As Reference,


[Distance] As Double, [Inversion] As Boolean) As HybridShapePointOnCurve

This method creates a new point on a curve with a reference point and from a distance. The
“Inversion” parameter determines whether the measurement is in the orientation of the curve or
against it (in curve direction: “False”; against the curve direction: “True”).

Func AddNewPointOnCurveWithReferenceFromPercent ([Curve, Point] As Reference,


[Ratio] As Double, [Inversion] As Boolean) As HybridShapePointOnCurve
This method creates a new point on a curve with a reference point and from a distance. The
distance is expressed as a ratio of the curve length. The “Inversion” parameter determines
whether the measurement is in the orientation of the curve or against it (in curve direction:
“False”; against the curve direction: “True”).

Func AddNewPointOnPlane ([Plane] As Reference, [X, Y] As Double) As


HybridShapePointOnPlane

This method creates a point on a plane. The position of the point is defined by the x- and y-
distance from the plane origin.

Func AddNewPointOnPlaneWithReference ([Plane, Point] As Reference, [X, Y] As


Double) As HybridShapePointOnPlane

This method creates a point on a plane. The position of the point is defined by the x- and y-
distance from the plane origin.

Func AddNewPointOnSurface ([Surface] As Reference, [Direction] As


HybridShapeDirection, [Distance] As Double) As HybridShapePointOnSurface
This method creates a point on a surface. The position of the point is defined by a direction and
the geodesic distance from the origin surface.

Func AddNewPointOnSurfaceWithReference ([Surface, ReferencePoint] As Reference,


[Direction] As HybridShapeDirection, [Distance] As Double) As
HybridShapePointOnSurface

This method creates a point on a surface. The position of the point is defined by a direction, a
reference point on the surface, and the geodesic distance from the reference point.

Func AddNewPointTangent ([Curve] As Reference, [Direction] As HybridShapeDirection)


As HybridShapePointTangent

This method creates a tangent point on a curve. The orientation of the tangent is determined by
the parameter “Direction.”

Func AddNewPolyline As HybridShapePolyline


This method creates a polyline (see Section 6.5). The polyline is not completely defined during
creation. The points and radii are subsequently defined with
the InsertElement and SetRadius methods of the HybridShapePolyline class (Section 8.125).

Func AddNewPositionTranfo ([Mode] As Long) As HybridShapePositionTransfo


This method creates the transformation of a profile. The “Mode” parameter is “0” if a profile is in
its original position and “1” if a transformation is performed. A transformation description can be
specified with the methods of the HybridShapePositionTransfo class (Section 8.126). A
transformation description is not assigned with the AppendHybridShape method of a
geometric set. Step 3 in Section 6.1 is not applicable!

Func AddNewProject ([Element, Support] As Reference) As HybridShapeProject

This method creates the projection of an element on a support.

Func AddNewReflectLine ([Surface] As Reference, [Direction] As HybridShapeDirection,


[Angle] As Double, [OrientationSurface, OrientationDirection] As Long) As
HybridShapeReflectLine
This method creates a reflection line on a surface at an angle to a direction. The angle is
measured between the surface normal and the direction. The “Orientation” parameter can take
the values of “1” and “–1.” “–1” inverts the standard orientation.

Func AddNewReflectLineWithType ([Surface] As Reference, [Direction] As


HybridShapeDirection, [Angle] As Double, [OrientationSurface, OrientationDirection,
Type] As Long) As HybridShapeReflectLine

This method creates a reflection line on a surface at an angle to a direction. The “Orientation”
parameter can take the values of “1” and “–1.” “–1” inverts the standard orientation. The “Type”
parameter determines whether the angle is located between the surface normal and the
direction (value “0”) or the surface tangents and the direction (value “1”).

Func AddNewRevol ([Profile] As Reference, [Angle1, Angle2] As Double, [Axis] As


Reference) As HybridShapeRevol

This method creates a revolution surface of a planar profile, rotated about an axis lying on the
profile plane.

Func AddNewRotate ([Element, Axis] As Reference, [Angle] As Double) As


HybridShapeRotate
This method creates a rotation of an element about an axis. An axis can be an axis or a line
item.

Func AddNewSection As HybridShapeSection


This method creates a new section. The section plane is defined by the SectionPlane property.

Func AddNewSphere ([Center, Axis] As Reference, [Radius, ParallelAngle1,


ParallelAngle2, MeridianAngle1, MeridianAngle2] As Double) As HybridShapeSphere

This method creates a sphere or a spherical section around a center. The angular parameters
define the spherical section.

Func AddNewSpine As HybridShapeSpine

This method creates a spine. The position of the spine is defined with the methods of
the HybridShapeSpine class (Section 8.135).

Func AddNewSpiral ([Type] As Long, [Support, Center] As Reference, [Direction] As


HybridShapeDirection, [StartRadius] As Double, [Clockwise] As Boolean) As
HybridShapeSpiral
This method creates a spiral. The “Type” parameter defines the type of spiral (“0”: angle and
radius, “1”: angle and pitch, “2”: radius and pitch). “Support” defines a support surface, and
“Center” defines a center. “Direction” determines the direction that the spiral begins in. The
direction must be on the support surface. “StartRadius” defines the initial radius. “Clockwise”
determines whether the spiral is oriented clockwise or counterclockwise (clockwise: “True”). The
spiral is not fully defined after creation, and it must have methods added from
the HybridShapeSpiral class (Section 8.136).

Func AddNewSpline As HybridShapeSpline

This method creates a spline. The spline has no control points after creation. The points must
be added by using the AddPoint method of the HybridShapeSpline class (Section 8.137).

Func AddNewSurfaceDatum ([Element] As Reference) As HybridShapeSurfaceExplicit

This method creates a surface as explicit geometry without history. The output surface will be
retained and not deleted. An output element can be deleted by using
the DeleteObjectForDatum method.

Func AddNewSweepCircle ([Guide] As Reference) As HybridShapeSweepCircle


This method creates a swept surface with a circular profile. The geometry of the circular profile
is specified with the methods of the HybridShapeSweepCircle class (Section 8.141). The
reference of the swept surface type depends on the first guide curve or the center curve of the
swept surface.

Func AddNewSweepConic (Guide As Reference) As HybridShapeSweepConic

This method creates a swept surface of a conic section profile along a guide curve. Since no
definition of a guide curve is sufficient, additional parameters can be defined with the methods
of the HybridShapeSweepConic class (Section 8.142).

Func AddNewSweepExplicit ([Profile, Guide] As Reference) As


HybridShapeSweepExplicit

This method creates a swept surface with a user profile that is pulled along the guide curve.

Func AddNewSweepLine ([Guide] As Reference) As HybridShapeSweepLine


This method creates a swept surface with a line profile that is pulled along the guide curve. The
geometry of the line profile is specified with the methods of the HybridShapeSweepLine class
(Section 8.144).

Func AddNewSymmetry ([Element, Reference] As Reference) As HybridShapeSymmetry

This method creates a symmetry of an element based on a reference element.

Func AddNewThickness ([Surface] As Reference, [TopOffset, BottomOffset] As Double,


[Orientation] As Long) As HybridShapeThickness
This method creates a thickness from the “Surface.” “TopOffset” and “BottomOffset” determine
the size parameters. “Orientation” determines the direction in which the thickness is measured.
If the value is “1,” the thickness is in the direction of the surface orientation. If the value is “–1,”
the orientation is inverted.

Func AddNewTranslate ([Element] As Reference, [Direction] As HybridShapeDirection,


[Length] As Double) As HybridShapeTranslate

This method creates a translation of an element in a predetermined direction by a defined length.


“Length” is specified depending on the unit system of CATIA.
Sub ChangeFeatureName [Element] As AnyObject, [Name] As CATBSTR
This method sets the name of the geometrical “Element.” “Name” is the display name that
appears in the tree structure.

Sub DeleteObjectForDatum [Element] As Reference


This method deletes an output element, “Element,” that was produced from explicit geometry
without history. Explicit geometry can be created with the AddNewCircleDatum,
AddNewPointDatum, AddNewCurveDatum,
AddNewPlaneDatum, or AddNewSurfaceDatum methods.

Sub DuplicateGSMSpec [Element] As AnyObject


This method duplicates an element in a geometrical set and adds it to the geometrical set.

Func GetGeometricalFeatureType ([Input] As Reference) As Short


This method returns the wireframe or surface element type. The result is “1” for a point, “2” for a
curve, “3” for a line, “4” for a circle, “5” for a surface, “6” for a plane, and “7” for a volume.

Func GSMGetObjectFromReference ([ReferenceElement] As Reference) As AnyObject


This method returns the geometry object that is referenced by a reference.

Sub GSMVisibility [Element] As AnyObject, [Show] As Boolean

This method sets the visibility of a feature in a geometrical set (“Show” or “No Show”). The
default value, “True,” equals “Show.”
8.86 HybridShapeFill

This class represents a fill (see Section 6.6). An object of the class is created with
the AddNewFill method of the HybridShapeFactory class (Section 8.85).
Object Path: AnyObject.HybridShape.HybridShapeFill
Sub AddBound (Curve As Reference)
This method adds a curve to the boundary definition of the fill (“Boundary” list). The boundary is
appended to the list of boundaries.

Sub AddSupportAtBound (Curve, Support As Reference)


This method adds a curve and a support to the boundary definition of the fill (“Boundary” list).
The boundary is appended to the list of boundaries.

Sub AppendConstraint (Boundary As Reference)


This method adds a constraint to define the fill.

Constraint As Reference
This property returns or sets the passing point for the fill.

Continuity As Long
This property returns or sets the continuity between the support and fill (“Continuity” field). The
value range is “0” for point continuity, “1” for tangent continuity, and “2” for curvature continuity.
Func GetBoundaryContinuity (Index As Long) As Long
This method returns the continuity mode for a boundary at a specified “Index” position in the fill.
The first element in the “Index” is “1.” The value range is similar to the Continuity property’s.

Func GetBoundAtPosition (Index As Long) As Reference


This method retrieves the boundary at a specified “Index” position in the fill. The first element in
the “Index” is “1.”

Func GetBoundPosition (Curve As Reference) As Long


This method retrieves the position of a boundary used by the fill. It is the inverse function of
the GetBoundAtPosition method.

Func GetBoundSize As Long


This method returns the number of boundaries in the fill (“Boundary” list).

Func GetConstraintAtPosition (Index As Long) As Reference


This method retrieves the constraint at a specified “Index” position in the fill. The first element in
the “Index” is “1.”

Func GetConstraintsSize As Long


This method returns the number of constraints in the fill.

Func GetSupportAtPosition (Index As Long) As Reference


This method retrieves the support at a specified “Index” position in the fill. The first element in
the “Index” is “1.”

Sub InsertBoundAfterPosition (Curve As Reference, Index As Long)


This method inserts the boundary after a specified “Index” position in the fill (“Boundary” list).
The boundary is inserted into the list at position “Index + 1.”

MaximumDeviationValue As Double
This property sets or gets the maximum deviation allowed for a smoothing operation in the fill.

PlaneOnlyMode As Boolean
This property returns or sets the state of the “Planar Boundary Only” check box (see figure
in Section 8.86). If the value is “True,” the option is enabled.

Sub RemoveAllBound
This method removes all boundaries of the fill (“Boundary” list).

Sub RemoveBoundAtPosition (Index As Long)


This method removes a boundary at a specified “Index” position of the fill (“Boundary” list).

Sub RemoveConstraint (Index As Long)


This method removes a constraint at a specified “Index” position of the fill.

Sub RemoveSupportAtPosition (Index As Long)


This method removes a support at a specified “Index” position of the fill.

Sub ReplaceBoundAtPosition (NewCurve As Reference, Index As Long)


This method replaces a boundary at a specified “Index” position of the fill (“Boundary” list).

Sub ReplaceConstraint (Index As Long, NeueBedingung As Reference)


This method replaces a constraint at a specified “Index” position of the fill.

Sub ReplaceSupportAtPosition (NewSupport As Reference, Index As Long)


This method replaces a support at a specified “Index” position of the fill (“Boundary” list).

Sub SetBoundaryContinuity (Continuity As Long, Index As Long)


This method sets the continuity mode for a boundary at a specified “Index” position in the fill.
“Continuity” has a value range similar to the Continuity property’s.

TolerantMode As Boolean
This property returns or sets the tolerant mode option. If the property is “True,” the tolerance
mode is activated and the deviation parameter is used.

8.87 HybridShapeFilletBiTangent

This class represents a BiTanget fillet. An object of the class is created with
the AddNewFilletBiTangent method of the HybridShapeFactory class (Section 8.85).
Object Path: AnyObject.HybridShape.HybridShapeFilletBiTangent
Sub AppendNewFaceToKeep [Face] As Reference
This method adds a face to the list of faces to keep (“Faces to Keep” field).

ConicalSectionParameter As Double
This property returns or sets a conical section parameter.

FirstElem As Reference
This property returns or sets the first support surface feature (“Support 1” field).

FirstLawRelimiter As Reference
This property gets or sets the first law relimiter for the fillet with law management (“Law
Relimiter 1” field) provided that a spine is defined. The point must sit on the spine.

FirstOrientation As Long
This property returns or sets the first orientation used to specify the fillet center position. If the
value is “1,” the center is the same as the normal of the first surface support. If the value is “−1,”
the center is on the other side.

Func GetFaceToKeep ([Index] As Long) As Reference


This method gets the face to keep for the fillet operation. The first element in the “Index” is “1.”

HoldCuve As Reference
This property returns or sets the hold curve of the fillet (“Hold Curve” field).

IntegratedLaw As HybridShapeIntegratedLaw
This property gets or sets the integrated law to manage the variable shape fillet with a law.

Sub InvertFirstOrientation
This method inverts the first orientation used to specify the fillet center position.

Sub InvertSecondOrientation
This method inverts the second orientation used to specify the fillet center position.

Radius As Length (Read Only)


This property returns the fillet radius. The value can be edited with the Value method.

RadiusType As Long
This property returns or sets the radius type. If the property is “0,” the radius type is “Radius.” If
the property is “1,” the radius type is “Distance.”

RadiusValue As Double
This property returns or sets the fillet radius value. The value can be edited with
the Value method.

Sub RemoveAllFacesToKeep
This method removes all the faces to keep.

Sub RemoveFaceToKeep [Face] As Reference


This method removes a face to keep.

RibbonRelimitationMode As Long
This property returns or sets the fillet ribbon relimitation mode (“Extremities” field). The property
has the following values: “0” (smooth), “1” (straight), “2” (maximum), and “3” (minimum).

SecondElem As Reference
This property returns or sets the second support surface feature (“Support 2” field; refer
to FirstElem).
SecondLawRelimiter As Reference
This property gets or sets the second law relimiter for the fillet with law management (“Law
Relimiter 2” field; refer to FirstLawRelimiter).
SecondOrientation As Long
This property returns or sets the second orientation used to specify the fillet center position
(refer to FirstOrientation).
SectionType As Long
This property returns or sets the fillet section type, either radius or conic. If the value is “0,” the
conic parameter is disabled. If the value is “1,” the conic parameter is enabled.
Sub RemoveFaceToKeep [Face] As Reference
This property returns or sets the spine feature (“Spine” field).

SupportsTrimMode As Long
This property returns or sets whether the supporting surfaces are to be trimmed with the fillet
(“Trim Support” options). The property has the following values: “0” (no trim), “1” (both surfaces),
“2” (only surface 1), and “3” (only surface 2).

8.88 HybridShapeFilletTriTangent

This class represents a TriTanget fillet. An object of the class is created with
the AddNewFilletTriTangent method of the HybridShapeFactory class (Section 8.85).
Object Path: AnyObject.HybridShape.HybridShapeFilletTriTangent

FirstElem As Reference
This property returns or sets the first support surface feature (“Support 1” field).

FirstOrientation As Long
This property returns or sets the first orientation used to specify the fillet center position. If the
value is “1,” the center is the same as the normal of the first surface support. If the value is “–1,”
the center is on the other side.

Sub InvertFirstOrientation
This method inverts the orientation of the first support element.
Sub InvertRemoveOrientation
Refer to InvertFirstOrientation.
Sub InvertFirstOrientation
This method inverts the orientation of the first support element.

RemoveElem As Reference
This property returns or sets the support surface to remove (“Support to Remove” field).

RemoveOrientation As Long
This property returns or sets the third orientation used to specify the fillet center position (refer
to InvertFirstOrientation).
RibbonRelimitationMode As Long
This property returns or sets the fillet ribbon relimitation mode (“Extremities” field).

SecondElem As Reference
This property returns or sets the second support surface feature (“Support 2” field; refer
to FirstElem).
SecondOrientation As Long
This property returns or sets the second orientation used to specify the fillet center position
(refer to FirstOrientation).
SupportsTrimMode As Long
This property returns or sets whether the supporting surfaces are to be trimmed with the fillet
(“Trim Support” options). The property has the following values: “0” (no trim), “1” (both surfaces),
“2” (only surface 1), and “3” (only surface 2).

8.89 HybridShapeHelix
This class represents a helix (see Section 6.5). An object of the class is created with
the AddNewHelix method of the HybridShapeFactory class (Section 8.85).
Object Path: AnyObject.HybridShape.HybridShapeHelix
Axis As Reference
This property returns or sets the axis of the helix (“Axis” field).

ClockwiseRevolution As Boolean
This property returns or sets whether the helix is computed as clockwise or counterclockwise
about the axis (“Orientation” field). Clockwise equals “True.”

Height As Length (Read Only)


This property returns or sets the height of the helix (“Height” field). The value can be edited with
the Value method.

InvertAxis As Boolean
This property returns or sets whether the helix is computed with or opposite to the axis direction.
“False” is in the direction of the axis.

Pitch As Length (Read Only)


This property returns the first pitch of the helix (“Pitch” and “Start Value” fields). The pitch value
can be changed with the Value method.

Pitch2 As Length (Read Only)


This property returns the second pitch of the helix (“End Value” field). This feature is only
available if the law type (PitchLawType) of the helix is defined as an S-shaped curve. The pitch
value can be changed with the Value method.

PitchLawType As Long
This property returns or sets the pitch law type of the helix. If the value of the property is “1,” the
law is constant. If it is “3,” the law is an S-shaped curve.

Profile As Reference
This property returns or sets the profile that the helix aligns on (“Profile” field).

RevolNumber As RealParam (Read Only)


This property returns or sets the parameters of the “Revolutions” field. The value can be edited
with the Value method.
Sub SetHeight [Height] As Double
This method sets the height of the helix (“Height” field).

Sub SetPitch [Pitch] As Double


This method sets the first pitch of the helix (“Pitch” and “Start Value” fields).

Sub SetPitch2 [Pitch] As Double


This method sets the second pitch of the helix (“End Value” field). This feature is only available
if the law type (PitchLawType) of the helix is defined as an S-shaped curve.

Sub SetRevolutionNumber [Number] As Double


This method sets the number of revolutions of the helix (“Revolutions” field).

Sub SetStartingAngle [Angle] As Double


This method sets the start angle value of the helix (“Starting Angle” field).

Sub SetTaperAngle [Angle] As Double


This method sets the start angle value of the helix (“Taper Angle” field).

StartingAngle As Angle (Read Only)


This property returns or sets the start angle by which the start point of the helix is rotated about
the axis (“Starting Angle” field). The value can be edited with the Value method.

StartingPoint As Reference
This property returns or sets the start point of the helix (“Start Point” field). The start point can
be rotated about the axis with the StartingAngle property.

TaperAngle As Angle (Read Only)


This property returns the taper angle of the helix (“Taper Angle” field). The value can be edited
with the Value method.

TaperOutward As Boolean
This property returns whether the taper extends outward or inward (“Way” field). “True” is an
extension of the taper with increasing height.
8.90 HybridShapeIntegratedLaw

This class represents a law that is integrated within a geometric object as a property. An object
of the class is created with the AddNewIntegratedLaw method of
the HybridShapeFactory class (Section 8.85).
Object Path: AnyObject.HybridShape.HyridShapeIntegratedLaw
AdvancedLaw As Reference
This property gets or sets the external law provided the PitchLawType is “4” (Advanced).

Sub AppendNewPointAndParam [Point] As Reference, [Radius] As Long


This method adds a new item to the list of items provided the PitchLawType is “5” (Implicit).
EndParam As Length (Read Only)
This property gets the end value (“End Value” field) provided the PitchLawType is “2” (Linear)
or “3” (S-type).

Sub GetPointAndParam [Index] As Long, [Point] As Reference, [Radius] As Long


This method gets the point on the spine and associated parameter at a given position provided
the PitchLawType is “5” (Implicit).

Func GetSize As Long


This method gets the size of the list in the law—for example, the number of points in the list of
the law.

ImplicitLawInterpolationMode As Long
This property gets or sets the interpolation mode for the implicit law provided
the PitchLawType is “5” (Implicit). The value range is “0” (No Definition), “1” (Linear), and “2”
(Cubic).

InvertMappingLaw As Boolean
This property gets or sets the state of the “Inverse Law” option (see figure in Section 8.90).

PitchLawType As Long
This property gets or sets the pitch law type (“Law Type” field). The value range is “0” (None), “1”
(Constant), “2” (Linear), “3” (S-type), “4” (Advanced), and “5” (Implicit).

Sub RemoveAllPointsAndParams
This method removes all the points and associated parameters.

Sub RemovePointAndParam [Point] As Reference


This method removes a point and its parameter.

Sub SetEndParam [Value] As Long


This method sets the end value (“End Value” field) provided the PitchLawType is “2” (Linear) or
“3” (S-type).

Sub SetStartParam [Value] As Long


This method sets the start value (“Start Value” field) provided the PitchLawType is “1”
(Constant), “2” (Linear), or “3” (S-type).
Spine As Reference
This property gets or sets the spine provided the PitchLawType is “5” (Implicit).

Sub RemoveAllPointsAndParams
This property gets the start value (“Start Value” field) provided the PitchLawType is “1”
(Constant), “2” (Linear), or “3” (S-type).

8.91 HybridShapeIntersection

This class represents an intersection (see Section 6.8). An object of the class is created with
the AddNewIntersection method of the HybridShapeFactory class (Section 8.85).
Object Path: AnyObject.HybridShape.HybridShapeIntersection
Element1 As Reference
This property returns or sets the first element to intersect (“First Element” field).

Element2 As Reference
This property returns or sets the second element to intersect (refer to Element1).
ExtendMode As Long
This property returns or sets the state of the two “Extend Linear Supports for Intersection”
options. The value range is “0” (both are unchecked), “1” (first option is checked), “2” (second
option is checked), and “3” (both options are checked).

ExtrapolateMode As Boolean
This property returns or sets the state of the “Extrapolate Intersection on First Element” option.

IntersectMode As Boolean
This property returns or sets the state of the two “Extend Linear Supports for Intersection”
options. If the value is “True,” both options are set.

PointType As Long
This property returns or sets the state of the “Curve” and “Points” options in the “Curves
Intersection with Common Area” field. The value range is “0” (Curve) and “1” (Points).

SolidMode As Boolean
This property returns or sets the state of the “Contour” and “Surface” options in the “Surface-
Part Intersection” field. The value range is “0” (Contour) and “1” (Surface).

8.92 HybridShapeInverse

This class represents an inverse (see Section 6.8). An object of the class is created with
the AddNewInverse method of the HybridShapeFactory class (Section 8.85).
Object Path: AnyObject.HybridShape.HybridShapeInverse

Element As Reference
This property returns or sets the element to be inverted (“To Invert” field).

Orientation As Long
This property gets or sets the element’s orientation. If the value is “1,” the orientation of the
inversion is equal to the original element’s. If the value is “–1,” the orientation of the element is
inverted. If the value is “2,” the orientation of the element cannot be inverted.

8.93 HybridShapeLawDistProj

This class represents a law. An object of this class is created with


the AddNewLawDistProj method of the HybridShapeFactory class (Section 8.85).
Object Path: AnyObject.HybridShape.HybridShapeLaw-DistProj

AppliedUnitSymbol As String
This property returns or sets the applied unit for the heterogeneous law (“Applied Unit” field).
The property is only available if the “Heterogeneous Law” option is set.
Definition As Reference
This property returns or sets the definition curve of the law (“Definition” field). The distance
perpendicular from the reference curve to the definition curve is used for defining the law.

Sub GetAppliedUnitSymbol [Symbol] As String


This method returns the applied unit symbol (“Applied Unit” field).

Sub GetMeasureUnitSymbol [Symbol] As String


This method returns the measure unit symbol (“Measure Unit” field).

Sub GetPlaneNormal [PlaneParameter] As CATSafeArrayVariant


This method retrieves the support plane normal.

Func IsHeterogeneousLaw As Boolean


This method reads or sets the state of the “Heterogeneous Law” option. If the option is enabled,
the value is “True.”

MeasureUnitSymbol As String
This property returns or sets the measure unit symbol for the heterogeneous law (“Measure Unit”
field). The property is only available if the “Heterogeneous Law” option is set.
ParameterOnDefinition As Boolean
This property reads or sets the state of the “X Parameter on Definition” option. If the option is
enabled, the value is “True.”

PositiveDirectionOrientation As Long
This property returns or sets the starting orientation from the reference curve, in which the
distances are measured for defining the curve with positive values. The value range is “1” and
“–1.” If the value is “1,” the orientation is in the direction of the cross product orientations of the
normal plane and the reference curve.

Sub PutPlaneNormal [Plane Parameters] As CATSafeArrayVariant


This method sets the parameters of the normal plane.

Reference As Reference
This property returns or sets the reference curve of the law (“Reference” field). The distance
perpendicular from the reference curve to the definition curve is used for defining the law.

Scaling As Double
This property returns or sets the scaling ratio of the law (“Scaling” field). The distance
perpendicular from the reference curve to the definition curve is used for defining the law.

8.94 HybridShapeLineAngle

This class represents a line normal or angular to a curve on a support surface passing through a
point (see Section 6.3). An object of this class is created with the AddNewLineAngle method of
the HybridShapeFactory class (Section 8.85).
Object Path: AnyObject.HybridShape.Line.HybridShapeLineAngle

Angle As Angle (Read Only)


This property returns or sets the angle to the reference curve of the line (“Angle” field). The
value can be edited with the Value method.

BeginOffset As Length (Read Only)


This property returns or sets the distance from the start point of the line to the reference point
(“Start” field). The value can be edited with the Value method.

Curve As Reference
This property returns or sets the reference curve of the line (“Curve” field).

EndOffset As Length (Read Only)


This property returns or sets the distance from the end point of the line to the reference point
(“End” field). The value can be edited with the Value method.
Geodesic As Boolean
This property returns or sets whether the line lies on the support (geometry on support: “True”).

Func GetLengthType As Long


This method gets the length type (“Length Type” field). The value range is similar to
the SetLengthType method’s.

Func GetSymmetricalExtension As Boolean


This method gets whether the “Mirrored Extent” of the line is active (refer
to SetSymmetricalExtension).

Orientation As Long
This property returns or sets the orientation of the line (“Reverse Direction” button). A value of “1”
means the original orientation is maintained. A value of “–1” means the line is inverted.

Point As Reference
This property returns or sets the reference point of the line (“Point” field).

Sub SetLengthType [Type] As Long


This method sets the length type of the line (“Length Type” options: “Length,” “Infinite,” “Infinite
Start Point,” and “Infinite End Point”). The value range is “0” (Length), “1” (Infinite), “2” (Infinite
Start Point), and “3” (Infinite End Point).

Sub SetSymmetricalExtension [Value] As Boolean


This method sets the value of the “Mirrored Extent” option. If the value is “True,” the option is set.

Surface As Reference
This property returns or sets the support of the line (“Support” field).

8.95 HybridShapeLineBisecting

This class represents a line bisecting two lines (see Section 6.3). An object of this class is
created with the AddNewLineBisecting, AddNewLineBisectingOnSupport,
AddNewLineBisectingOnSupportWithPoint, or AddNewLineBisectingWithPoint methods
of the HybridShapeFactory class (Section 8.85).
Object Path: AnyObject.HybridShape.Line. HybridShapeLineBisecting

BeginOffset As Length (Read Only)


This property returns or sets the distance from the start point of the line to the reference point
(“Start” field). The value can be edited with the Value method.

Elem1 As Reference
This property returns or sets the first line used to create the bisecting line (“Line 1” field).

Elem2 As Reference
This property returns or sets the second line (refer to Elem1).
EndOffset As Length (Read Only)
This property returns or sets the distance from the end point of the line to the reference point
(“End” field). The value can be edited with the Value method.

Func GetLengthType As Long


This method gets the length type (“Length Type” field). The value range is similar to
the SetLengthType method’s.

Func GetSymmetricalExtension As Boolean


This method gets whether the “Mirrored Extent” of the line is active (refer
to SetSymmetricalExtension).

Orientation As Long
This property returns or sets the orientation of the line (“Reverse Direction” button). If the value
is “1,” the original orientation is maintained. If the value is “–1,” the line is inverted. The original
orientation is between the two direction vectors of Lines 1 and 2.

RefPoint As Reference
This property returns or sets the reference point of the line (“Point” field). If no point is specified,
the class uses the intersection of Lines 1 and 2.

Sub SetLengthType [Type] As Long


This method sets the length type of the line (“Length Type” options: “Length,” “Infinite,” “Infinite
Start Point,” and “Infinite End Point”). The value range is “0” (Length), “1” (Infinite), “2” (Infinite
Start Point), and “3” (Infinite End Point).

Sub SetSymmetricalExtension [Value] As Boolean


This method sets the value of the “Mirrored Extent” option. If the value is “True,” the option is set.

SolutionType As Boolean
This property returns or sets the solution type of the line (“Next Solution” button).

Support As Reference
This property returns or sets the support of the line (“Support” field).
8.96 HybridShapeLineBiTangent

This class represents a line tangent to two curves (see Section 6.3). An object of the class is
created with the AddNewLineBiTangent method of the HybridShapeFactory class (Section
8.85).
Object Path: AnyObject.HybridShape.Line.HybridShapeLineBiTangent
Curve1 As Reference
This property returns or sets the first tangency curve (“Curve” field).

Element2 As Reference
This property returns or sets the second tangency element (“Element 2” field).
Sub GetChoiceNo [Index1, Index2, Index3, Index4, Index5] As Long
This method returns a solution among all possibilities by selecting the “Next Solution” button.
The choices correspond to those of the SetChoiceNo method.

Func GetLengthType As Long


This method gets the length type (“Length Type” field). The value range is similar to
the SetLengthType method’s.

Sub SetChoiceNo [Index1, Index2, Index3, Index4, Index5] As Long


This method selects a solution in the case of an ambiguous solution. “Index1” is the number of
the determined solution (1 to n). “Index2” filters the results that have the same orientation as the
first curve (same orientation: “1,” opposite orientation: “–1,” no orientation: “0”). “Index3” filters
the results that are tangent to a specific side of the first curve in the direction of the cross
product of the vectors of the support surface and the first curve (same direction of the vector: “1,”
opposite direction of the vector: “–1,” no orientation: “0”). “Index4” and “Index5” filter with
respect to the second control curve. Refer to the “Index2” and “Index3.”

Sub SetLengthType [Type] As Long


This method sets the length type of the line (“Length Type” options: “Length,” “Infinite,” “Infinite
Start Point,” and “Infinite End Point”). The value range is “0” (Length), “1” (Infinite), “2” (Infinite
Start Point), and “3” (Infinite End Point).

Support As Reference
This property returns or sets the support of the line (“Support” field).

8.97 HybridShapeLineExplicit

This class represents an explict line without history (see Section 6.3). An object of the class is
created with the AddNewLineDatum method of the HybridShapeFactory class (Section 8.85).
This class does not have any properties or methods.
Object Path: AnyObject.HybridShape.HybridShapeLineExplicit
8.98 HybridShapeLineNormal

This class represents a line normal to a surface (see Section 6.3). An object of this class is
created with the AddNewLineNormal method of the HybridShapeFactory class (Section 8.85).
Object Path: AnyObject.HybridShape.Line.HybridShape-LineNormal

BeginOffset As Length (Read Only)


This property returns or sets the distance from the start point of the line to the reference point
(“Start” field). The value can be edited with the Value method.

EndOffset As Length (Read Only)


This property returns or sets the distance from the end point of the line to the reference point
(“End” field). The value can be edited with the Value method.

Func GetLengthType As Long


This method gets the length type (“Length Type” field). The value range is similar to the
SetLengthType method’s.

Func GetSymmetricalExtension As Boolean


This method gets whether the “Mirrored Extent” of the line is active (refer
to SetSymmetricalExtension).
Orientation As Long
This property returns or sets the orientation of the line (“Reverse Direction” button). If the value
is “1,” the original orientation is maintained. If the value is “–1,” the line is inverted.

Point As Reference
This property returns or sets the reference point of the line (“Point” field).

Sub SetLengthType [Type] As Long


This method sets the length type of the line (“Length Type” options: “Length,” “Infinite,” “Infinite
Start Point,” and “Infinite End Point”). The value range is “0” (Length), “1” (Infinite), “2” (Infinite
Start Point), and “3” (Infinite End Point).

Sub SetSymmetricalExtension [Value] As Boolean


This method sets the value of the “Mirrored Extent” option. If the value is “True,” the option is set.

Surface As Reference
This property returns or sets the surface of the line (“Surface” field).

8.99 HybridShapeLinePtDir

This class represents a line defined by a point and a direction (see Section 6.3). An object of the
class is created with the AddNewLinePtDir or AddNewLinePtDirOnSupport methods of
the HybridShapeFactory class (Section 8.85).
Object Path: AnyObject.HybridShape.Line.HybridShapeLinePtDir
BeginOffset As Length (Read Only)
This property returns or sets the distance from the start point of the line to the reference point
(“Start” field). The value can be edited with the Value method.

Dir As HybridShapeDirection
This property returns or sets the direction definition (“Direction” field).

EndOffset As Length (Read Only)


This property returns or sets the distance from the end point of the line to the reference point
(“End” field). The value can be edited with the Value method.

Func GetLengthType As Long


This method gets the length type (“Length Type” field). The value range is similar to
the SetLengthType method’s.

Func GetSymmetricalExtension As Boolean


This method gets whether the “Mirrored Extent” of the line is active (refer
to SetSymmetricalExtension).

Orientation As Long
This property returns or sets the orientation of the line (“Reverse Direction” button). If the value
is “1,” the original orientation is maintained. If the value is “–1,” the line is inverted.
Point As Reference
This property returns or sets the reference point of the line (“Point” field).

Sub RemoveSupport
This property removes the support element from the line definition (“Support” field).

Sub SetLengthType [Type] As Long


This method sets the length type of the line (“Length Type” options: “Length,” “Infinite,” “Infinite
Start Point,” and “Infinite End Point”). The value range is “0” (Length), “1” (Infinite), “2” (Infinite
Start Point), and “3” (Infinite End Point).

Sub SetSymmetricalExtension [Value] As Boolean


This method sets the value of the “Mirrored Extent” option. If the value is “True,” the option is set.

Support As Reference
This property returns or sets the support of the line (“Support” field). A support is optional.

8.100 HybridShapeLinePtPt
This class represents a line spanning across two points (see Section 6.3). An object of the class
is created with the AddNewLinePtPt, AddNewLinePtPtExtended,
AddNewLinePtPtOnSupport, or AddNewLinePtPtOnSupportExtended methods of
the HybridShapeFactory class (Section 8.85).
Object Path: AnyObject.HybridShape.Line.HybridShapeLinePtPt
BeginOffset As Length (Read Only)
This property returns or sets the distance from the start point of the line to the reference point
(“Start” field). The value can be edited with the Value method. The property only exists if the line
was created with
the AddNewLinePtPtExtended or AddNewLinePtPtOnSupportExtended methods.

EndOffset As Length (Read Only)


This property returns or sets the distance from the end point of the line to the reference point
(“End” field). The value can be edited with the Value method. The property only exists if the line
was created with
the AddNewLinePtPtExtended or AddNewLinePtPtOnSupportExtended methods.

Func GetLengthType As Long


This method gets the length type (“Length Type” field). The value range is similar to
the SetLengthType method’s.

Func GetSymmetricalExtension As Boolean


This method gets whether the “Mirrored Extent” of the line is active (refer
to SetSymmetricalExtension).

PtExtremity As Reference
This property returns or sets the second point (“Point 2” field).

PtOrigine As Reference
This property returns or sets the first point (“Point 1” field).

Sub RemoveSupport
This property removes the support element from the line definition (“Support” field).

Sub SetLengthType [Type] As Long


This method sets the length type of the line (“Length Type” options: “Length,” “Infinite,” “Infinite
Start Point,” and “Infinite End Point”). The value range is “0” (Length), “1” (Infinite), “2” (Infinite
Start Point), and “3” (Infinite End Point).

Sub SetSymmetricalExtension [Value] As Boolean


This method sets the value of the “Mirrored Extent” option. If the value is “True,” the option is set.

Support As Reference
This property returns or sets the support of the line (“Support” field). A support is optional.

8.101 HybridShapeLineTangency

This class represents a line tangent to a curve through a point (see Section 6.3). An object of
the class is created with
the AddNewLineTangency or AddNewLineTangencyOnSupport methods of
the HybridShapeFactory class (Section 8.85).
Object Path: AnyObject.HybridShape.Line.HybridShapeLineTangency
BeginOffset As Length (Read Only)
This property returns or sets the distance from the start point of the line to the reference point
(“Start” field). The value can be edited with the Value method.

Support As Reference
This property returns or sets the curve (“Curve” field).

EndOffset As Length (Read Only)


This property returns or sets the distance from the end point of the line to the reference point
(“End” field). The value can be edited with the Value method.

Func GetLengthType As Long


This method gets the length type (“Length Type” field). The value range is similar to
the SetLengthType method’s.

Func GetSymmetricalExtension As Boolean


This method gets whether the “Mirrored Extent” of the line is active (refer
to SetSymmetricalExtension).

Orientation As Long
This property returns or sets the orientation of the line (“Reverse Direction” button). If the value
is “1,” the original orientation is maintained. If the value is “–1,” the line is inverted.

Point As Reference
This property returns or sets the reference point of the line (“Element 2” field).

Sub RemoveSupport
This property removes the support element from the line definition (“Support” field).

Sub SetLengthType [Type] As Long


This method sets the length type of the line (“Length Type” options: “Length,” “Infinite,” “Infinite
Start Point,” and “Infinite End Point”). The value range is “0” (Length), “1” (Infinite), “2” (Infinite
Start Point), and “3” (Infinite End Point).

Sub SetSymmetricalExtension [Value] As Boolean


This method sets the value of the “Mirrored Extent” option. If the value is “True,” the option is set.

Support As Reference
This property returns or sets the support of the line (“Support” field). A support is optional.

8.102 HybridShapeLoft

This class represents a multi-section surface (see Section 6.6). An object of the class is created
with the AddNewLoft method of the HybridShapeFactory class (Section 8.85).
Object Path: AnyObject.HybridShape.HybridShapeLoft
Sub AddGuide [Curve] As Reference
This method adds a guide curve to the lofted surface (“Guides” field).

Sub AddGuideWithTangent [Curve, Surface] As Reference


This method adds a guide curve and a tangent surface to the lofted surface (“Guides” field).

Sub AddSectionToLoft [Curve] As Reference, [Orientation] As Long, [EndPoint] As


Reference
This method adds a section to the lofted surface at the end of the list (“Section” field). The
“Curve” parameter designates a section. “Orientation” determines whether the curve should be
inverted (inverted: “–1,” not inverted: “1”). The “EndPoint” specifies the logical end point of the
section.

BooleanOperation As Long
This property gets or sets the Boolean operation for the closed lofted surface when the lofted
surface is an object of Loft class (Section 8.159). The value range is “1” (no Boolean operation),
“2” (union Boolean operation), and “3” (removal Boolean operation).

CanonicalDetection As Long
This property returns or sets whether canonical surfaces of the lofted surface are detected. The
value range is “1” (no detection), “2” (only planar surfaces), and “3” (canonical surfaces).

CompEndSectionTangent As Long
This property returns or sets whether the tangent surface to the end section of the lofted surface
is computed (“1” is computed, “2” is not computed).

CompEndSectionTangent As Long
This property returns or sets whether the tangent surface to the start section of the lofted
surface is computed (“1” is computed, “2” is not computed).

Context As Long
This property returns or sets whether a lofted surface or volume is created. The values range is
“0” (surface) and “1” (volume). For a volume, a Generative Shape Optimizer license is required.

Sub GetFacesForClosing [StartFace, EndFace] As Reference


This method gets the start and end faces of the lofted surface.

Sub GetGuide [Index] As Long, [GuideCurve, GuideTangent] As Reference


This method gets information about the guide at a specified position in the list of the lofted
surface (“Guides” list).

Func GetNbOfGuides As Long


This method returns the number of guides in the lofted surface (“Guides” list).

Sub GetSectionFromLoft [Index] As Long, [Section] As Reference, [Orientation] As Long,


[EndPoint] As Reference
This method reads the section definition in the lofted surface at the “Index” position (“Section”
field). The other parameters are the same as the AddSectionToLoft method.

Sub GetSpine [Type] As Long, [Spine] As Reference


This method gets the spine of the lofted surface. The values range is “1” (user defined) and “2”
(automatically computed).

Sub GetStartAndEndSectionTangent [StartTangent, EndTangent] As Reference


This method gets the start and end section tangents of the lofted surface (“Tangent” column to
the right of the “Section” column).

Sub InsertCoupling [Index] As Long


This method inserts a coupling to the lofted surface at the “Index” position. If “Index” is equal to
“0,” then the definition is added to the end of the coupling list. The coupling definition must be
then specified with the InsertCouplingPoint method.

Sub InsertCouplingPoint [CouplingIndex, Position] As Long, [Point] As Reference


This method adds a coupling point to an existing coupling definition. “Coupling Index” describes
the index number of the coupling definition. “Position” describes the coupling point in the list of
coupling points. If “Position” is zero, it will be added to the end. “Point” defines the coupling point.
The point must lie on the support curve corresponding to the “Position” number. A fully defined
coupling definition is needed for each support curve that has a coupling point.

Sub InsertSectionToLoft [Type] As Boolean, [Curve] As Reference, [Orientation] As Long,


[Point, SectionReference] As Reference
This method inserts a section to the lofted surface. The position is determined by the
“SectionReference” curve. If “Type” equals “True,” the section is inserted after the
“SectionReference.” If “Type” equals “False,” the section is inserted before the
“SectionReference.” If “Orientation” equals “1,” the original orientation of the section “Curve” is
maintained. If the value is “–1,” the section is inverted.

Sub ModifyGuideCurve [OldElement, NewElement] As Reference


This method modifies the curve of a guide from the lofted surface (“Guides” list).
Sub ModifySectionCurve [OldSection, NewSection, SectionCurve, EndPoint] As
Reference, [PointType] As Long
This method modifies the section curve from the lofted surface (“Section” field). The
“NewSection,” which can be a curve or a face, replaces the “OldSection.” If the “OldSection” is a
closed curve, the “EndPoint” is a new closing point of the “OldSection.” If the “OldSection” is a
face, the “EndPoint” is a new closing point of the boundary of “OldSection.” “PointType”
describes the type of end point. The value range is “0” (no closing point), “1” (vertex), “2”
(created extremum), and “3” (retrieved extremum).
Sub ModifySectionOrient [Section] As Reference, [Orientation] As Long
This method modifies the orientation of the section curve of the lofted surface. The value range
of “Orientation” is “1” (same orientation as the section curve) and “–1” (inverted orientation).
1
Relimitation As Long
This property returns or sets the relimitation type between sections of the lofted surface.

Value range:
1: The loft will be swept along the spine and then relimited by the start section and the end
section.
2: The loft will be swept along the spine. If the spine is a user spine, the loft is limited by the
spine extremities. If the spine is automatically computed, the loft is relimited by the start section
and the end section.
3: Cases 1 and 2 are combined. The loft will be swept along the spine and then relimited by
the first section. If the spine is a user spine, the end section of the loft is limited by the opposite
spine extremity. If the spine is automatically computed, the loft is relimited by the end section.
4: Cases 1 and 2 are combined. The loft will be swept along the spine and then relimited by
the last section. If the spine is a user spine, the end section of the loft is limited by the opposite
spine extremity. If the spine is automatically computed, the loft is relimited by the start section.
Sub RemoveFaceForClosing [Section] As Reference
This method removes a face used to close the lofted surface.

Sub RemoveGuide [Curve] As Reference


This method removes a curve from the lofted surface.

Sub RemoveFaceForClosing [Section] As Reference


This method removes a tangent surface from the lofted surface (“Guides” list).

Sub RemoveSection [SectionCurve] As Reference


This method removes a section from the lofted surface. The reference must be that of the curve,
not the HybridShapeLoftSection.
Sub RemoveSectionPoint [Section] As Reference
This method removes an end point of a section from the lofted surface (“Section” field).

Sub RemoveSectionTangent [Section] As Reference


This method removes a tangent surface of a section from the lofted surface (“Section” field).

SectionCoupling As Long
This property returns or sets the type of coupling between the sections of lofted surface.

Value range:
1: Ratio: The curves will be coupled according to their ratio.
2: Tangent Continuity: The curves should have an equal number of tangent continuities. The
coupling occurs at the discontinuity.
3: Tangent, then Curvature Continuity: The curves should have an equal number of tangent
then curvature continuities. The coupling occurs at the discontinuities.
4: Vertices: The curves should have an equal number of vertices. The coupling occurs at the
vertices.
Sub SetEndFaceForClosing [Face] As Reference
This method sets a face for the end section of the lofted surface (only available in “Part Design”).

Sub SetEndSectionTangent [Surface] As Reference


This method sets a tangent surface for the end section of the lofted surface. The end section
must lie on the surface.

Sub SetSpine [Curve] As Reference


This method sets the spine of the lofted surface.

Sub SetStartFaceForClosing [Face] As Reference


This method sets a face for the start section of the lofted surface (only available in “Part
Design”).

Sub SetStartSectionTangent [Surface] As Reference


This method sets a tangent surface for the start section of the lofted surface. The start section
must lie on the surface.
e
SmoothAngleThreshold As Double
This property returns or sets the angular threshold of the discontinuities that will be smoothed
(“Angle Correction” field).

SmoothAngleThresholdActivity As Boolean
This property returns or sets the state of the “Angle Correction” option. If the value is “True,” the
option is enabled.

SmoothDeviation As Double
This property returns or sets the deviation value for the smoothing of a lofted surface (“Deviation”
field).

SmoothDeviationActivity As Boolean
This property returns or sets the state of the “Deviation” option. If the value is “True,” the option
is enabled.

8.103 HybridShapeNear

This class represents a near derivate element (see Section 6.8).


An object of the class is created with the AddNewNear method of
the HybridShapeFactory class (Section 8.85).
Object Path: AnyObject.HybridShape.HybridShapeNear

MultipleSolution As Reference
This property returns or sets the multiple elements (“Multiple Element” field).

ReferenceElement As Reference
This property returns or sets the element that serves as a reference from the selection of
geometry (“Reference Element” field). The closest part of the reference geometry is selected.

8.104 HybridShapeOffset

This class represents an offset surface (see Section 6.6). An object of this class is created with
the AddNewOffset method of the HybridShapeFactory class (Section 8.85).
Object Path: AnyObject.HybridShape.HybridShapeOffset
Sub AddTrickyFace [Face] As Reference
This method adds an invalid face to a list of elements. The face is not considered in the creation
of offsets.

Func GetTrickyFace ([Index] As Long) As Reference


This method returns the invalid face at the “Index” position from a list of elements.

OffsetDirection As Boolean (Write Only)


This property returns or sets the direction that the offset surface is created in. If the property is
“True,” the result lies in the direction of the base surface orientation.

OffsetedObject As Reference
This property returns or sets the object to offset (“Surface” field).

OffsetValue As Length (Read Only)


This property returns or sets the offset value (“Offset” field). The value can be edited with
the Value method.

Sub RemoveTrickyFace [Index] As Long


This method removes the invalid face at the “Index” position from a list of elements.

SuppressMode As Boolean
This property returns or sets the state of the suppression mode. If the value is “True,” the
suppression mode is enabled.
8.105 HybridShapePlane1Curve

This class represents a plane passing through a planar curve (see Section 6.4). An object of the
class is created with the AddNewPlane1Curve method of the HybridShapeFactory class
(Section 8.85).
Object Path: AnyObject.HybridShape.Plane.HybridShape- Plane1Curve

Curve As Reference
This property returns or sets the curve (“Curve” field).

8.106 HybridShapePlane1Line1Pt

This class represents a plane passing through a line and a point (see Section 6.4). An object of
this class is created with the AddNewPlane1Line1Pt method of
the HybridShapeFactory class (Section 8.85).
Object Path: AnyObject.HybridShape.Plane.HybridShape- Plane1Line1Pt

Line As Reference
This property returns or sets the line (“Line” field).

Point As Reference
This property returns or sets the point (“Point” field).

8.107 HybridShapePlane2Lines

This class represents a plane passing through two lines (see Section 6.4). An object of this
class is created with the AddNewPlane2Lines method of the HybridShapeFactory class
(Section 8.85).
Object Path: AnyObject.HybridShape.Plane.HybridShapePlane2Lines

First As Reference
This property returns or sets the first line (“Line 1” field).

ForbidNonCoplanarLines As Boolean
This property returns or sets the state of the “Forbid Non Coplanar Lines” option.

Second As Reference
This property returns or sets the second line (refer to First).

8.108 HybridShapePlane3Points

This class represents a plane passing through three points (see Section 6.4). An object of the
class is created with the AddNewPlane3Points method of the HybridShapeFactory class
(Section 8.85).
Object Path: AnyObject.HybridShape.Plane. HybridShape-Plane3Points
First As Reference
This property returns or sets the first point (“Point 1” field).

Second As Reference
This property returns or sets the second point (refer to First).
Third As Reference
This property returns or sets the third point (refer to First).

8.109 HybridShapePlaneAngle

This class represents a plane angled to a reference plane (see Section 6.4). An object of the
class is created with the AddNewPlaneAngle method of the HybridShapeFactory class
(Section 8.85).
Object Path: AnyObject.HybridShape.Plane.HybridShapePlaneAngle

Angle As Angle (Read Only)


This property returns or sets the angle (“Angle” field). The value can be edited with
the Value method.

Orientation As Long
This property returns or sets the direction that the plane is rotated in. The rotation follows the
right-hand axis rule (turn right: “1,” turn left: “–1”).

Plane As Reference
This property returns or sets the reference plane (“Reference” field).

ProjectionMode As Boolean
This property returns or sets the state of the “Project Rotation Axis on Reference Plane” option.
If the value is “True,” the option is enabled.

RevolAxis As Reference
This property returns or sets the rotation axis (“Rotation Axis” field). A rotation axis can be an
axis or a line.

8.110 HybridShapePlaneEquation
This class represents a plane defined with the equation “A * B * X + Y + Z = C * D” (see Section
6.4). An object of the class is created with the AddNewPlaneEquation method of
the HybridShapeFactory class (Section 8.85).
Object Path: AnyObject.HybridShape.Plane.HybridShapePlaneEquation
A As RealParam (Read Only)
This property returns or sets the “A” parameter. The value can be edited with the Value method.

B As RealParam (Read Only)


This property returns or sets the “B” parameter. Refer to A.
C As RealParam (Read Only)
This property returns or sets the “C” parameter. Refer to A.
D As RealParam (Read Only)
This property returns or sets the “D” parameter. Refer to A.
Func GetReferencePoint As Reference
This method gets the reference point (“Point” field).

RefAxisSystem As Reference
This property returns or sets the reference axis system (“Axis System” field).

Sub SetReferencePoint [ReferencePoint] As Reference


This method sets the reference point (“Point” field).

8.111 HybridShapePlaneExplicit

This class represents an explicit plane without history (see Section 6.4). An object of the class is
created with the AddNewPlaneDatum method of the HybridShapeFactory class (Section
8.85). This class has no properties or methods. Explicit geometry cannot be changed via
parameters.
Object Path: AnyObject.HybridShape.Plane.HybridShapePlaneExplicit
8.112 HybridShapePlaneMean

This class represents a plane with a mean total distance to the points of a point cloud
(see Section 6.4). An object of this class is created with the AddNewPlaneMean method of
the HybridShapeFactory class (Section 8.85).
Object Path: AnyObject.HybridShape.Plane.HybridShapePlaneMean

Sub AddPoint [Point] As Reference


This method adds a point (“Points” field).

Sub GetPoint [Index] As Long, [Point] As Reference


This method retrieves the point at a given “Index” position.

Func GetPos ([Point] As Reference) As Long


This method gets the position of a point in the list (“Points” list).

Func GetSize As Long


This method gets the size of the list (“Points” list).

Sub RemoveAll
This method removes all the elements in the list of “Points.”

Sub RemoveElement [Index] As Long


This method removes a point at the “Index” position.

Sub ReplacePointAtPosition [Point] As Reference, [Index] As Long


This method replaces a point in the list at the given “Index” position. The index number for the
first point is “1.”

8.113 HybridShapePlaneNormal

This class represents a plane normal to a curve through a point (see Section 6.4). An object of
the class is created with the AddNewPlaneNormal method of the HybridShapeFactory class
(Section 8.85).
Object Path: AnyObject.HybridShape.Plane.HybridShape- PlaneNormal

Curve As Reference
This property returns or sets the curve (“Curve” field).

Point As Reference
This property returns or sets the point (“Point” field).

8.114 HybridShapePlaneOffset

This class represents a plane offset from another plane (see Section 6.4). An object of this class
is created with the AddNewPlaneOffset method of the HybridShapeFactory class (Section
8.85).
Object Path: AnyObject.HybridShape.Plane.HybridShapePlaneOffset
Offset As Length (Read Only)
This property returns the offset value (“Offset” field). The value can be edited with
the Value method.

Orientation As Long
This property returns or sets the plane orientation (same orientation as the reference plane: “1,”
opposite orientation: “–1”).

Plane As Reference
This property returns the reference plane (“Reference” field).

8.115 HybridShapePlaneOffsetPt

This class represents a plane parallel to a reference plane passing through a point (see Section
6.4). An object of the class is created with the AddNewPlaneOffsetPt method of
the HybridShapeFactory class (Section 8.85).
Object Path: AnyObject.HybridShape.Plane.HybridShape-PlaneOffsetPt

Plane As Reference
This property returns or sets the reference plane (“Reference” field).
Point As Reference
This property returns or sets the reference point (“Point” field).

8.116 HybridShapePlaneTangent

This class represents a plane that is tangent to a surface passing through a point (see Section
6.4). An object of the class is created with the AddNewPlaneTangent method of
the HybridShapeFactory class (Section 8.85).
Object Path: AnyObject.HybridShape.Plane.HybridShapePlaneTangent

Point As Reference
This property returns or sets the reference point (“Point” field).

Surface As Reference
This property returns or sets the surface (“Surface” field).

8.117 HybridShapePointBetween

This class represents an intermediate point between two points at a defined ratio (see Section
6.2). An object of the class is created with the AddNewPointBetween method of
the HybridShapeFactory class (Section 8.85).
Object Path: AnyObject.HybridShape.Point.HybridShapePointBetween
FirstPoint As Reference
This property returns or sets the first point (“Point 1” field).

Orientation As Long
This property returns or sets the direction that the ratio is computed from (from Point 1: “1,” from
Point 2: “–1”).

Ratio As RealParam (Read Only)


This property returns or sets the ratio between the created point and the first and second points
(“Ratio” field). The value can be edited with the Value method.

SecondPoint As Reference
This property returns or sets the second point (“Point 2” field).

Support As Reference
This property returns or sets the support (“Support” field).

8.118 HybridShapePointCenter
This class represents the center of a circle, sphere, or ellipse (see Section 6.2). An object of the
class is created with the AddNewPointCenter method of the HybridShapeFactory class
(Section 8.85).
Object Path: AnyObject.HybridShape.Point.HybridShapePointCenter
Element As Reference
This property returns or sets the circle, sphere, or ellipse (“Circle/Sphere/Ellipse” field).

8.119 HybridShapePointCoord

This class represents a coordinate point (see Section 6.2). An object of the class is created with
the AddNewPointCoord or the AddNewPointCoordWithReference methods of
the HybridShapeFactory class (Section 8.85).
Object Path: AnyObject.HybridShape.Point.HybridShapePointCoord
PtRef As Reference
This property returns or sets the reference point that the coordinates are measured from (“Point”
field). If the point is not set, the absolute origin of the CATPart is used.

RefAxisSystem As Reference
This property returns or sets the reference axis system (“Axis System” field).
X As Length (Read Only)
This property returns the X-coordinate of the point (“X” field). The value can be edited with
the Value method.

Y As Length (Read Only)


This property returns the Y-coordinate of the point (refer to X).
Z As Length (Read Only)
This property returns the Z-coordinate of the point (refer to X).

8.120 HybridShapePointExplicit

This class represents an explicit point without history (see Section 6.2). An object of the class is
created with the AddNewPointDatum method of the HybridShapeFactory class (Section 8.85).
This class has no properties or methods.
Object Path: AnyObject.HybridShape.Point.HybridShapePointExplicit

8.121 HybridShapePointOnCurve

This class represents a point on a curve (see Section 6.2). An object of the class is created with
the AddNewPointOnCurveFromDistance, AddNewPointOnCurveFromPercent,
AddNewPointOnCurveWithReferenceFromDistance, or AddNewPointOnCurveWithRefere
nceFromPercent methods of the HybridShapeFactory class (Section 8.85).
Object Path: AnyObject.HybridShape.Plane. HybridShapePlaneTangent
Curve As Reference
This property returns or sets the curve (“Curve” field).
DistanceType As Long
This property returns or sets whether Geodesic or Euclidean distance is computed (Geodesic:
“1,” Euclidean: “–1”).

Offset As Length (Read Only)


This property returns or sets the distance from the reference point. The value can be edited with
the Value method.

Orientation As Long
This property returns or sets the curve orientation. If the value is “1,” the orientation is the same
as the original curve. If the value is “−1,” the orientation is opposite to the original curve.

Point As Reference
This property returns or sets the reference point (“Point” field).

Ratio As RealParam (Read Only)


This property returns the distance ratio to the reference point (“Point” field). The distance ratio
can be edited with the Value method as a percentage of the distance “From Point to Reference
Point” given the total curve length.

Type As Long (Read Only)


This property returns the distance between the created point and the reference point stored
value type. The value is “1” when the type of measure is the length, and the value is “−1” when
the type of measure is the distance ratio.
8.122 HybridShapePointOnPlane

This class represents a point on a plane (see Section 6.2). An object of the class is created with
the AddNewPointOnPlane or the AddNewPointOnPlaneWithReference methods of
the HybridShapeFactoryclass (Section 8.85).
Object Path: AnyObject.HybridShape.Point.HybridShapePointOnPlane
FirstDirection As HybridShapeDirection
This property returns or sets the direction definition of the h-axis.

Sub GetSecondDirection [DX, DY, DZ] As Double


This method gets the second vector definition. The vector is perpendicular to the first vector
definition.

Plane As Reference
This property returns or sets the plane (“Plane” field).
Point As Reference
This property returns or sets the reference point (“Point” field).

ProjectionSurface As Reference
This property returns or sets the projection surface (“Surface” field).

Sub SetSecondDirection [DX, DY, DZ] As Double


This method sets the second vector definition. The vector is perpendicular to the first vector
definition.

XOffset As Length (Read Only)


This property returns or sets the distance from the reference point in the “H” direction. The value
can be edited with the Value method.

YOffset As Length (Read Only)


This property returns or sets the distance from the reference point in the “V” direction (refer
to XOffset).

8.123 HybridShapePointOnSurface

This class represents a point on a surface (see Section 6.2). An object of the class is created
with the AddNewPointOnSurface or the AddNewPointOnSurfaceWithReference methods of
the HybridShapeFactory class (Section 8.85).
Object Path: AnyObject.HybridShape.Point.HybridShapePointOnSurface
Direction As HybridShapeDirection
This property returns or sets the definition direction (“Direction” field).

Offset As Length (Read Only)


This property returns or sets the distance from the reference point (“Distance” field). The value
can be edited with the Value method.

Point As Reference
This property returns or sets the reference point (“Point” field).

Surface As Reference
This property returns or sets the surface (“Surface” field).

8.124 HybridShapePointTangent

This class represents a point that is tangent on a curve (see Section 6.2). An object of the class
is created with the AddNewPointTangent method of the HybridShapeFactory class (Section
8.85).
Object Path: AnyObject.HybridShape.Point.HybridShapePointTangent

Curve As Reference
This property returns or sets the curve (“Curve” field).

Direction As HybridShapeDirection
This property returns or sets the definition direction (“Direction” field).
8.125 HybridShapePolyline

This class represents a polyline (see Section 6.5). An object of the class is created with
the AddNewPolyline method of the HybridShapeFactory class (Section 8.85).
Object Path: AnyObject.HybridShape.HybridShapePolyline
Closure As Boolean
This property returns or sets whether to close the polyline (enabled: “True”).

Sub GetElement [Index] As Long, [Point] As Reference, [Radius] As Double


This method returns the point and the radius at a specified “Index” position.

Sub InsertElement [Point] As Reference, [Index] As Long


This method returns or adds a point at a specified “Index” position.

NumberOfElements As Long (Read Only)


This property returns the number of elements of the polyline.

Sub RemoveElement [Index] As Long


This method removes a point at a specified “Index” position.

Sub ReplaceElement [Point] As Reference, [Index] As Long


This method replaces a point at a specified “Index” position.
Sub SetRadius [Index] As Long, [Radius] As Double
This method sets the radius at a specified “Index” position.

8.126 HybridShapePositionTransfo

This class represents the transformation definition of an element. An object of the class is
created with the AddNewPositionTranfo method of the HybridShapeFactory class (Section
8.85). A transformation is used on the HybridShapeSweep class (Section 8.140).
Object Path: AnyObject.HybridShape.HybridShapePositionTransfo
Func GetNbPosAngle As Long
This method gets the number of numerical positioning parameters of the first axis direction
angles.

Func GetNbPosCoord As Long


This method gets the number of numerical positioning parameters of the origin planar
coordinates.

Func GetPosAngle ([Index] As Long) As Angle


This method returns the angles of both the initial and target coordinate systems from default
positions. If “Index” equals “1,” the transformation angle reads the initial axis system. If “Index”
equals “2,” the transformation angle reads the target axis system. The Mode property must
equal “1” to use this method.

Func GetPosCoord ([Index] As Long) As Length


This method returns the translation coordinates if both the initial and target coordinate systems
are in default positions. Indices “1” and “2” refer to the parameters of the x- and y-axes of the
initial axis system. Indices “3” and “4” refer to the parameters of the x- and y-axes of the target
axis system. The Mode property must equal “1” to use this method.

Func GetPosDirection ([Index] As Long) As HybridShapeDirection


This method returns the positioning directions. Index “1” indicates the initial axis system, and
index “2” indicates the target axis system. The Mode property must equal “1” to use this method.
The direction is determined by the SetPosDirection method.

Func GetPosPoint ([Index] As Long) As Reference


This method returns the points designated as the origins of the initial and target planes. Index “1”
indicates the initial axis system, and index “2” indicates the target axis system.
The Mode property must equal “1” to use this method. The origin is determined by
the SetPosPoint method.
Func GetPosSwapAxes ([Index] As Long) As Long
This method returns the axis inversion from previous definitions for both the initial and target
planes. Index “1” indicates the initial axis system, and index. “2” indicates the target axis system.
The Mode property must equal “1” to use this method. The value range for the function return
value is “0” (no inverted axis), “1” (x-axis inverted), “2” (y-axis inverted), and “3” (both axes
inverted).

InitialDirectionComputationMode As Long
This property returns or sets the computation mode of the x-axis of the initial axis system. The
value range: “0” (no x-axis specified), “1” (x-axis is implicitly the tangent of the profile at the
origin), and “2” (x-axis is specified by a direction by SetPositionDirection).

Mode As Long
This property returns or sets whether a profile is positioned with a transformation or at its
original position (“Position Profile” button on or off). If the value is “0,” the button is off (original
position). If the value is “1,” the button is enabled.

Profile As Reference
This property returns or sets the profile.

Sub RemoveAllPosAngle
This method removes all numerical positioning parameters: first axis direction angles.

Sub RemoveAllPosCoord
This method removes all numerical positioning parameters: origin planar coordinates.

Sub SetPosAngle [Index] As Long, [Angle] As Angle


This method sets the angles of both initial and target coordinate systems. The value range of
the index is “1” (initial axis system) and “2” (target axis system).

Sub SetPosCoord [Index] As Long, [Value] As Length


This method sets the translation coordinates of both the initial and target coordinate systems.
The value range of “Index” is similar to that of GetPosCoord.

Sub SetPosDirection [Index] As Long, [Direction] As HybridShapeDirection


This method sets the points designated as the origins of the initial and target planes. If “Index”
equals “1,” the direction element is read from the initial axis system. If “Index” equals “2,” the
direction element is read from the target axis system.

Sub SetPosPoint [Index] As Long, [Point] As Reference


This method sets the points designated as the origins of the initial and target planes. The value
range of the index is “1” (initial axis system) and “2” (target axis system). The Mode property
must equal “1” to use this method.

Sub SetPosSwapAxes [Index, Mode] As Long


This method sets whether the x- or y-axis of the initial or target axis system are inverted. Index
“1” indicates the initial axis system, and index “2” indicates the target axis system.
The Mode property must equal “1” to use this method. The value range for the “Mode”
parameter is “0” (no inverted axis), “1” (x-axis inverted), “2” (y-axis inverted), and “3” (both axes
inverted).

8.127 HybridShapeProject

This class represents a projection (see Section 6.8). An object of the class is created with
the AddNewProject method of the HybridShapeFactory class (Section 8.85).
Object Path: AnyObject.HybridShape.HybridShapeProject

Direction As HybridShapeDirection
This property returns or sets the definition direction (“Direction” field). The property only exists if
the Normal property is “False.”

ElemToProject As Reference
This property returns or sets the element to project (“Projected” field).

MaximumDeviationValue As Double
This property returns or sets the maximum deviation allowed for smoothing operation if
smoothing is performed (“Deviation” field).

Normal As Boolean
This property returns or sets whether an element is projected normal to the supporting geometry
(value “True”) or along a direction (value “False”) (“Projection Type” field).

p3DSmoothing As Boolean
This property returns or sets the 3D smoothing option.

SmoothingType As Long
This property returns or sets the smoothing type (“Smoothing” field). The value range is “0” for
no smoothing, “2” for tangent continuity, and “3” for curvature continuity.

SolutionType As Long
This property returns or sets whether the nearest solution (value “0”) or all solutions (value “1”)
are kept when more than one solution is possible (“Nearest Solution” option).

Support As Reference
This property returns or sets the support (“Support” field).

8.128 HybridShapeReflectLine

This class represents a reflect line (see Section 6.5). An object of the class is created with
the AddNewReflectLine or AddNewReflectLineWithType methods of
the HybridShapeFactory class (Section 8.85).
Object Path: AnyObject.HybridShape.HybridShapeReflectLine

Angle As Angle (Read Only)


This property returns or sets the reflect angle (“Angle” field). The value can be edited with
the Value method.
Direction As HybridShapeDirection
This property returns or sets the direction used to create the cylindrical reflect line (“Direction”
field).

Sub InvertOrientationDirection
This method inverts the orientation of the direction element (“Direction” field).

Sub InvertOrientationSupport
This method inverts the orientation of the support (“Support” field).

OrientationDirection As Long
This property returns or sets the orientation direction used to compute the reflect line (original
direction: “1,” inverted direction: “–1”).

OrientationSupport As Long
This property returns or sets the orientation support used to compute the reflect line (original
orientation: “1,” inverted orientation: “–1”).

Origin As Reference
This property returns or sets the origin point used to create the conical reflect line.

SourceType As Long
This property returns or sets whether the reflect line is or should be created with infinite light
source (cylindrical) or with finite point light source (conical). If the value is “0,” a cylinder is used.
If the value is “1,” a cone is used.

Support As Reference
This property returns or sets the support (“Support” field).

TypeSolution As Long
This property returns or sets whether the reflect line is or should be created with the normal to
the support (value “0”) or the tangent plane to the support (value “1”) (“Angle Reference” field).

8.129 HybridShapeRevol

This class represents a revolution (see Section 6.6). An object of this class is created with
the AddNewRevol method of the HybridShapeFactory class (Section 8.85).
Object Path: AnyObject.HybridShape.HybridShapeRevol

s
Axis As Reference
This property returns or sets the revolution axis (“Revolution Axis” field). The axis must lie in the
profile plane.
s
BeginAngle As Angle (Read Only)
This property returns or sets the first angle (“Angle 1” field). The value can be edited with
the Value method.

Context As Long
This property returns or sets whether the result of the revolution is a surface (value “0”) or a
volume (value “1”).

EndAngleAs Angle (Read Only)


This property returns or sets the second angle (“Angle 2” field). The value can be edited with
the Value method.

Orientation As Boolean
This property returns or sets the orientation of the axis of the revolution. If the value is “True,”
the original orientation is used. If the value is “False,” the orientation is inverted.

Profil As Reference
This property returns or sets the revolving planar profile (“Profile” field).
8.130 HybridShapeRotate

This class represents a rotation (see Section 6.7). An object of the class is created with
the AddNewRotate method of the HybridShapeFactory class (Section 8.85).
Object Path: AnyObject.HybridShape.HybridShapeRotate
Angle As Angle (Read Only)
This property returns or sets the rotation angle (“Angle” field). The value can be edited with
the Value method.

AngleValue As Double
This property returns or sets the angle value (“Angle” field).

Angle As Angle (Read Only)


This property returns or sets the rotation axis (“Axis” field).

ElemToRotate As Reference
This property returns or sets the element to rotate (“Element” field).

FirstElement As Reference
This property returns or sets the first element to rotate (“First Element” field), provided that the
definition mode is “Axis-Two Elements.”

FirstPoint As Reference
This property returns or sets the first point (“First Point” field), provided that the definition mode
is “Three Points.”

Func GetCreationMode As Long


This method gets the creation mode. The value range is “0” (default), “1” (creation mode), and
“2” (modification mode).
OrientationOfFirstElement As Boolean
This property returns or sets whether the orientation defining the rotation angle of the first
element is in the original orientation (“False”) or in the inverted orientation (“True”), provided that
the definition mode is “Axis-Two Elements.”

OrientationOfSecondElement As Boolean
This property returns or sets the orientation of the second element. Refer
to OrientationOfFirstElement.
RotationType As Long
This property returns or sets the type of rotation (“Definition Mode” field). The value range is “0”
(Axis-Angle), “1” (Axis-Two Elements), and “2” (Three Points).

SecondElement As Reference
This property returns or sets the second element to rotate. Refer to FirstElement.
SecondPoint As Reference
This property returns or sets the second point. Refer to FirstPoint.
Sub SetCreationMode [Mode] As Boolean
This method sets the creation mode. The value range is “True” (creation mode) and “False”
(modification mode).
SecondPoint As Reference
This property returns or sets the third point. Refer to FirstPoint.
VolumeResult As Boolean
This property returns or sets the resulting element as a volume (“True”) or a surface (“False”).

8.131 HybridShapes

This class represents a collection of wireframe and surface elements. An object of the class is
declared with the HybridShapes property of the HybridBody class (Section 8.50).
Object Path: Collection.HybridShapes
Func GetBoundary ([Name] As String) As Boundary
This method returns a boundary by using its name.

Func Item ([Index] As CATVariant) As HybridShape


This method returns an element by using its “Index” or its name from
the HybridShapes collection.
or

8.132 HybridShapeScaling

This class represents a scaled element (see Section 6.7). An object of this class is created with
the AddNewHybridScaling method of the HybridShapeFactory class (Section 8.85).
Object Path: AnyObject.HybridShape.HybridShapeScaling

Center As Reference
This property returns or sets the reference element (“Reference” field).

CreationMode As Boolean
This property returns or sets the creation mode. The value is “True” for creation mode and
“False” for modification mode.

ElemToScale As Reference
This property returns or sets the element to scale (“Element” field).

Ratio As RealParam (Read Only)


This property returns the scaling ratio parameter (“Ratio” field). The value can be edited with
the Value method.

RatioValue As Double
This property returns or sets the scaling ratio value (“Ratio” field).

VolumeResult As Boolean
This property returns or sets the resulting element as a volume (“True”) or a surface (“False”).
8.133 HybridShapeSection
This class represents a section definition. An object of the class is created with
the AddNewSection method of the HybridShapeFactory class (Section 8.85).
Object Path: AnyObject.HybridShape.HybridShapeSection
SectionPlane As Reference
This property returns or sets the section plane.

8.134 HybridShapeSphere

This class represents a sphere (see Section 6.6). An object of the class is created with
the AddNewSphere method of the HybridShapeFactory class (Section 8.85).
Object Path: AnyObject.HybridShape.HybridShapeSphere
Axis As Reference
This property returns or sets the sphere axis (“Sphere Axis” field).

BeginMeridianAngle As Angle (Read Only)


This property returns or sets the first meridian angle (“Meridian Start Angle” field). The value can
be edited with the Value method.

BeginParallelAngle As Angle (Read Only)


This property returns or sets the first parallel angle (“Parallel Start Angle” field). The value can
be edited with the Value method.

Center As Reference
This property returns or sets the center (“Center” field).
EndMeridianAngle As Angle (Read Only)
This property returns or sets the last meridian angle (“Meridian End Angle” field). The value can
be edited with the Value method.

EndParallelAngle As Angle (Read Only)


This property returns or sets the last parallel angle (“Parallel End Angle” field). The value can be
edited with the Value method.

Limitation As Long (Write Only)


This property returns whether the sphere is created as a whole sphere (value “1”) or a partial
sphere (value “0”) controlled by an angle.

Radius As Length (Read Only)


This property returns the radius (“Sphere Radius” field). The value can be edited with
the Value method.

Sub SetBeginMeridianAngle [Angle] As Double


This method sets the first meridian angle (“Meridian Start Angle” field).

Sub SetBeginParallelAngle [Angle] As Double


This method sets the first parallel angle (“Parallel Start Angle” field).

Sub SetEndMeridianAngle [Angle] As Double


This method sets the last meridian angle (“Meridian End Angle” field).

Sub SetEndParallelAngle [Angle] As Double


This method sets the last parallel angle (“Parallel End Angle” field).

Sub SetRadius [Radius] As Double


This method sets the radius (“Sphere Radius” field).

8.135 HybridShapeSpine

This class represents a spine (see Section 6.5). An object of the class is created with
the AddNewSpine method of the HybridShapeFactory class (Section 8.85).
Object Path: AnyObject.HybridShape.HybridShapeSpine
Sub AddGuide [Guide] As Reference
This method adds a guide to the spine curve.

Sub AddSection [Section] As Reference


This method adds a section or a plane to the spine curve.

Sub GetGuide [Index] As Long, [Guide] As Reference


This method retrieves a guide at a specified “Index” position (“Guide” list).

Func GetNumberOfGuides As Long


This method retrieves the number of guides in a spine curve (“Guide” list).

Func GetNumberOfSections As Long


This method retrieves the number of sections in a spine curve (“Section/Plane” list).

Sub GetSection [Index] As Long, [Section] As Reference


This method retrieves a section or a plane at a specified “Index” position.

Sub ModifyGuideCurve [OldElement, NewElement] As Reference


This method modifies a guide from the spine curve (“Guide” list).

Sub ModifySectionCurve [OldElement, NewElement] As Reference


This method modifies a section or a plane from the spine curve (“Section/Plane” list).

Orientation As Long
This property returns or sets the orientation. The orientation is measured at the first section
element. The value range is “1” (not inverted) and “–1” (inverted).

Sub RemoveGuide [Guide] As Reference


This method removes a guide from the spine curve.

Sub RemoveSection [Section] As Reference


This method adds a section or a plane to the spine curve.

Sub SetStartPoint [ReferencePoint] As Reference


This method sets the start point of the spine curve.

StartPoint As Reference
This property returns or sets the start point (“Start Point” field).

8.136 HybridShapeSpiral

This class represents a spiral (see Section 6.5). An object of the class is created with
the AddNewSpiral method of the HybridShapeFactory class (Section 8.85).
Object Path: AnyObject.HybridShape.HybridShapeSpiral

Axis As HybridShapeDirection
This property returns or sets the spiral axis (“Reference Direction” field). The direction must be
parallel to the support element.
CenterPoint As Reference
This property returns or sets the center of the spiral (“Center Point” field).

ClockwiseRevolution As Boolean
This property returns or sets whether the spiral is computed in a clockwise or counterclockwise
direction about the direction vector of the support element (“Orientation” field). “True” is
clockwise.

EndingAngle As Angle (Read Only)


This property returns or sets the end angle (“End Angle” field).

EndingRadius As Length (Read Only)


This property returns or sets the end radius (“End Radius” field). The value can be edited with
the Value method.

InvertAxis As Boolean
This property returns or sets whether the reference direction is inverted.

Pitch As Length (Read Only)


This property returns or sets the pitch of the spiral (“Pitch” field). The value can be edited with
the Value method. The property is only available if the spiral type is “Angle and Pitch” or
“Radius and Pitch.”

RevolNumber As RealParam (Read Only)


This property returns or sets the parameters of the “Revolutions” field. The value can be edited
with the Value method.

Sub SetAnglePitchParam [EndAngle, Revolutions, Pitch] As Double


This method sets the values of the “End angle,” “Revolutions,” and “Pitch” fields.

Sub SetAngleRadiusParam [EndAngle, Revolutions, Pitch] As Double


This method sets the values of the “End angle,” “Revolutions,” and “End Radius” fields.

Sub SetRadiusPitchParam [EndRadius, Pitch] As Double


This method sets the values of the “End Radius” and “Pitch” fields.

StartingRadius As Length (Read Only)


This property returns or sets the start radius (“Start Radius” field). The value can be edited with
the Value method.

Support As Reference
This property returns or sets the support element (“Support” field).

Type As Long
This property returns or sets the spiral type (“Type” field). The values are: “0” for “Angle and
Radius,” “1” for “Angle and Pitch,” and “2” for “Radius and Pitch.”

8.137 HybridShapeSpline

This class represents a spline (see Section 6.5). An object of the class is created with
the AddNewSpline method of the HybridShapeFactory class (Section 8.85).
Object Path: AnyObject.HybridShape.HybridShapeSpline

Sub AddPoint [Point] As Reference


This method adds a point to a spline definition (“Points” column) without defining a constraint.

Sub AddPointWithConstraintExplicit [Point] As Reference, [TangentDirection] As


HybridShapeDirection, [Tension] As Double, [Inversion] As Long, [CurvatureDirection]
As HybridShapeDirection, [CurvatureRadius] As Double
This method adds a point with a constraint of the “Explicit” type (“Constraint Type” field) to a
spline definition (“Points” column). The other parameters define the tangent direction (“Tangents
Dir.” field), the tangent tension (“Tensions” field), the inversion (“Reverse Tangent” button), the
curvature direction (“Curvature Dir.” field), and the curvature radius (“Curvature Radius” field).
The value range of the “Inversion” parameter is “1” and “–1.”
Sub AddPointWithConstraintFromCurve [Point, Element] As Reference, [Tension] As
Double, [Inversion, Continuity] As Long
This method adds a point with a constraint of the “FromCurve” type (“Constraint Type” field) to a
spline definition (“Points” column). The other parameters define the element direction (“Element”
field), the tangent tension (“Tensions” field), the inversion (“Reverse Tangent” button), and the
curvature continuity (“Continuity” field). The value range of the “Inversion” parameter is “1” and
“–1.” The value range of the “Continuity” parameter is “1” (tangent continuity) and “2” (curvature
continuity).
Func GetClosure As Long
This method gets whether the curve is closed. The value range is “0” (disabled) and “1”
(enabled).

Func GetConstraintType ([Index] As Long) As Long


This method returns the constraint type (“Constraint Type” field) of a point of the spline at a
specified “Index” position. The value range is “0” (not defined), “1” (explicit), and “2” (from curve).
The “Index” parameter begins at “1.”

Func GetCurvatureRadius ([Index] As Long) As Length (Read Only)


This method returns the curvature radius value for a point of the spline at a specified “Index”
position. The value can be edited with the Value method.

Func GetDirectionInversion ([Index] As Long) As Long


This method gets the orientation of the tangent direction of the spline at a specified “Index”
position. The “Index” parameter begins at “1.”

Func GetNbControlPoint As Long


This method returns the number of control points.

Func GetPoint ([Index] Long) As Reference


This method returns a point at a specified “Index” position (“Points” column). The “Index”
parameter begins at “1.”

Sub GetPointConstraintExplicit [Index] As Long, [TangentDirection] As


HybridShapeDirection, [Tension] As Double, [Inversion] As Long, [CurvatureDirection]
As HybridShapeDirection, [CurvatureRadius] As Double
This method returns the constraint of a point at a specified “Index” position if the condition type
is “Explicit” (GetConstraintType equals “1”). The “Index” parameter begins at “1.” The other
parameters are similar to the AddPointWithConstraintExplicit method’s.
Sub GetPointConstraintFromCurve [Index] As Long, [Element] As Reference, [Tension]
As Double, [Inversion, Continuity] As Long
This method returns the constraint of a point at a specified “Index” position if the condition type
is “FromCurve” (GetConstraintType equals “2”). The “Index” parameter begins at “1.” The other
parameters are similar to the AddPointWithConstraintFromCurve method’s.
Func GetPointPosition ([Point] As Reference) As Long
This method returns the position of a point in the spline definition (“Points” column). The function
is the inverse function of the GetPoint method.
Func GetSplineType As Long
This method gets the spline type. Refer to SetSplineType.
Func GetSupport As Reference
This method gets the support surface. Refer to SetSupport.
Func GetTangentNorm ([Index] As Long) As RealParam (Read Only)
This method returns the tension for each point of the spline at a specified “Index” position. The
value can be edited with the Value method.

Sub InvertDirection [Index] As Long


This method inverts the orientation of the tangent direction at a specified “Index” position. The
“Index” parameter begins at “1.”

Sub RemoveAll
This method removes all points from the spline definition.
Sub RemoveControlPoint [Index] As Long
This method removes a point from the spline definition at a specified “Index” position.

Sub RemoveCurvatureRadiusDirection [Index] As Long


This method removes the definition of the curvature direction (“Curvature Dir.” field) at a
specified “Index” position.
Sub RemoveCurvatureRadiusValue [Index] As Long
This method removes the definition of the curvature radius (“Curvature Radius” field) at a
specified “Index” position.
Sub RemoveSupport
This method removes the support (“Geometry on Support” field).
Sub RemoveTangentDirection [Index] As Long
This method removes the definition of the tangent direction (“Tangents Dir.” field) at a specified
“Index” position.
Sub RemoveTension [Index] As Long
This method removes the definition of the tension (“Tensions” field) at a specified “Index”
position.
Sub ReplacePointAtPosition [Index] As Long, [NewPoint] As Reference
This method replaces a point at a specified “Index” position with a new point (“Points” column).
Sub SetClosing [ClosingType] As Long
This method sets the state of the closing option (enabled: “1,” disabled: “0”).

Sub SetPointAfter [Index] As Long, [NewPoint] As Reference


This method adds a point after a specified “Index” position (“Points” column).

Sub SetPointBefore [Index] As Long, [NewPoint] As Reference


This method adds a point before a specified “Index” position (“Points” column).

Sub SetPointConstraintExplicit [Index] As Long, [TangentDirection] As


HybridShapeDirection, [Tension] As Double, [Inversion] As Long, [CurvatureDirection]
As HybridShapeDirection, [CurvatureRadius] As Double
This method sets the constraint of a point with the “Explicit” constraint type at a specified “Index”
position. Refer to GetPointConstraintExplicit.
Sub SetPointConstraintFromCurve [Index] As Long, [Element] As Reference, [Tension]
As Double, [Inversion, Continuity] As Long
This method sets the constraint of a point with the “FromCurve” constraint type at a specified
“Index” position. Refer to PointConstraintFromCurve.
Sub SetSplineType [Type] As Long
This method sets whether a cubic spline (value “0”) or a “Wilson Fowler” (value “1”) is computed.

Sub SetSupport [Support] As Reference


This property returns or sets the support element of the spline (“Geometry on Support” field). If
tangent directions are used, they must be tangential to the supporting surface.
8.138 HybridShapeSplit

This class represents a split (see Section 6.8). An object of the class is created with
the AddNewHybridSplit method of the HybridShapeFactory class (Section 8.85).
Object Path: AnyObject.HybridShape.HybridShapeSplit
Sub AddCuttingElem [Element] Reference, [Orientation] As Long
This method adds a cutting element to the split (“Cutting Elements” field). If the orientation
equals “1,” the original orientation of the element is used. If the orientation equals “–1,” the
orientation is inverted.

Sub AddElementToKeep [Element] As Reference


This method adds an element to the list of the elements to be kept (“Elements to Keep” field).
Sub AddElementToRemove [Element] As Reference
This method removes an element to the list of the elements to be kept (“Elements to Remove”
field).
AutomaticExtrapolationMode As Boolean
This property gets or sets the state of the “Automatic Extrapolation” option. If the value is “True,”
the option is enabled.
BothSidesMode As Boolean
This property gets or sets the state of the “Keep Both Sides” option. If the value is “True,” the
option is enabled.
ElemToCut As Reference
This property returns or sets the cutting element (“Cutting Elements” field).

Func GetCuttingElem ([Index] As Long) As Reference


This method gets the cutting element at a specified “Index” position (“Cutting Elements” field).
Func GetIntersection ([Index] As Long) As Reference
This method gets the intersection at a specified “Index” position.
Func GetKeptElem ([Index] As Long) As Reference
This method gets the kept element at a specified “Index” position (“Elements to Keep” field).
Func GetNbCuttingElem As Long
This method gets the number of cutting elements in the “Cutting Elements” list.
Func GetNbElementsToKeep As Long
This method gets the number of elements to keep in the “Elements to Keep” list.
Func GetNbElementsToRemove As Long
This method gets the number of elements to remove in the “Elements to Remove” list.
Func GetOrientation ([Index] As Long) As Long
This method gets the orientation of the cutting element at a specified “Index” position. The value
range is “1” (original orientation), “–1” (inverted orientation), and “2” (no orientation).
Func GetOtherSide As Reference
This method gets the other side of the split (“Other Side” button).
Func GetRemovedElem ([Index] As Long) As Reference
This method gets the element at a specified “Index” position from the “Elements to Remove” list.
IntersectionComputation As Boolean
This property gets or sets the state of the “Intersections Computation” option. If the value is
“True,” the option is enabled.
Sub InvertOrientation
This method inverts the orientation of the split.

Orientation As Long
This property returns or sets the orientation used to compute the split. If the orientation value is
“1,” kept parts are specified by either the direction vector of the cutting element or the cross
product of two vectors. When two curves are used, the first portion of the curve will remain. If
the value is “−1,” the other side will remain.

Sub RemoveCuttingElem [Element] As Reference


This method removes an element at a specified “Index” position from the “Cutting Elements” list.
Sub RemoveElementToKeep [Element] As Reference
This method removes an element at a specified “Index” position from the “Elements to Keep” list.
Sub RemoveElementToRemove [Index] As Long
This method removes an element at a specified “Index” position from the “Elements to Remove”
list.
Sub SetOrientation [Index, Orientation] As Long
This method sets the orientation of the cutting element at a specified “Index” position. The value
range is “1” (original orientation), “−1” (inverted orientation), and “2” (no orientation).
Support As Reference
This property returns or sets the support element (“Support” field).

BothSidesMode As Boolean
This property gets or sets the state of the “Keep Both Sides” option. If the value is “True,” the
option is enabled.
VolumeResult As Long
This property returns or sets the resulting element of the split as a volume (value is “1”) or a
surface (value is “0”).

8.139 HybridShapeSurfaceExplicit

This class represents a surface without history (see Section 6.6). An object of the class is
created with the AddNewCurveDatum method of the HybridShapeFactory class (Section
8.85). This class has no properties or methods.
Object Path: AnyObject.HybridShape.HybridShapeSurfaceExplicit

8.140 HybridShapeSweep

This class represents a sweep (see Section 6.6). It is a parent class of the HybridShape-
SweepCircle, HybridShapeSweepConic,
HybridShapeSweepExplicit, and HybridShapeSweepLine classes.
Object Path: AnyObject.HybridShape.HybridShapeSweep
Sub AddCutPoints [Element1, Element2] As Reference
This method sets two cut points on the master guide.

Sub AddFillPoints [Element1, Element2] As Reference


This method sets two fill points on the master guide.

FillTwistedAreas As Long
This property returns or sets the state of the “Fill Twisted Areas” option. If the value is “True,”
the option is enabled.

Func GetCutPoint ([Rank] As Long) As Reference


This method gets the cut point at a specified “Rank” position.

Func GetFillPoint ([Rank] As Long) As Reference


This method gets the fill point at a specified “Rank” position.

Sub RemoveAllCutPoints
This method removes all cut points.

Sub RemoveAllFillPoints
This method removes all fill points.

SetbackValue As Double
This property returns or sets the setback value. The value is adjusted interactively with the
“Setback” slider bar.
8.141 HybridShapeSweepCircle

This class represents a swept surface using a circular profile (see Section 6.6). An object of the
class is created with the AddNewSweepCircle method of the HybridShapeFactory class
(Section 8.85).
Object Path: AnyObject.HybridShape.HybridShapeSweep.HybridShapeSweepCircle
CanonicalDetection As Long
This property returns or sets whether canonical surfaces are detected in the swept surface. If
the value is “0,” the option is disabled. If the value is “2,” the option is enabled.
ChoiceNo As Long
This property returns or sets the choice number (solution) if multiple solutions exist.

Context As Long
This property returns or sets whether the sweep is a surface (value equal to “0”) or a volume
(value equal to “1”).
FirstAngleLaw As Reference
This property returns or sets the first angle law. This property is not needed if the standard
CATIA laws are used (constant, linear, S-shaped).

FirstAngleLawInversion As Long
This property returns or sets whether the first angle law is inverted. “1” indicates an inversion, “0”
no inversion.

FirstGuideCrv As Reference
This property returns or sets the first guide curve.

Func GetAngle ([Index] As Long) As Angle


This method returns the angle values at a specified “Index” position. “Index” is “1” or “2.” The
value can be edited with the Value method.

Sub GetAngleLawTypes [AngleType1, AngleType2] As Long


This method retrieves the angle law types. The value range is similar to
the GetFirstAngleLaw method’s.
Sub GetFirstAngleLaw [Angle1, Angle2] As Angle, [LawType] As Long
This method retrieves the first angle law. The values can be edited with the Value method. The
value range of the “LawType” parameter is “1” (constant), “2” (linear), “3” (S-curve), and “4”
(advanced).

Sub GetLongitudinalRelimiters [Element1, Element2] As Reference


This method retrieves the relimiting elements of the spine curve (“Relimiter 1” and “Relimiter 2”
fields).
Sub GetNbAngle [Quantity] As Long
This method retrieves the number of angles.
Sub GetNbGuide [Quantity] As Long
This method retrieves the number of guides.
Sub GetNbRadius [Quantity] As Long
This method retrieves the number of radii.
Func GetRadius ([Index] As Long) As Length
This method retrieves the radius at a specified “Index” position. “Index” is “1” or “2.” The value
can be edited with the Value method.

Sub GetRelimiters [Relimiter1] As Reference, [Orientation1] As Long, [Relimiter2] As


Reference, [Orientation2] As Long
This method retrieves the relimiting elements of the spine curve and their orientation (“Relimiter
1” and “Relimiter 2” fields). The value range of the “Orientation” parameter is “0” (beginning of
spine) and “1” (end of spine).

Sub GetSecondAngleLaw [Angle1, Angle2] As Angle, [LawType] As Long


This method retrieves the second angle law (see GetFirstAngleLaw method).
Sub GetTangencyChoiceNo [Number, SurfaceOrientation, GuideOrientation] As Long
This method retrieves a sequence that identifies a solution from all possibilities of a circular
profile sweep tangent to a surface. The value range of the “Orientation” parameter is “1”
(original orientation), “–1” (inverted orientation), and “2” (no orientation).
GuideDeviation As Length (Read Only)
This property returns the deviation value from guide curves allowed during a sweeping
operation (unless the GuideDeviationActivity property is “True”).

GuideDeviationActivity As Boolean
This property returns or sets the state of the “Deviation from Guide(s)” option.
Mode As Long
This property returns or sets the circular sweep mode (“Subtype” field).

Value range:
0: Undefined mode
2: Three guides
3: Two guides and radius
5: Center and two angles
6: Center and radius
7: Two guides and tangency surface
8: Limit curve and tangency surface
RadiusLaw As Reference
This property or sets the radius law feature.

RadiusLawInversion As Long
This property returns or sets whether the radii rule is inverted. “1” indicates an inversion, “0”
indicates no inversion.

RadiusLawType As Long
This property returns or sets the radius law type. The value range is “1” (constant), “2” (linear),
“3” (S-curve), and “4” (advanced).

Reference As Reference
This property returns or sets the reference element.

Sub RemoveAngle
This method removes an angle.
Sub RemoveGuide
This method removes a guide curve.
Sub RemoveRadius
This method removes a radius.
SecondAngleLaw As Reference
This property returns or sets the second angle law. This property is not needed if the standard
CATIA laws are used (constant, linear, S-shaped).

SecondAngleLawInversion As Long
This property returns or sets whether the second angle law is inverted. “1” indicates an inversion,
“0” indicates no inversion.

SecondGuideCrv As Reference
This property returns or sets the second guide curve.

Sub SetAngle [Index] As Long, [Angle] As Double


This method sets the angle values at a specified “Index” position. “Index” is “1” or “2.” The angle
is measured in degrees.

Sub SetAngleLawTypes [AngleType1, AngleType2] As Long


This method sets the angle law of the first and second angle. The value range is similar to
the GetFirstAngleLaw method’s.
Sub SetFirstAngleLaw [Angle1, Angle2] As Double, [LawType] As Long
This method sets the first angle law. The angles are measured in degrees. “LawType”
corresponds to the “LawType” parameter of the GetFirstAngleLaw method’s. The angle law
element can be set as law type “4” with the FirstAngleLaw property.

Sub SetGuideDeviation [Length] As Double


This method sets the “Deviation from Guide(s)” value.
Sub SetLongitudinalRelimiters [Element1, Element2] As Reference
This method sets the relimiting elements of the spine curve (“Relimiter 1” and “Relimiter 2”
fields).
Sub SetRadius [Index] As Long, [Radius] As Double
This method sets the radius value at a specified “Index” position.

Sub SetRelimiters [Relimiter1] As Reference, [Orientation1] As Long, [Orientation2] As


Reference, [Orientierung2] As Long
This method sets the relimiting elements of the spine curve and their orientation (“Relimiter 1”
and “Relimiter 2” fields). The value range of the “Orientation” parameter is “0” (beginning of
spine) and “1” (end of spine).
Sub SetSecondAngleLaw [Angle1, Angle2] As Double, [LawType] As Long
This method sets the second angle law (see FirstAngleLaw method).
Sub SetSmoothAngleThreshold [Angle] As Double
This method sets the “Angular Correction.”
Sub SetTangencyChoiceNo [Number, SurfaceOrientation, GuideOrientation] As Long
This method sets a sequence that identifies a solution from all possibilities of a circular profile
sweep tangent to a surface. The value range of the “Orientation” parameter is “1” (original
orientation), “–1” (inverted orientation), and “2” (no orientation).
SmoothActivity As Boolean
This property returns or sets the state of the “Angular Correction” option.

SmoothAngleThreshold As Angle (Read Only)


This property returns or sets the angular threshold (“Angular Correction” field).
Spine As Reference
This property returns or sets the spine.

ThirdGuideCrv As Reference
This property returns or sets the third guide curve.

TrimOption As Long
This property returns or sets the trim state. The value range is “0” (no trim) and “1” (trim
enabled).

8.142 HybridShapeSweepConic

This class represents a conic sweep. An object of the class is created with
the AddNewSweepConic method of the HybridShapeFactory class (Section 8.85).
Object Path: AnyObject.HybridShape.HybridShapeSweep.HybridShapeSweepConic
CanonicalDetection As Long
This property returns or sets whether canonical surfaces are detected in the swept surface. If
the value is “0,” the option is disabled. If the value is “2,” the option is enabled.
FifthGuideCrv As Reference
This property returns or sets the fifth guide curve (refer to FirstGuideCrv).
FirstGuideCrv As Reference
This property returns or sets the first guide curve (“Guide Curve 1” field).

FourthGuideCrv As Reference
This property returns or sets the fourth guide curve (refer to FirstGuideCrv).
Sub GetLongitudinalRelimiters [Element1, Element2] As Reference
This method retrieves the relimiting elements of the spine curve (“Relimiter 1” and “Relimiter 2”
fields).

Sub GetNbGuides [Quantity] As Long


This method retrieves the number of guides.

Sub GetParameterLaw [StartValue, EndValue] As Double, [LawType] As Long


This method gets the parameter law. The value range of the law type is similar to
the ParameterLawType’s.

Sub GetRelimiters [Element1] As Reference, [Orientation1] As Long, [Element2] As


Reference, [Orientation2] As Long
This method retrieves the relimiting elements of the spine curve and their orientation. The
orientation can have a value of “0” for a standard orientation and “1” for an inverted orientation.

Sub GetTangency [Element] As Reference, [StartAngle, EndAngle] As Angle, [LawType,


Index] As Long
This method gets the tangency surface or curve and its angle at a specified “Index” position.
The value range of the law type is similar to that of ParameterLawType.

Sub GetTangencyAngleLawInversion [Index, Invert] As Long


This method gets whether the tangency angle law is inverted at a specified “Index” position. If
“Invert” is “0,” the law is not inverted.

Sub GetTangencyLaw [Element, Law] As Reference, [Index] As Long


This method gets the tangency surface or curve and its angle at a specified “Index” position.
“Element” is a reference to the contents of the “Tangency” field.
GuideDeviation As Length (Read Only)
This property returns the deviation value from the guide curves allowed during a sweeping
operation (“Deviation from Guide(s)” field).

GuideDeviationActivity As Boolean
This property returns or sets the state of the “Deviation from Guide(s)” option. If the value is
“True,” the option is enabled.

Parameter As Double
This property returns or sets the parameter for a conic sweep operation (“Parameter” field).

ParameterLaw As Reference
This property returns or sets the parameter law.

ParameterLawInversion As Boolean
This property returns or sets whether the parameter law is inverted (“True”) or not (“False”).

ParameterLawType As Long
This property returns or sets the parameter law type. The value range is “1” (constant), “2”
(linear), “3” (S-type), and “4” (advanced).

Sub RemoveGuide [Index] As Long


This method removes a guide curve at a specified “Index” position.

Sub RemoveParameter
This method removes a conical sweep parameter.

Sub RemoveTangency [Index] As Long


This method removes a tangency surface or curve (“Tangency” field) and its angle at a specified
“Index” position.

SecondGuideCrv As Reference
This property returns or sets the second guide curve (refer to FirstGuideCrv).
Sub SetGuideDeviation [Value] As Double
This method sets the value of the “Deviation from Guide(s)” field.

Sub SetLongitudinalRelimiters [Element1, Element2] As Reference


This method sets the relimiting elements of the spine curve (“Relimiter 1” and “Relimiter 2”
fields).

Sub SetParameterLaw [StartValue, EndValue] As Double, [LawType] As Long


This method sets the parameter law. The value range of the law type is similar to
the ParameterLawType’s.

Sub SetRelimiters [Element1] As Reference, [Orientation1] As Long, [Element2] As


Reference, [Orientation2] As Long
This method retrieves the relimiting elements of the spine curve and their orientation. The
orientation has the value “0” for a standard orientation and the value “1” for an inverted
orientation.

Sub SetSmoothAngleThreshold [Value] As Double


This method sets the value of the “Angular Correction” field.

Sub SetTangency [Element] As Reference, [StartAngle, EndAngle] As Angle, [LawType,


Index] As Long
This method sets the tangency surface or curve and its angle at a specified “Index” position.
The value range is “1” (constant), “2” (linear), “3” (S-curve), and “4” (advanced).

Sub SetTangencyAngleLawInversion [Index, Invert] As Long


This method sets whether the tangency angle law is inverted at a specified “Index” position. If
“Invert” is “0,” the law is not inverted.

Sub SetTangencyLaw [Element, Law] As Reference, [Index] As Long


This method sets the tangency surface or curve and its angle at a specified “Index” position.
“Element” is a reference to the contents of the “Tangency” fields.

SmoothActivity As Boolean
This property returns or sets the state of the “Angular Correction” option.

SmoothAngleThreshold As Angle (Read Only)


This property returns or sets the angular threshold (“Angular Correction” field).

Spine As Reference
This property returns or sets the spine.

ThirdGuideCrv As Reference
This property returns or sets the third guide curve (refer to FirstGuideCrv).
8.143 HybridShapeSweepExplicit

This class represents a sweep using an explicit profile (see Section 6.6). An object of the class
is created with the AddNewSweepExplicit method of the HybridShapeFactory class (Section
8.85).
Object Path: AnyObject.HybridShape.HybridShapeSweep.HybridShapeSweepExplicit

AngleLaw As Reference
This property returns or sets the angle law feature associated to the reference surface.
AngleLawInversion As Long
This property returns or sets whether the first angle law is inverted. “1” indicates an inversion, “0”
no inversion.

AngleLawType As Long
This property returns or sets the angle law type associated to the reference surface. The value
range is “1” (constant), “2” (linear), “3” (S-curve), and “4” (advanced).

Context As Long
This property returns whether the sweep is created as a surface (value “0”) or volume (value
“1”).
FirstGuideCrv As Reference
This property returns or sets the first guide curve.

Func GetAngleRef ([Index] As Long) As Angle


This method gets the angle value at a specified “Index” position. The index is “1” for the start
angle and “2” for the end angle. The value can be edited with the Value method.

Sub GetFittingPoints [FittingPoint1, FittingPoint2] As Reference


This method gets the fitting points located in the profile plane (“Fitting Point 1” and “Fitting Point
2” fields).

Sub GetLongitudinalRelimiters [Element1, Element2] As Reference


Refer to HybridShapeSweepCircle.
Sub GetNbAngle [Quantity] As Long
This method retrieves the number of angles.
Sub GetNbGuide [Quantity] As Long
This method retrieves the number of guides.
Func GetNbPosAngle As Long
This method gets the number of numerical positioning parameters corresponding to angles from
the default positions of the x-axis.
Func GetNbPosCoord As Long
This method gets the number of numerical positioning parameters corresponding to coordinates
of the new axis systems’ origins.
Func GetPosAngle ([Index] As Long) As Angle
This method gets both the profile and the first sweep plane axis systems from default positions.
Index “1” refers to the initial axis system, and index “2” refers to the target axis system. The
value can be edited with the Value method. The Mode property must equal “1” to use this
method.
Func GetPosCoord ([Index] As Long) As Length
This method gets the translation coordinates for both the profile axis system and the first sweep
plane axis system from default positions. Indices “1” and “2” refer to the parameters of the x-
and y-coordinates of the initial axis system. Indices “3” and “4” refer to the parameters of the x-
and y-coordinates of the target axis system. The values can be edited with the Value method.
The Mode property must equal “1” to use this method.

Func GetPosDirection ([Index] As Long) As HybridShapeDirection


This method gets the positioning directions. Index “1” indicates the initial axis system, and index
“2” indicates the target axis system. The Mode property must equal “1” to use this method. The
direction is determined by the SetPosDirection method.

Func GetPosPoint ([Index] As Long) As Reference


This method returns the points designated as the origins of the profile plane and first sweep
plane. Index “1” indicates the initial axis system, and index “2” indicates the target axis system.
The Mode property must equal “1” to use this method. The origin is determined by
the SetPosPoint method.

Func GetPosSwapAxes ([Index] As Long) As Long


This method gets the axes inversion from the previous definition for both the profile plane and
the first sweep plane. The return value is the “Mode” parameter of
the SetPosSwapAxes method. Index “1” indicates the initial axis system, and index “2”
indicates the target axis system. The method works only if you have previously made an
inversion with the SetPosSwapAxes method. The Mode property must equal “1” to use this
method.

Sub GetRelimiters [Relimiter1] As Reference, [Orientation1] As Long, [Relimiter2] As


Reference, [Orientation2] As Long
Refer to HybridShapeSweepCircle.
GuideDeviation As Length (Read Only)
Refer to HybridShapeSweepCircle.
GuideDeviationActivity As Boolean
Refer to HybridShapeSweepCircle.
GuideProjection As Boolean
This property returns or sets the state of the “Projection of the Guide Curve as Spine” option. If
the value is “True,” the option is enabled.
Sub IsSketchAxisUsedAsDefault [Value] As Boolean
This method queries whether a sketch axis is used as a default.

Mode As Long
This property returns or sets the positioning mode used for the profile (“Position Profile” check
box). If the value is “1,” the check box is enabled. If the value is “0,” the check box is disabled.

PositionedProfile As Reference
This property returns or sets the transformation associated to the explicit swept surface. The
transformation can be edited with the methods of the HybridShapePositionTransfo class
(Section 8.126).

PositionMode As Long
This property returns or sets the positioning mode. The value range is “0” (none or positioned)
and “1” (with positioning operation).
Profile As Reference
This property returns or sets the profile to be swept.

ProfileXAxisComputationMode As Long
This property returns or sets the computation mode of the x-axis of the initial axis system. The
value range is “0” (no x-axis specified), “1” (x-axis is tangent to the profile), and “2” (x-axis
specified by a direction).
PullingDirection As HybridShapeDirection
This property returns or sets the pulling direction.
Reference As Reference
This property returns or sets the reference surface.
Sub RemoveAngle
This method removes an angle.
Sub RemoveFittingPoints
This method removes the fitting points (“Fitting Point 1” and “Fitting Point 2” fields).
Sub RemoveGuide
This method removes a guide curve.
SecondGuideCrv As Reference
This property returns or sets the second guide curve.
Sub SetAngleRef [Index] As Long, [Angle] As Double
This method sets the angle values at a specified “Index” position. The index is “1” for the start
angle and “2” for the end angle.

Sub SetFittingPoints [FittingPoint1, FittingPoint2] As Reference


This method sets the fitting points located in the profile plane (“Fitting Point 1” and “Fitting Point
2” fields).

Sub SetGuideDeviation [Length] As Double


This method sets the “Deviation from Guide(s)” value.
vSub SetLongitudinalRelimiters [Element1, Element2] As Reference
This method sets the relimiting elements of the spine curve (“Relimiter 1” and “Relimiter 2”
fields).
Sub SetPosAngle [Index] As Long, [Value] As Double
This method sets the angles of both the profile and the first sweep plane axis systems from
default positions. The value range of the index is “1” (initial axis system) and “2” (target axis
system). The Mode property must equal “1” to use this method.

Sub SetPosCoord [Index] As Long, [Value] As Double


This method sets the translation coordinates for both the profile axis system and the first sweep
plane axis system from their default positions. Indices “1” and “2” refer to the parameters of the
x- and y-coordinates of the initial axis system. Indices “3” and “4” refer to the parameters of the
x- and y-coordinates of the target axis system. The Mode property must equal “1” to use this
method.

Sub SetPosDirection [Index] As Long, [Direction] As HybridShapeDirection


This method sets the positioning directions of the profile plane or first sweep plane x-axis
direction. If “Index” equals “1,” the direction element is read from the initial axis system. If “Index”
equals “2,” the direction element is read from the target axis system. The Mode property must
equal “1” to use this method.

Sub SetPosPoint [Index] As Long, [Point] As Reference


This method sets the points designated as the origins of the profile plane and first sweep plane.
The value range of the index is “1” (initial axis system) and “2” (target axis system).
The Mode property must equal “1” to use this method.

Sub SetPosSwapAxes [Index, Mode] As Long


This method sets the axes inversion from the previous definition for both the profile plane and
the first sweep plane. Index “1” indicates the initial axis system, and index “2” indicates the
target axis system. The Modeproperty must equal “1” to use this method. The value range for
the “Mode” parameter is “0” (no inverted axis), “1” (x-axis inverted), “2” (y-axis inverted), and “3”
(both axes inverted).

Sub SetRelimiters [Relimiter1] As Reference, [Orientation1] As Long, [Relimiter2] As


Reference, [Orientation2] As Long
Refer to HybridShapeSweepCircle.
Sub SetSmoothAngleThreshold [Angle] As Double
This method sets the “Angular correction.”
SmoothActivity As Boolean
This property returns or sets the state of the “Angular Correction” option.

SmoothAngleThreshold As Angle (Read Only)


This property returns or sets the angular threshold (“Angular Correction” field).
SolutionNo As Long
This property returns or sets the solution number. If there are several solutions, the solution can
be selected with this property.
Spine As Reference
This property returns or sets the spine.

SubType As Long
This property returns or sets the subtype (“Subtype” field). The value range is “1” (reference
surface), “2” (two guide curves), and “3” (pulling direction).
Sub UseSketchAxisAsDefault [Value] As Boolean
This method sets whether the sketch axis is used as the default (value equals “True”).

8.144 HybridShapeSweepLine

This class represents a sweep using a line (see Section 6.6). An object of the class is created
with the AddNewSweepLine method of the HybridShapeFactory class (Section 8.85).
Object Path: AnyObject.HybridShape.HybridShapeSweep.HybridShapeSweepLine
Sub AddDraftAngleDefinitionLocation [LocationElement] As Reference, [Angle] As
Double
This method adds a draft angle location.
AngleLaw As Reference
This property returns or sets the angle law used to define the angle profile along the sweep.
AngleLawInversion As Long
This property returns or sets whether the first angle law is inverted. “1” indicates an inversion, “0”
no inversion.

AngleLawType As Long
This property returns or sets the angle law type associated to the reference surface. The value
range is “1” (constant), “2” (linear), “3” (S-curve), and “4” (advanced).

CanonicalDetection As Long
This property returns or sets whether canonical surfaces are detected in the swept surface. If
the value is “0,” the option is disabled. If the value is “2,” the option is enabled.

Context As Long
This property returns or sets whether the sweep is a surface (value equal to “0”) or a volume
(value equal to “1”).
DraftComputationMode As Long
This property returns or sets the computation mode of the draft angles. The value range is “0”
(square) and “2” (cone).
DraftDirection As HybridShapeDirection
This property returns or sets the draft direction (“Draft Direction” field).
FirstGuideCrv As Reference
This property returns or sets the first guide curve (“Guide Curve 1” field).

FirstGuideSurf As Reference
This property returns or sets the first guide surface.

FirstLengthLaw As Reference
This property returns or sets the first length law.

FirstLengthLawInversion As Long
This property returns or sets whether the first length law is inverted. “1” indicates an inversion,
“0” no inversion.

Func GetAngle ([Index] As Long) As Angle


This method returns the angle values at a specified “Index” position. “Index” is “1” or “2.” The
value can be edited with the Value method.

Sub GetAngularLaw [StartAngle, EndAngle] As Angle, [AngleLaw] As Long


This method retrieves the angular law. The value range of the angle law is similar to
the AngleLawType property’s.
Sub GetChoiceNbSurfaces [SurfaceOrientation1, SurfaceOrientation2, SurfaceCoupling1,
SurfaceCoupling2, SolutionNumber] As Long
This method gets a sequence that identifies a solution from all possibilities. The value range of
the first four parameters is “−1,” “0,” “1,” and “2.” The solution number is the index of the solution
in the list of possible solutions.
Sub GetChoiceNo [Index1, Index2, Index3] As Long
This method retrieves the choice number associated with each solution of a given linear sweep.
“Index1” returns the number of the solution (1 to n). “Index2” returns the shell orientation (−1, 1,
or 0 for both directions), and “Index3” returns the wire orientation (−1, 1, or 0 for both directions).

Sub GetDraftAngleDefinitionLocation [Index] As Long, [LocationElement] As Reference,


[Angle] As Angle
This method retrieves the draft angle location element at a specified “Index” position.
Sub GetDraftAngleDefinitionLocationsNb [Quantity] As Long
This method retrieves the draft angle location list size.
Sub GetFirstLengthDefinitionType [Type] As Long, [Element] As Reference
This method retrieves the first length definition type. The value range of “Type” is “0” (undefined),
“1” (length of the swept line), “2” (no numerical value is required), “3” (up to or from a
geometrical reference), “4” (only for draft surfaces, the length is computed in the draft direction),
and “5” (only for draft surfaces, parallel curve distance on the swept surface).

Sub GetFirstLengthLaw [StartLength, EndLength] As Length, [LawType] As Long


This method retrieves the start length, end length, and length law of the first length. The values
can be edited with the Value method. The value range of the “LawType” parameter is: “1”
(constant), “2” (linear), “3” (S-curve), and “4” (advanced).

Func GetLength ([Index] As Long) As Length


This method gets the length values at a specified “Index” position (“Length 1” and “Length 2”
fields). The index is “1” for the first length and “2” for the second length. The values can be
edited with the Value method.

Sub GetLengthLawTypes [LengthLawType1, LengthLawType2] As Long


This method gets the length law types of the first and second lengths. The value range of the
law type is similar to the GetFirstLengthLaw method’s.

Sub GetLongitudinalRelimiters [Element1, Element2] As Reference


This method retrieves the relimiting elements of the spine curve (“Relimiter 1” and “Relimiter 2”
fields).
Sub GetNbAngle [Quantity] As Long
This method retrieves the number of angles.
Sub GetNbGuideCrv [Quantity] As Long
This method retrieves the number of guide curves.
Sub GetNbGuideSur [Quantity] As Long
This method retrieves the number of guide surfaces.
Sub GetNbLength [Quantity] As Long
This method retrieves the number of lengths.
Sub GetRelimiters [Relimiter1] As Reference, [Orientation1] As Long, [Relimiter2] As
Reference, [Orientation2] As Long
Refer to HybridShapeSweepCircle.
Sub GetSecondLengthDefinitionType [Type] As Long, [Element] As Reference
This method retrieves the second length definition type. Refer
to GetFirstLengthDefinitionType.
Sub GetSecondLengthLaw [StartLength, EndLength] As Length, [LawType] As Long
This method retrieves the start length, end length, and length law of the second length. Refer
to GetFirstLengthLaw.
GuideDeviation As Length (Read Only)
This property returns the deviation value from guide curves allowed during a sweeping
operation (unless the GuideDeviationActivity property is “True”).
GuideDeviationActivity As Boolean
This property returns or sets the state of the “Deviation from Guide(s)” option.
Sub InsertDraftAngleDefinitionLocation [LocationElement], [Angle] As Angle, [Index] As
Long
This method inserts a geometrical element and a value necessary for draft angle definition after
a specified “Index” position.
Mode As Long
This property returns or sets the linear sweep mode. The value range is “0” (undefined), “1” (two
guide curves), “2” (guide curve and an angle), “3” (guide curve and a middle curve), “4” (guide
curve and an angle from a reference surface), and “5” (guide curve and a tangency surface).

Sub RemoveAllDraftAngleDefinitionLocations
This method removes all geometrical elements and values necessary for draft angle definition.
Sub RemoveAngle
This method removes an angle.
Sub RemoveDraftAngleDefinitionLocationPosition [Index] As Long
This method removes a draft angle location at a specified “Index” position.
Sub RemoveGuideCrv
This method removes a guide curve.
Sub RemoveGuideSur
This method removes a guide surface.
Sub RemoveLength
This method removes a length.
SecondGuideCrv As Reference
This property returns or sets the second guide curve (“Guide Curve 2” field).

SecondGuideSurf As Reference
This property returns or sets the second reference surface.

SecondLengthLaw As Reference
This property returns or sets the second length law. Refer to FirstLengthLaw.
SecondLengthLawInversion As Long
This property returns or sets whether the second length law is inverted. “1” indicates an
inversion, “0” no inversion.

Sub SetAngle [Index] As Long, [Angle] As Double


This method sets the angle values at a specified “Index” position. “Index” is “1” or “2.” The angle
is measured in degrees.

Sub SetAngularLaw [StartAngle, EndAngle] As Angle, [AngleLaw] As Long


This method sets the angular law. The value range of the angle law is similar to
the AngleLawType property’s.

Sub SetChoiceNbSurfaces [SurfaceOrientation1, SurfaceOrientation2, SurfaceCoupling1,


SurfaceCoupling2, SolutionNumber] As Long
This method sets a sequence that identifies a solution from all possibilities. The value range of
the first four parameters is “−1,” “0,” “1,” and “2.” The solution number is the index of the solution
in the list of possible solutions.
Sub SetChoiceNo [Index1, Index2, Index3] As Long
This method sets the choice number associated with each solution of a given linear sweep.
“Index1” returns the number of the solution (1 to n). “Index2” returns the shell orientation (−1, 1,
or 0 for both directions) and “Index3” returns the wire orientation (−1, 1, or 0 for both directions).

Sub SetFirstLengthDefinitionType [Type] As Long, [Element] As Reference


This method sets the first length definition type. Refer to GetFirstLengthDefinitionType.
Sub SetFirstLengthLaw [StartLength, EndLength] As Length, [LawType] As Long
This method sets the start length, end length, and length law of the first length. The value range
of the “LawType” parameter corresponds to the GetFirstLengthLaw method. If “LawType” is “4,”
the length of the law element is set with the FirstLengthLaw property.

Sub SetGuideDeviation [Length] As Double


This method sets the “Deviation from Guide(s)” value.
Sub SetLength [Index] As Long, [Length] As Double
This method sets the value of the length parameter at a specified “Index” position (“Length 1”
and “Length 2” fields). The index is “1” for the first length and “2” for the second length.

Sub SetLengthLawTypes [LengthLawType1, LengthLawType2] As Long


This method sets the length law types of the first and second lengths. The value range of the
law type is similar to the GetFirstLengthLaw method’s.
Sub SetLongitudinalRelimiters [Element1, Element2] As Reference
This method sets the relimiting elements of the spine curve (“Relimiter 1” and “Relimiter 2”
fields).
Sub SetRelimiters [Relimiter1] As Reference, [Orientation1] As Long, [Relimiter2] As
Reference, [Orientation2] As Long
Refer to HybridShapeSweepCircle.
Sub SetSecondLengthDefinitionType [Type] As Long, [Element] As Reference
This method sets the second length definition type. Refer to GetFirstLength-DefinitionType
Sub SetSecondLengthLaw [StartLength, EndLength] As Length, [LawType] As Long
This method sets the start length, end length, and length law of the second length. Refer
to GetFirstLengthLaw.
Sub SetSmoothAngleThreshold [Angle] As Double
This method sets the “Angular Correction.”
SmoothActivity As Boolean
This property returns or sets the state of the “Angular Correction” option.

SmoothAngleThreshold As Angle (Read Only)


This property returns or sets the angular threshold (“Angular Correction” field).
SolutionNo As Long
This property returns or sets the solution number. If there are several solutions, the solution can
be selected with this property.
Spine As Reference
This property returns or sets the spine (“Spine” field).

TrimOption As Long
This property returns or sets the trim state. The value range is “0” (no trim) and “1” (trim
enabled).

8.145 HybridShapeSymmetry
This class represents a symmetrical transformation (see Section 6.7). An object of the class is
created with the AddNewSymmetry method of the HybridShapeFactory class (Section 8.85).
Object Path: AnyObject.HybridShape.HybridShapeSymmetry
CreationMode As Boolean
This property returns or sets the creation mode. “True” is a creation feature; “False” is a
modification feature.
ElemToSymmetry As Reference
This property returns or sets the element to transform (“Element” field).

Reference As Reference
This property returns or sets the reference element (“Reference” field).

VolumeResult As Boolean
This property returns or sets the resulting element as a volume (“True”) or a surface (“False”).

8.146 HybridShapeThickness

This class represents a thickness. An object of the class is created with


the AddNewThickness method of the HybridShapeFactory class (Section 8.85).
Object Path: AnyObject.HybridShape.HybridShapeThickness
Orientation As Long
This property returns or sets the thickness orientation. If the value is “1,” the thickness is in the
direction of the surface orientation. If the value is “–1,” the thickness is inverted.

Thickness1 As Double
This property returns or sets the first thickness value in the first direction.

Thickness1Value As Length (Read Only)


This property returns the first thickness value (“Thickness 1” field).

Thickness2 As Double
This property returns or sets the second thickness value in the second direction
(see Thickness1).
Thickness2Value As Length (Read Only)
This property returns the first thickness value (“Thickness 2” field). Refer to Thickness1Value.

8.147 HybridShapeTranslate

This class represents a translation of geometry (see Section 6.7). An object of the class is
created with the AddNewEmptyTranslate or AddNewTranslate methods of
the HybridShapeFactory class (Section 8.85).
Object Path: AnyObject.HybridShape.HybridShapeTranslate
CoordXValue As Double
This property returns or sets the translate x-coordinate value (“X” field). This property is
available only when the VectorType property is “2.”

CoordYValue As Double
This property returns or sets the translate y-coordinate value (refer to CoordXValue).
CoordZValue As Double
This property returns or sets the translate z-coordinate value (refer to CoordXValue).
Direction As HybridShapeDirection
This property returns or sets the direction of a translation (“Direction” field). This property is
available only when the VectorType property is “0.”

Distance As Length (Read Only)


This property returns or sets the distance (“Distance” field). This property is available only when
the VectorType property is “0.”

DistanceValue As Double
This property returns or sets the distance value (“Distance” field). This property is available only
when the VectorType property is “0.”
ElemToTranslate As Reference
This property returns or sets the element to translate (“Element” field).

FirstPoint As Reference
This property returns or sets the start point (“Start Point” field). This property is available only
when the VectorType property is “1.”

Func GetCreationMode As Long


This method gets the creation mode. The value range is “0” (default), “1” (creation mode), and
“2” (modification mode).
RefAxisSystem As Reference
This property returns or sets the reference axis system (“Axis System” field) when
the VectorType property is “2.” If the property is not filled, the absolute axis system is used.
SecondPoint As Reference
This property returns or sets the end point (refer to FirstPoint).
Func SetCreationMode As Long
This method sets the creation mode. The value range is “True” (creation mode) and “False”
(modification mode).
VectorType As Long
This property returns or sets the vector type (“Vector Definition” field). The values of the
property are “0” for “Direction, Distance,” “1” for “Point to Point,” and “2” for “Coordinates.”

VolumeResult As Boolean
This property returns or sets the resulting element as a volume (“True”) or a surface (“False”).
8.148 HybridShapeTrim

This class represents a trim (see Section 6.8). An object of the class is created with
the AddNewHybridTrim method of the HybridShapeFactory class (Section 8.85).
Object Path: AnyObject.HybridShape.HybridShapeTrim
Sub AddElementToKeep [Element] As Reference
This method adds an element to the list of elements to be kept (“Elements to Keep” field).
Sub AddElementToRemove [Element] As Reference
This method removes an element from the list of elements to be kept (“Elements to Remove”
field).
AutomaticExtrapolationMode As Boolean
This property gets or sets the state of the “Automatic Extrapolation” option. If the value is “True,”
the option is enabled.
Connex As Boolean
This property gets or sets the state of the “Check Connexity” option if the Mode property is “2.”
If the value is “True,” the option is enabled.
FirstElem As Reference
This property returns or sets the first element (“Element 1” field).

FirstOrientation As Long
This property returns or sets the first element to be trimmed. If the orientation value is “1,” kept
parts are specified by the direction vector of the cutting element or the cross product of two
vectors. When two curves are used, the first portion of the curve remains. If the value is “–1,”
the other side will remain.

Func GetElem ([Index] As Long) As Reference


This method returns an element at a specified “Index” position from the “Trimmed Elements” list.
Func GetKeptElem ([Index] As Long) As Reference
This method returns an element at a specified “Index” position from the “Elements to Keep” list.
Func GetNbElem As Long
This method gets the number of elements in the “Trimmed Elements” list.
Func GetNbElementsToKeep As Long
This method gets the number of elements to keep in the “Elements to Keep” list.
Func GetNbElementsToRemove As Long
This method gets the number of elements to remove in the “Elements to Remove” list.
Func GetNextOrientation ([Index] As Long) As Long
This method gets the orientation used to compute the trim, referring to the next trimmed element,
at a specified “Index” position (“Other Side/Next Element” button).
Func GetNextOrientation ([Index] As Long) As Long
This method gets a portion to keep at a specified “Index” position. The value range is “1” (front
part) and “2” (rear part). This property is available only when the Mode property is “2.”
Func GetPreviousOrientation ([Index] As Long) As Long
This method gets the orientation used to compute the trim, referring to the previous trimmed
element, at a specified “Index” position (“Other Side/Next Element” button). The value range is
“1” (natural orientation) and “–1” (inverted orientation).
Func GetRemovedElem ([Index] As Long) As Reference
This method gets the element at a specified “Index” position from the “Elements to Remove” list.
IntersectionComputation As Boolean
This property gets or sets the state of the “Intersections Computation” option. If the value is
“True,” the option is enabled.
Sub InvertFirstOrientation
This method inverts the first orientation of the trim.

Sub InvertSecondOrientation
This method inverts the second orientation.
Manifold As Boolean
This property gets or sets the state of the “Check Manifold” option when the Mode property is
“2.” If the value is “True,” the option is enabled.
Mode As Long
This property gets or sets the trim mode (“Mode” field). The value range is “1” (Standard) and “2”
(Pieces).
Sub RemoveElementToKeep [Index] As Long
This method removes an element at a specified “Index” position from the “Elements to Keep” list.
Sub RemoveElementToRemove [Index] As Long
This method removes an element at a specified “Index” position from the “Elements to Remove”
list.
SecondElem As Reference
This property returns or sets the second element (“Element 2” field).

FirstOrientation As Long
This property returns or sets the second element to be trimmed. If the orientation value is “1,”
kept parts are specified by the direction vector of the cutting element or the cross product of two
vectors. When two curves are used, the first portion of the curve remains. If the value is “–1,”
the other side will remain.

Sub SetElem [Index] As Long, [Element] As Reference


This method modifies the trimmed feature at a specified “Index” position from the “Trimmed
Elements” list.
Sub SetNextOrientation [Index, Orientation] As Long
Refer to GetNextOrientation.
Sub SetPortionToKeep [Index, Side] As Long
Refer to GetPortionToKeep.
Sub SetPreviousOrientation [Index, Orientation] As Long
Refer to GetPreviousOrientation.
Simplify As Boolean
This property returns or sets whether the simplification of the resulting topology is or should be
activated (simplified: “True,” not simplified: “False”).

Support As Reference
This property returns or sets the support (“Support” field).
8.149 Hyperbola2D

This class represents a 2D hyperbola (see Chapter 5). An object of this class is created with
the CreateHyperbola method of the Factory2D class (Section 8.35).
Object Path: AnyObject.GeometricElement.Geometrie2D.Curve2D.Hyperbola2D
Sub GetAxis [Unit Vector] As CATSafeArrayVariant
This method returns the axis vector direction of the hyperbola in 2D space.

Sub GetCenter [Point] As CATSafeArrayVariant


This method returns the asymptomatic center coordinates of the hyperbola in 2D space.

ImaginaryRadius As Double (Read Only)


This property returns the minor radius of the hyperbola in 2D space.

Radius As Double (Read Only)


This property returns the major radius of the hyperbola in 2D space.

Sub SetData [X, Y, DX, DY, A, B] As Double


This method modifies the characteristics of the hyperbola. The asymptomatic center is (X, Y),
and the opening direction is (DX, DY). The major and minor radii are “A” and “B.”

8.150 Intersect

This class represents a solid created by the “Intersection” Boolean operation (see Section 3.3.4).
An object of this class is derived with the AddNewIntersect method of the ShapeFactory class
(Section 8.199).
Object Path: AnyObject.Shape.BooleanShape.Intersect
This class does not have any properties or methods. The properties and methods of the parent
classes are used.
8.151 IntParam

This class represents an “Integer” parameter type (see Section 3.4.1). An object of this class is
created with the CreateInteger method of the Parameters class (Section 8.167).
Object Path: AnyObject.Parameter.IntParam
Sub GetEnumerateValues [Values] As CATSafeArrayVariant
This method returns an array containing the different values that the IntParam can take in the
case of multiple values.

Func GetEnumerateValuesSize As Long


This method returns the number of enumerate values.

RangeMax As Double
This property returns or sets the value of the upper bound that the parameter object value can
take.

RangeMaxValidity As Long
This property returns or sets the type of the upper bound of the parameter. The value range is
“0” (upper bound is meaningless), “1” (upper bound can be reached), and “2” (upper bound
cannot be reached).

RangeMin As Double
This property returns or sets the value of the lower bound that the parameter object value can
take.

Sub SetEnumerateValues [Values] As CATSafeArrayVariant


This method sets an array containing the different values that the integer parameter can take in
the case of multiple values.

Sub SuppressEnumerateValues
This method resets the status of the parameters to a single value parameter.

Value As Long
This property returns or sets the value of the integer parameter.

8.152 KnowledgeObject
This class provides the methods to assign all knowledge-based elements for a group of child
classes. A major object of this child class is the Relation class (Section 8.183).
Object Path: AnyObject.KnowledgeObject
Hidden As Boolean
This property returns or sets whether a relation is visible (“True”) or hidden (“False”) in the
specification tree.

IsConst As Boolean
This property returns or sets whether the relation is a constant. For example, this property is
normally “False” in a design table. If the property is “True,” the configuration of the table cannot
be changed.

8.153 KnowledgeActivateObject
This class provides the methods to assign all knowledge-based elements for a group of child
classes. A major object of this child class is the Relation class (Section 8.183).
Object Path: AnyObject.KnowledgeObject.KnowledgeActivateObject
Sub Activate
This method activates a relation.

Activated As Boolean (Read Only)


This property returns or sets whether a relation is activated (“True”) or not (“False”).

Sub Deactivate
This method deactivates a relation.

8.154 Length
This class represents a length parameter (see Section 3.4.1). An object of this class is created
with the CreateDimension method of the Parameters class (Section 8.167).
Object Path: AnyObject.Parameter.RealParam.Dimension.Length
This class does not have any properties or methods. The properties and methods of the parent
classes are used.

8.155 Limit
This class represents a limit definition. A limit is not a geometric element.
Object Path: AnyObject.Limit
Dimension As Length (Read Only)
This property returns or sets the limit dimension if the LimitMode property is “catOffsetLimit.”
The value can be edited with the Value method.

LimitingElement As Reference
This property returns or sets the limiting element if the LimitMode property is
“catUpToPlaneLimit” or “catUpToSurfaceLimit.”

LimitMode As CATLimitMode
This property returns or sets the limit mode. The value range is “0” (catOffsetLimit), “1”
(catUpToNextLimit), “2” (catUpToLastLimit), “3” (catUpToPlaneLimit), “4” (catUpToSurfaceLimit),
and “5” (catUpThruNextLimit).

8.156 Line

This class represents a 3D line (see Section 6.3). This class is the parent class of all 3D lines
whose objects are created with the “AddNewLine…” methods HybridShapeFactory
class (Section 8.85).
Object Path: AnyObject.HybridShape.Line
FirstUptoElem As Reference
This property gets the first up-to element of the line.
Sub GetDirection [Unit Vector] As CATSafeArrayVariant
This method returns the unit vector pointing in the direction of the line.

Sub GetOrigin [Coordinates] As CATSafeArrayVariant


This method returns the coordinates of the origin of the line.

Sub PutDirection [Unit Vector] As CATSafeArrayVariant


This method sets the unit vector pointing in the direction of the line.

SecondUptoElem As Reference
This property gets the second up-to element of the line.

8.157 Line2D

This class represents a 2D line in a sketch or drawing (see Chapter 5). An object of the class is
created with the CreateLine or CreateLineFromVector methods of the Factory2D
class (Section 8.35).
Object Path: AnyObject.GeometricElement.Geometry2D.Curve2D.Line2D
Sub GetDirection [Unit Vector] As CATSafeArrayVariant
This method returns the unit vector pointing in the direction of the line.

Sub GetOrigin [Point] As CATSafeArrayVariant


This method returns a point lying on the line as a field variable. This field contains the x- and y-
coordinates of the point.

Sub SetData [X, Y, DX, DY] As Double


This method modifies the characteristics of the infinite line. The position is described by a point
(X, Y) and a vector (DX, DY). The length of the line is not changed when changing the
orientation.

8.158 LinearRepartition
This class represents the replication parameters of a linear pattern. An object of the class is a
property of the RectPattern (Section 8.180) or CircPattern (Section 8.15) classes.
Object Path: AnyObject.Repartition.LinearRepartition
Spacing As Length (Read Only)
This property returns the distance between the instances of the linear pattern.
8.159 Loft

This class represents a solid that is defined by multiple sketches (see Section 7.2). An object of
the class is created with the AddNewLoft or AddNewRemovedLoft methods of
the ShapeFactory class (Section 8.199).
Object Path: AnyObject.Shape.Loft
HybridShape As HybridShapeLoft (Read Only)
This property returns the underlying surface of the solid body.
8.160 Mirror

This class represents a solid resulting from a mirror (see Section 7.4). An object of the class is
created with the AddNewMirror method of the ShapeFactory class (Section 8.199).
Object Path: AnyObject.Shape.TransformationShape.Mirror

Sub AddObjectToMirror [Object] As AnyObject


This method adds an element to be mirrored.

MirroringObject As AnyObject (Read Only)


This property returns the mirroring object (“Object to Mirror” field).

MirroringPlane As Reference
This property returns or sets the mirroring reference plane (“Mirroring Element” field), which can
be a plane or a face of a solid. If a face is used, it is referred to as a “Removed Surface”
(RSur). Section 3.5.4.

8.161 OrderedGeometricalSet
This class represents an ordered geometrical set. An object of the class is derived by using
the Add or Item properties of the OrderedGeometricalSets class (see Section 8.162).
Object Path: AnyObject.OrderedGeometricalSet
Bodies As Bodies (Read Only)
This property returns the ordered geometrical set’s “Bodies” collection.

OrderedGeometricalSets As OrderedGeometricalSets (Read Only)


This property returns the ordered geometrical set’s OrderedGeometricalSets collection. Child
sets are not included.
OrderedSketches As Sketches (Read Only)
This property returns the ordered geometrical set’s “Sketches” collection. The elements of the
first and child hierarchy levels of a set are taken into account.

Sub InsertHybridShape [Object] As HybridShape


This method inserts a hybrid shape in the ordered geometrical set (see Section 6.1). If geometry
is created, the method may not be executed a second time.

8.162 OrderedGeometricalSets
This class represents a collection of OrderedGeometricalSet objects. An object of the class is
derived by using the OrderedGeometricalSets properties of the Body (Section
8.9), OrderedGeometricalSet(Section 8.161), or Part (Section 8.168) classes.
Object Path: Collection.OrderedGeometricalSets
Func Add As OrderedGeometricalSet
This method creates a new ordered geometrical set and adds it to
the OrderedGeometricalSets collection.

Func Item ([Index] As CATVariant) As OrderedGeometricalSet


This method returns an ordered geometrical set at a specified “Index” position or its name from
the ordered geometrical set collection.

8.163 OriginElements

This class represents the origin elements of a CATPart (Section 3.2). An object of the class is
derived with the OriginElements property of the Part class (Section 8.168).
Object Path: AnyObject.OriginElements
PlaneXY As AnyObject (Read Only)
This property returns the XY plane of the part.

PlaneYZ As AnyObject (Read Only)


This property returns the YZ plane of the part.

PlaneZX As AnyObject (Read Only)


This property returns the XZ plane of the part.

8.164 Pad

This class represents a pad (see Section 7.2). An object of the class is created with
the AddNewPad or AddNewPadFromRef methods of the ShapeFactory class (Section 8.199).
Object Path: AnyObject.Shape.SketchBasedShape.Prism.Pad
This class does not have any properties or methods. The properties and methods of the parent
classes are used.

8.165 Parabola2D

This class represents a 2D parabola (see Chapter 5). An object of the class is created with
the CreateParabola method of the Factory2D class (Section 8.35).
Object Path: AnyObject.GeometricElement.Geometrie2D.Curve2D.Parabola2D
FocalDistance As Double (Read Only)
This property returns the focal distance of the parabola in 2D space.
Sub GetAxis [Unit Vector] As CATSafeArrayVariant
This method returns the axis vector direction of the parabola in 2D space.

Sub SetData [X, Y, DX, DY, F] As Double


This method modifies the caracteristics of the parabola. The vertex is (X, Y), the opening
direction is (DX, DY), and the focus is “F.”

8.166 Parameter

This class represents a CATIA parameter (see Section 3.4.1). This class is the parent class and
provides the basic methods for all CATIA parameters. A list of parameters represented by
the Parameter class is shown in Section 8.167.
Object Path: AnyObject.Parameter
Comment As CATBSTR
This property returns or sets the parameter object comment.

Context As AnyObject (Read Only)


This property returns the context of the parameter (Part, Product …).
Hidden As Boolean
This property returns or sets whether a parameter is visible (“False”) or hidden (“True”) in the
specification tree.

IsTrueParameter As Boolean (Read Only)


This property returns whether a parameter is an original parameter (e.g. real, string, length) or a
geometrical parameter. If the parameter is an original parameter, the value of the property is
“True.”
OptionalRelation As Relation (Read Only)
This property returns the relation (formula) that can be used to compute the parameter. If there
is no relation, the value “Null” is returned.

ReadOnly As Boolean (Read Only)


This property returns whether the parameter can be modified (read only: “True”).

Sub Rename [Name] As CATBSTR


This method renames the parameter.
Renamed As Boolean (Read Only)
This property returns whether the parameter has been renamed. If the parameter was renamed,
the value is “True.”
UserAccessMode As Long (Read Only)
This property returns the user access mode of the parameter. If the value is “0,” the parameter
is read-only and cannot be deleted. If the value is “1,” the parameter can be read and written,
but not deleted. If the value is “2,” the user has full access to the parameter.

Sub ValuateFromString [Value] As CATBSTR


This method sets the value of a parameter.

Func ValueAsString As CATBSTR


This method returns the value of the parameter as a string.

8.167 Parameters

This class represents the parameters collection (see Section 3.4.1). An object of the class is
derived with the Parameters property of the Part class (Section 8.168).
Object Path: Collection.Parameters
Func CreateBoolean ([Name] As CATBSTR, [Value] As Boolean) As BoolParam
This method creates a Boolean parameter and adds it to the part’s parameters collection.

Func CreateDimension ([Name, Type] As CATBSTR, [Value] As Double) As Dimension


This method creates a user dimension and adds it to the part’s parameters collection. “Type”
can represent a length (“Length”) or an angle (“Angle”).

Func CreateInteger ([Name] As CATBSTR, [Value] As Long) As IntParam


This method creates an integer parameter and adds it to the part’s parameters collection.

Func CreateList ([Name] As CATBSTR) As ListParameter


This method creates a list parameter and adds it to the part’s parameters collection.
Func CreateReal ([Name] As CATBSTR, [Value] As Double) As RealParam
This method creates a real parameter and adds it to the part’s parameters collection.

Sub CreateSetOfParameters [Parent Object] As AnyObject


This method creates a set of parameters and assigns it to a parent object. The set of
parameters is grouped logically.

Func CreateString ([Name, Value] As CATBSTR) As StrParam


This method creates a string parameter and adds it to the part’s parameters collection.

Func GetNameToUseInRelation ([Object] As AnyObject) As CATBSTR


This method returns a correct name of a feature to use it in a relation.

Func Item ([Index] As CATVariant) As Parameter


This method returns a parameter at a specified “Index” position. “Index” can be described by a
number or the name of a parameter.

Func Item ([Index] As CATVariant) As Parameter


This method removes a parameter at a specified “Index” position from the parameters collection.
“Index” can be described by a number or the name of a parameter.

RootParameterSet As ParameterSet (Read Only)


This property returns the root parameter set of a document.
Func SubList ([Object] As AnyObject, [Recursive] As Boolean) As Parameters
This method returns a sub-collection of parameters aggregated to an “Object.” “Recursive”
controls whether the parameters of the child objects are included (child objects included: “True”).

Units As CATIAUnits
This property returns the collection of units. The CATIAUnits class uses the methods of
the Collection class (Section 8.17).

8.168 Part

This class represents the contents of a CATPart (see Section 1.10.3). The bodies and
geometrical sets of CATParts can be accessed through the properties and methods of this class.
An object of the class is derived with the Part property of the PartDocument class (Section
8.169).
Object Path: AnyObject.Part
Sub Activate [Object] As AnyObject
This method enables an object for the update process. After an execution of this method,
recalculate the CATPart with the Update method.

AnnotationSets As Collection (Read Only)


This property returns the collection object containing the annotation sets of the CATPart.

AxisSystems As AxisSystems (Read Only)


This property returns the collection object containing the axis systems of the CATPart.

Bodies As Bodies (Read Only)


This property returns the collection object containing the bodies. It will search all hierarchy
levels. No body is omitted.

Constraints As Constraints (Read Only)


This property returns the collection object containing the part constraints.

Func CreateReferenceFromBRepName ([BRepName] As CATBSTR, [Object] As


AnyObject) As Reference
This method creates a reference from a “Boundary Representation” label (Section 3.5.4).

Func CreateReferenceFromGeometry ([Geometry] As AnyObject) As Reference


This method creates a reference to a geometric object (Section 3.5.1).

Func CreateReferenceFromName ([IDName] As CATBSTR) As Reference


This method creates a reference to an object by its name (Section 3.5.3).

Func CreateReferenceFromObject ([Object] As AnyObject) As Reference


This method creates a reference to an object (Section 3.5.2).

Density As Double (Read Only)


This property returns the part density. This is not the density that appears in the “Part Properties”
dialog, but the measured density of all bodies in the CATPart. If the material is applied to the
CATPart, the material of the individual bodies is not considered.

Func CreateReferenceFromName ([IDName] As CATBSTR) As Reference


This method finds an object that is not a collection by its name.

GeometricElements As GeometricElements (Read Only)


This property returns the collection object containing the geometrical elements of the CATPart
(see Section 2.4.2).

Func GetCustomerFactory ([Name] As CATBSTR) As Factory


This method returns a customer factory from a code string defined by the customer.
HybridBodies As HybridBodies (Read Only)
This property returns the collection object containing all geometrical sets at the first hierarchal
level of the CATPart.

HybridShapeFactory As Factory (Read Only)


This property returns the toolbox for wireframe and surface geometry of the CATPart (Section
6.1).

Sub Inactivate [Object] As AnyObject


This method deactivates objects in a CATPart.

InWorkObject As AnyObject
This property returns or sets the work object of the CATPart.

Func IsInactive ([Object] As AnyObject) As Boolean


This method checks whether an object is deactivated (deactivated: “True,” activated: “False”).

Func IsUpToDate ([Object] As AnyObject) As Boolean


This method checks whether an object needs to be updated (update needed: “False”).

MainBody As Body
This property returns or sets the main body of the CATPart.

OrderedGeometricalSets As OrderedGeometricalSets (Read Only)


This property returns the collection object containing the ordered geometrical sets of the
CATPart. Child-ordered geometrical sets are not included.

OriginElements As OriginElements (Read Only)


This property returns the collection object containing the origin elements of the CATPart
(Section 3.2).

Parameters As Parameters (Read Only)


This property returns the collection object containing the parameters of the CATPart (Section
3.4.1).

Relations As Relations (Read Only)


This property returns the collection object containing the relations (Formulas, DesignTables,
Laws, and Checks) of the CATPart (Section 3.4).

ShapeFactory As Factory (Read Only)


This property returns the toolbox for solids of the CATPart (Section 7.1).

SheetMetalFactory As Factory (Read Only)


This property returns the toolbox for sheet metal parts. The Sheet Metal Design license must be
present in order to use this property.
SheetMetalParameters As AnyObject (Read Only)
This property returns the parameters for sheet metal parts. The Sheet Metal Design license
must be present in order to use this property.

Sub Update
This method updates the CATPart result with respect to its specifications.

Sub UpdateObject [Object] As AnyObject


This method updates an object result with respect to its specifications.

UserSurfaces As Collection (Read Only)


This property returns the collection object containing the user elements of the CATPart.

8.169 PartDocument

This class represents the CATPart (see Section 1.10.2). The bodies and geometrical sets of
CATParts can be accessed through the properties and methods of this class. An object of this
class is created as soon as a Document object (Section 8.25) is declared as a CATPart
(Section 2.2).
Object Path: AnyObject.Document.PartDocument
Part As Part (Read Only)
This property returns the root “Part” object from the current part document.

Product As Product (Read Only)


This property returns the root “Product” object from the current part document.

8.170 Pattern

This class represents a solid resulting from a replication (rectangular pattern, circular pattern, or
user pattern). See Section 7.4. This class is a parent class and provides basic methods and
properties for the CircPattern (Section 8.15), RectPattern (Section 8.180),
and UserPattern (Section 8.223) classes.
Object Path: AnyObject.Shape.TransformationShape.Pattern
Sub ActivatePosition [U, V] As Long
This method allows a user to activate an instance of the pattern. “U” corresponds to the
numerator in the first direction, “V” in the second direction.

Sub DesactivatePosition [U, V] As Long


This method allows a user to deactivate an instance of the pattern. “U” corresponds to the
numerator in the first direction, “V” in the second direction.

ItemToCopy As AnyObject
This property returns or sets the shape to be copied.

RotationAngle As Angle (Read Only)


This property returns the angle by which the entire pattern is rotated. The rotation occurs about
the origin of the pattern object. The value of the angle can be edited with the Value method.

8.171 Plane

This class represents a plane (see Section 6.4). This class is the parent class and provides the
basic methods for all planes.
Object Path: AnyObject.HybridShape.Plane
Sub GetFirstAxis [Vector] As CATSafeArrayVariant
This method returns the coordinates of the first plane axis. The vector is output as a unit vector.

Sub GetOrigin [Point] As CATSafeArrayVariant


This method returns the x-, y-, and z-coordinates of the origin of the plane.

Sub GetPosition [X, Y, Z] As Double


Refer to SetPosition.
Sub GetSecondAxis [Vector] As CATSafeArrayVariant
This method returns the coordinates of the second plane axis. The vector is output as a unit
vector.

Func IsARefPlane As Long


This method queries whether the plane is a reference plane. The value range is “0” (reference
plane) and “1” (not reference plane).
Sub PutFirstAxis [Vector] As CATSafeArrayVariant
This method sets the coordinates of the first plane axis. The vector is defined as a unit vector
(length equals “1”). Not every plane definition allows this action.

Sub PutOrigin [Point] As CATSafeArrayVariant


This method sets the x-, y-, and z-coordinates of the origin of the plane. Not every plane
definition allows this action.

Sub PutSecondAxis [Vector] As CATSafeArrayVariant


This method sets the coordinates of the second plane axis. The method works similarly to
the PutFirstAxis method.
Sub RemovePosition
This method removes the reference position of where a plane is displayed.
Sub SetPosition [X, Y, Z] As Double
This method sets the position where the plane is displayed. If the coordinates do not lie on the
plane, the plane is displayed on the plane projected point.

8.172 Pocket
This class represents a pocket (see Section 7.2). An object of the class is created with
the AddNewPocket or AddNewPocketFromRef methods of the ShapeFactory class (Section
8.199). This class has no properties or methods.
Object Path: AnyObject.Shape.SketchBasedShape.Prism.Pocket

8.173 Point

This class represents a 3D point (see Section 6.2). It is a parent class and provides the basic
methods for all 3D points.
Object Path: AnyObject.HybridShape.Point
Sub GetCoordinates [Point] As CATSafeArrayVariant
This method returns the x-, y-, and z-coordinates of the point.

Sub SetCoordinates [Point] As CATSafeArrayVariant


This method sets the x-, y-, and z-coordinates of the point.

8.174 Point2D

This class represents a point in a sketch or drawing (see Chapter 5). An object of the class is
created with the CreatePoint method of the Factory2D class (Section 8.35).
Object Path: AnyObject.GeometricElement.Geometry2D.Point2D
Sub GetCoordinates [Coordinates] As CATSafeArrayVariant
This method returns the coordinates of the point.
Sub SetData [X, Y] As Double
This method sets the coordinates of the point.

8.175 Prism

This class represents a prismatic solid (see Section 7.2). It provides methods for
the Pad (Section 8.164) and Pocket (Section 8.172) child classes.
Object Path: AnyObject.Shape.SketchBasedShape.Prism
DirectionOrientation As CATPrismOrientation
This property returns the prism direction orientation. The value range is “catRegularOrientation”
(normal orientation) and “catInverseOrientation” (inverted orientation).

DirectionType As CATPrismExtrusionDirection
This property returns whether the prism direction is normal to the sketch or follows a given
direction. The value range is “catNormalToSketchDirection” (direction normal to the sketch) and
“catNotNormalToSketchDirection” (direction along a given direction).

FirstLimit As Limit (Read Only)


This property returns the first prism limit. The limit definition can be modified with the methods of
the Limit class (Section 8.155).

Sub GetDirection [Direction] As CATSafeArrayVariant


This method returns the prism direction with absolute coordinates.

IsSymmetric As Boolean
This property returns whether the prism is symmetric (symmetric: “True”).

IsThin As Boolean
This property returns whether the prism is thin (thin: “True”).

MergeEnd As Boolean
This property returns the state of the “Merge Ends” option (enabled: “True”). The property is
only available if the IsThin property is “True.”

NeutralFiber As Boolean
This property returns the state of the “Neutral Fiber” option (enabled: “True”). If the option is
enabled, the thin prism is symmetric about the profile. The property is only available if
the IsThin property is “True.”

Sub ReverseInnerSide
This method reverses the prism’s inner side when the profile is open.

SecondLimit As Limit (Read Only)


This property returns the second prism limit. The limit definition can be modified with the
methods of the Limit class (Section 8.155).

Sub SetDirection [Linie] As Reference


This method sets the prism direction.

8.176 Product

This class represents the metadata of a CATPart or CATProduct. An object of the class is
created with the Product property of the PartDocument (Section 8.169)
or ProductDocument classes (Section 8.177). Note: This section covers only selected
commands of the Product class.
Object Path: AnyObject.Product
Sub ApplyWorkMode [Mode] As CatWorkModeType
This method sets the visualization mode of a product. The value range is “DEFAULT _MODE”
(default), “VISUALIZATION_MODE” (visualization only), and “DESIGN_MODE” (design).

Func Connections ([Type] As String) As Collection


This method returns the product’s constraints. If “Type” is “CATIAConstraints,” the product’s
constraints should be respected as positioned in space (fixed, contact, offset …). See Section
4.4.

Func CreateReferenceFromName ([Label] As String) As Reference


This method creates a reference from a name.
Definition As String
This property returns or sets the product’s definition (“Definition” field). See Section 3.1.

DescriptionRef As String
This property returns or sets the product’s description for a reference product (“Description”
field). See Section 3.1.

Sub ExtractBOM [File Type] As CatFileType, [File Name] As String


This method extracts the product’s contents as a bill of materials (BOM). The value range of
“File Type” is “catFileTypeText” (text file), “catFileTypeMotif” (Motif file), and “catFileTypeHTML”
(HTML file).

Func GetTechnologicalObject ([Type] As String) As CATBaseDispatch


This method returns a technological object from the “Applications” data of a product.
Move As Move (Read Only)
This property provides access to an object of the Move class. The transformation matrix of a
product can be changed with the Apply method of the Move class. The parameters specify the
delta of movement.
Nomenclature As String
This property returns or sets the product’s nomenclature (“Nomenclature” field). See Section 3.1.

Parameters As Parameters (Read Only)


This property returns the collection of parameters contained in the current product (see Section
4.2).
PartNumber As String
This property returns or sets the product’s part number (“Part Number” field). See Section 3.1.

Position As Position (Read Only)


This property returns the transformation matrix of a product. The position can be written and
read with the SetComponents and GetComponents methods.
Products As Products (Read Only)
This property returns the collection of products contained in the current product (see Section
4.3).
ReferenceProduct As Product (Read Only)
This property returns the reference product of the product.
Relations As Relations (Read Only)
This property returns the collection of relations contained in the current product (see Section
4.2).
Revision As String
This property returns or sets the product’s revision (“Revision” field). See Section 3.1.

Source As CatProductSource
This property returns or sets the product’s source (“Source” field). The value range is
“catProductSourceUnknown” (Unknown), “catProductMade” (Made), and “catProductBought”
(Bought).

Sub Update
This method updates the current document.
UserRefProperties As Parameters (Read Only)

This method returns the list of custom parameters (“Other Properties” button). See Section 3.1.2.

8.177 ProductDocument
This class represents a CATProduct (see Section 1.10.2). An object of this class is created as
soon as a Document object (Section 8.25) is declared as a CATProduct (Section 2.2).
Object Path: AnyObject.Document.ProductDocument
Product As Product (Read Only)
This method returns the root product, metadata, and product structures of a CATProduct.

8.178 Products
This class represents a collection of product objects (CATProducts, CATPart, and/or
components) under a given CATProduct (see Section 4.3). An object of the class is created with
the Products property of the Product class (Section 8.176).
Object Path: Collection.Products
Func AddComponent ([NewComponent] As Product) As Product

This method creates a component and adds it to the product’s collection. The new component
must already be loaded as a document.

Sub AddComponentsFromFiles [List] As CATSafeArrayVariant, [Type] As String

This method creates a component from a file and adds it to the product’s collection. The
document of the new component will be loaded during the process. “Type” defines the type of
documents to be added (e.g. “CATPart” or “CATProduct”).

Func AddExternalComponent ([Document] As Document) As Product

This method creates a component from the root product of another product. The new
component must already be loaded as a document.

Func AddNewComponent ([DocumentType, PartNumber] As String) As Product

This method creates a new document and adds a corresponding component to the product’s
collection. “Document Type” field has the following value range: “CATPart” or “CATProduct.” To
create a component, see the AddNewProduct method.
Func AddNewProduct ([PartNumber] As String) As Product

This method creates a product reference object.

Func Item ([Index] As CATVariant) As Product


This method returns a product at a specified “Index” position from the product’s collection.

Sub Remove [Index] As CATVariant


This method removes a product at a specified “Index” position from the product’s collection.

Func ReplaceComponent ([OldComponent] As Product, [NewComponentFile name] As


String, [All Instances] As Boolean) As Product

This method replaces an existing component with a new component. The document of the new
component will be loaded during the process. If “All Instances” is “True,” all of the nodes of the
same part number on all levels of CATProducts will be replaced.

Func ReplaceProduct ([OldComponent, NewComponent] As Product, [All Instances] As


Boolean) As Product

This method replaces an existing component with a new component. The new component must
already be loaded as a document. If “All Instances” is “True,” all of the nodes of the same part
number on all levels of CATProducts will be replaced.
8.179 RealParam

This class represents a “Real” parameter type (see Section 3.4.1). An object of this class is
created by using the CreateReal method of the Parameters class (Section 8.167).
Object Path: AnyObject.Parameter.RealParam
Sub GetEnumerateValues [Values] As CATSafeArrayVariant
This method returns an array containing the different values that the RealParam can take in the
case of multiple values.

Func GetEnumerateValuesSize As Long


This method returns the number of enumerate values.

Func IsEqualTo ([ComparisonValue] As Double) As Boolean


This method compares the value of the parameter with the value “ComparisonValue.” If both
values are equal, the return value of the method is “True.”
MaximumTolerance As Double
This property returns or sets the maximum tolerance of the parameter.

MinimumTolerance As Double
This property returns or sets the minimum tolerance of the parameter.

RangeMax As Double
This property returns or sets the value of the upper bound that the parameter object value can
take.

RangeMaxValidity As Long
This property returns or sets the type of the upper bound of the parameter. The value range is
“0” (upper bound is meaningless), “1” (upper bound can be reached), and “2” (upper bound
cannot be reached).

RangeMin As Double
This property returns or sets the value of the lower bound that the parameter object value can
take.

RangeMinValidity As Long
This property returns or sets the type of the lower bound of the parameter (refer
to RangeMaxValidity).
Sub SetEnumerateValues [Value] As CATSafeArrayVariant
This method sets the number of enumerate values.
Sub SuppressEnumerateValues
This method sets the number of enumerate values.

Value As Double
This method returns the value of the parameter.

8.180 RectPattern

This class represents a solid, resulting from a “Rectangular Pattern” replication (see Section
7.4). An object of the class is created with
the AddNewRectPattern or AddNewSurfacicRectPattern methods of
the ShapeFactory class (Section 8.199).
Object Path: AnyObject.Shape.TransformationShape.Pattern.RectPattern
FirstDirectionRepartition As LinearRepartition (Read Only)
This property returns the linear repartition along the first direction. The replication parameters
are described by the LinearRepartition class (Section 8.158).
FirstDirectionRow As IntParam (Read Only)
This property returns the position of the shape to be copied along the first linear direction (“Row
in the Direction 1” field).

FirstOrientation As Boolean
This property returns or sets whether the rectangle pattern follows the direction of the first
reference element or is inverted (“Reverse” button). The property is “True” if the direction of the
reference element is used.

FirstRectangularPatternParameters As CatRectangularPatternParameters
This property returns or sets the pattern type in the first direction of the rectangular pattern. The
value range is “catInstancesandSpacing” and “catUnequalSpacing.”

Sub GetFirstDirection [Vector] As CATSafeArrayVariant


This method returns the first repartition direction.

Sub GetSecondDirection [Vector] As CATSafeArrayVariant


This method returns the second repartition direction.

SecondDirectionRepartition As LinearRepartition (Read Only)


This property returns the linear repartition along the second direction. The replication
parameters are described by the LinearRepartition class (Section 8.158).

FirstDirectionRow As IntParam (Read Only)


This property returns the position of the shape to be copied along the second linear direction
(“Row in the Direction 2” field).

SecondOrientation As Boolean
This property returns or sets the direction of the second reference element. Refer
to FirstOrientation.
SecondRectangularPatternParameters As CatRectangularPatternParameters
This property returns or sets the pattern type in the second direction of the rectangular pattern.
The value range is “catInstancesandSpacing” and “catUnequalSpacing.”
Sub SetFirstDirection [Direction] As CATSafeArrayVariant
This method sets the first repartition direction.

Sub SetInstanceSpacing [InstantNumber] As Long, [Distance] As Double, [Direction] As


Long
This method sets the instance spacing.
Sub SetSecondDirection [Direction] As CATSafeArrayVariant
This method sets the second repartition direction. Refer to SetFirstDirection.
Sub SetUnequalInstanceNumber [InstantNumber] As Long, [Direction] As Long
This method sets the instance number.

8.181 Reference
This class represents a CATIA reference (see Section 3.5). An object of this class is created
with the “CreateReferenceFrom…” methods of the Part class (Section 8.168).
Object Path: CATBaseDispatch.Reference
Func ComposeWith ([Reference] As Reference) As Reference
This method combines two references and creates a composite reference.

DisplayName As CATBSTR (Read Only)


This property returns the name of the referenced object.

8.182 References
This class represents a reference collection.
Object Path: Collection.References
Func Item ([Index] As CATVariant) As Reference
This method returns a reference at a specified “Index” position.

8.183 Relation

This class represents a relation (see Section 3.4). It provides basic methods for
the Formula (Section 8.43), DesignTable (Section 8.23), Rule, and Check child classes.
Object Path: AnyObject.KnowledgeObject.KnowledgeActivateObject.Relation
Comment As CATBSTR
This property returns or sets the comment associated with the relation.

Context As AnyObject (Read Only)


This property returns the context of the parameter (Part, Product …).
Func GetInParameter ([Index] As Long]) As AnyObject
This method returns an input parameter of the relation at a specified “Index” position. “Index” is
a number between “1” and NbInParameters.

Func GetOutParameter ([Index] As Long]) As AnyObject


This method returns an output parameter of the relation at a specified “Index” position. “Index” is
a number between “1” and NbOutParameters.

Sub Modify [Content] As CATBSTR


This method modifies the relation.

NbInParameters As Long (Read Only)


This property returns the number of input parameters of the relation (e.g. “C = A + B” equals “2”).
NbInParameters As Long (Read Only)
This property returns the number of output parameters of the relation (e.g. “C = A + B” equals
“1”).
Sub Rename [Name] As CATBSTR
This method renames the relation.

Value As CATBSTR (Read Only)


This property returns the definition of the relation (e.g. “C = A + B” is “A + B”).

8.184 Relations

This class represents a collection of relations (see Sections 3.4.2 and 3.4.3). A relation can be a
formula, design table, control, or a check. An object of the class is created with
the Relations property of the Part class (Section 8.168). Note: this section describes only a
selection of properties and methods of the Relations class that are available with current
licenses.
Object Path: Collection.Relations
Func CreateDesignTable ([Name, Comment] As CATBSTR, [Copy] As Boolean, [File] As
CATBSTR) As DesignTable
This method creates a design table and adds it to the part’s collection of relations (see Section
3.4.2).
Func CreateFormula ([Name, Comment] As CATBSTR, [Output] As Parameter, [Formula]
As CATBSTR) As Formula
This method creates a formula and adds it to the part’s collection of relations (see Section 3.4.3).
Func CreateHorizontalDesignTable ([Name, Comment] As CATBSTR, [Copy] As Boolean,
[File] As CATBSTR) As DesignTable
This method creates a horizontal design table and adds it to the part’s collection of relations
(see Section 3.4.2).
Func CreateLaw ([Name, Comment, Code] As CATBSTR) As Law
This method creates a law and adds it to the part’s collection of relations (see Section 3.4.2).
This method is only available with the Generative Shape Design and Generative Shape
Optimizer licenses.
Func CreateSetOfEquations ([Name, Comment, Code] As CATBSTR) As SetOfEquation
This method creates a set of equations. “Name” describes the name of the set of equations, and
“Code” describes the equations. Two equations are separated within the “Code” by a semicolon.

Sub CreateSetOfRelations [ParentObject] As AnyObject


This method creates a set of relations and appends it to a parent object.

Func Item ([Index] As CATVariant) As Relation


This method returns a relation at a specified “Index” position from the relation’s collection.

Sub Remove [Index] As CATVariant


This method removes a relation at a specified “Index” position from the relation’s collection.

Func SubList ([Object] As AnyObject, [Recursion] As Boolean) As Relations


This method returns a sub-collection of relations aggregated to an object. “Recursion” controls
whether the object is searched recursively (recursive searches: “True”).
8.185 Remove

This class represents a solid created by the “Remove” Boolean operation (see Section 3.3.4).
An object of the class is created with the AddNewRemove method of the ShapeFactory class
(Section 8.199). This class has no properties or methods. The properties and methods of the
parent classes are used.
Object Path: AnyObject.Shape.BooleanShape.Remove

8.186 RemoveFace

This class represents a remove face. An object of the class is created with
the AddNewRemoveFace method of the ShapeFactory class (Section 8.199).
Object Path: AnyObject.Shape.DressUpShape.RemoveFace

KeepFace As Reference (Write Only)


This property adds a face to keep (“Faces to Keep” field).
KeepFaces As References (Read Only)
This property gets the specified faces to be kept (“Faces to Keep” field).

Propagation As References (Read Only)


This property gets the faces that will be removed.

Sub remove_KeepFace [Face] As Reference


This method removes a face to be kept (“Faces to Keep” field).

Sub remove_RemoveFace [Face] As Reference


This method removes a face to be removed (“Faces to Remove” field).
RemoveFace As References (Write Only)
This property adds a face to remove (“Faces to Remove” field).
RemoveFaces As References (Read Only)
This property gets the specified faces to be removed (“Faces to Remove” field).

8.187 Repartition
This class represents a solid replication definition and provides the basic methods for
the AngularRepartition (Section 8.3) and LinearRepartition (Section 8.158) child classes.
Object Path: AnyObject.Repartition
InstancesCount As IntParam (Read Only)
This property returns the total number of copied shapes. The value can be edited with
the Value method.

8.188 ReplaceFace

This class represents a remove face. An object of the class is created with
the AddNewReplaceFace method of the ShapeFactory class (Section 8.199).
Sub AddRemoveFace [Face] As Reference
This method adds a face to remove (“Faces to Remove” field).
Sub AddSplitPlane [NewSurface] As Reference
This method sets the replacing element (“Replacing Surface” field).

Sub DeleteRemoveFace [Face] As Reference


This method deletes a face to remove (“Faces to Remove” field).
RemoveFace As References (Read Only)
This property gets the specified face to be removed.

SplittingSide As CatSplitSide
This property returns or sets the splitting side. The value range is “catPositiveSide” (natural
orientation) and “catNegativeSide” (inverted orientation).
8.189 Revolution

This class represents a revolution (see Section 7.2). The class is a parent class of
the Shaft (Section 8.197) and Groove (Section 8.47) classes.
Object Path: AnyObject.Shape.SketchBasedShape.Revolution
FirstAngle As Angle (Read Only)
This property returns the revolution first angle. The value can be edited with the Value method.

IsThin As Boolean
This property returns or sets the state of the “Thick” option. If the property is “True,” the option is
enabled.
MergeEnd As Boolean
This property returns or sets the state of the “Mirrored Extent” option. If the property is “True,”
the option is enabled.
NeutralFiber As Boolean
This property returns or sets the state of the “Neutral Fiber” option. If the property is “True,” the
option is enabled.
RevoluteAxis As Reference
This property returns or sets the rotation axis (“Axis” field).
SecondAngle As Angle (Read Only)
This property returns the revolution second angle. Refer to FirstAngle.

8.190 Rib

This class represents a rib (see Section 7.2). An object of this class is created with
the AddNewRib or AddNewRibFromRef methods of the ShapeFactory class (Section 8.199).
This class has no properties or methods. The properties and methods of the parent classes are
used.
ObjectPath: AnyObject.Shape.SketchBasedShape.Sweep.Rib

8.191 Rotate

This class represents a rotate. An object of the class is created with


the AddNewRotate2 method of the ShapeFactory class (Section 8.199).
Object Path: AnyObject.Shape.Rotate

Angle As Angle (Read Only)


This property returns or sets the rotation angle (“Angle” field). The value can be edited with
the Value method.

AngleValue As Double
This property returns or sets the rotation angle vlaue. The angle is measured in degrees.

Axis As Reference
This property returns or sets the rotation axis (“Axis” field).

ElemToRotate As Reference
This property returns or sets the element to be rotated.
HybridShape As HybridShape (Read Only)
This property returns the rotation of the underlying surface of the HybridShapeRotate object
class (Section 8.130).

8.192 Scaling

This class represents a solid resulting from a “Scaling” transformation (see Section 7.4). An
object of this class is created with the AddNewScaling method of the ShapeFactory class
(Section 8.199).
Object Path: AnyObject.Shape.DressUpShape.Scaling

Factor As RealParam (Read Only)


This property returns or sets the scaling factor (“Factor” field). The value can be edited with
the Value method.

ScalingReference As Reference
This property returns or sets the element to be scaled from (“Reference” field). The reference
may be a point, a plane, or a surface. If the reference is a point, the object is scaled in all three
coordinate directions. If the reference is a plane, the object is scaled only perpendicular to the
plane.

8.193 Scaling2

This class represents a solid resulting from a “Scaling” transformation (see Section 7.4). An
object of this class is created with the AddNewScaling2 method of the ShapeFactory class
(Section 8.199). Unlike with the Scaling class, the algorithms in the Scaling2 class are based
on surface design algorithms—for example, the HybridShapeScaling class.
Object Path: AnyObject.Shape.Scaling2
Center As Reference
This property returns or sets the reference point or reference plane (“Reference” field).

ElemToScale As Reference
This property returns or sets the element to scale.

Ratio As RealParam (Read Only)


This property returns the scaling ratio parameter (“Ratio” field). The value can be edited with
the Value method.

RatioValue As Double
This property returns or sets the scaling ratio value (“Ratio” field).

8.194 SelectedElement

This class represents an element selection (see Section 8.2.3). An object of the class is created
with the Item method of the Selection class (Section 8.195).
Object Path: AnyObject.SelectedElement
ActiveDocument As Document (Read Only)
This property returns the document that the selected element belongs to.

Sub GetCoordinates [Coordinates] As CATSafeArrayVariant


This method returns the coordinates of the selection.

LeafProduct As AnyObject (Read Only)


This property returns the node of a CATProduct that corresponds to the selection in the
specification tree.
Reference As Reference (Read Only)
This property returns the reference element.

Type As CATBSTR (Read Only)


This property returns the CATIA identifier (“Pad,” “Line2D”) of the selected element.

Value As CATBaseDispatch (Read Only)


This property returns the actual selected automation object.

8.195 Selection

This class represents a selection (see Section 2.3). An object of the class is created with
the Selection method of the Document class (Section 8.25).
Object Path: AnyObject.Selection
Sub Add [Object] As AnyObject
This method adds an object to the selection.

Sub Clear
This method clears the selection. The method should always be used if a subsequent user
selection is made.

Sub Copy
This method copies the contents of the selection in cache for a paste operation.

Count As Long (Read Only)


This property has been deprecated since V5R16: see Count2.
Count2 As Long (Read Only)
This property returns the number of selected elements contained by the current selection.

Sub Cut
This method cuts the contents of the selection in cache for a paste operation.

Sub Delete
This method deletes all objects of the selection. Warning: the items are deleted from the CATIA
document!

Func FilterCorrespondence ([Filter] As CATSafeArrayVariant) As Boolean


This method tests whether all selected elements match the element “Filter.” Warning: an empty
selection set always passes through a filter!
Func FindObject ([What] As CATBSTR) As AnyObject
This method finds an object within the selection. A macro will return an error if no object is found.

Func IndicateOrSelectElement2D ([Message] As String, [Filter] As CATSafeArrayVariant,


[SelectionBefore, Tooltip, TriggerOnMouse, ObjectSelected] As Boolean, [XY] As
CATSafeArrayVariant) As String
This method requires a user to select an element or indicate a side within a 2D document
(CATDrawing). “Message” specifies a string that instructs the user in the status bar. “Filter”
specifies which items are allowed to be selected. “SelectionBefore” determines whether
elements that were selected before the start of the command are considered. If
“SelectionBefore” is “True” and it was selected before valid elements, the method immediately
signals that it was successful. “Tooltip” activates a tool tip that displays the name of a selectable
element when the mouse moves over it. “TriggerOnMouse” determines whether the command is
detected when the user moves the mouse over the element. “ObjectSelected” reads whether
the user selects an element (“True”) or indicates a side (“False”). “XY” reads the coordinates of
the location in the 2D document. The result of the method has the following values: “Normal”
(successful selection or indication), “Mouse-Move” (successful trigger by mouse movement),
“Undo” (“Undo” button pressed), “Redo” (“Redo” button pressed), and “Cancel” (aborted
selection).

Function IndicateOrSelectElement3D ([PlanarElement] As AnyObject, [Message] As


String, [Filter] As CATSafeArrayVariant, [SelectionBefore, Tooltip, TriggerOnMouse,
ObjectSelected] As Boolean, [XY] As CATSafeArrayVariant) As String
This method requires a user to select a planar object or indicate a side within a 3D document.
“PlanarElement” defines the planar object. “Message” specifies a string that instructs the user in
the status bar. “Filter” specifies which items are allowed to be selected. “SelectionBefore”
determines whether elements that were selected before the start of the command are
considered. If “SelectionBefore” is “True” and it was selected before valid elements, the method
immediately signals that it was successful. “Tooltip” activates a tool tip that displays the name of
a selectable element when the mouse moves over it. “TriggerOnMouse” determines whether the
command is detected when the user moves the mouse over the element. “ObjectSelected”
reads whether the user selects an element (“True”) or indicates a side (“False”). “XY” reads the
coordinates of the location in the 3D document. The result of the method has the same range as
the IndicateOrSelectElement2D method.

Func Item ([Counter] As Long) As SelectedElement


This method has been deprecated since V5R16: see Item2.
Func Item2 ([Counter] As Long) As SelectedElement
This method returns the element number of the “Counter” from the selection list. “Counter” starts
at “1” and ends with the value of the Count property. To obtain the object from the elements,
the Value property of the SelectedElement class (Section 8.194) must be used.

Sub Paste
This method puts the contents of the clipboard, which was filled with Cut or Copy, in the
document at the indicated location.

Sub PasteLink
This method is similar to the Paste method, but with links.
Sub PasteSpecial [Mode] As CATBSTR
This method puts the contents of the clipboard, which was filled with Cut or Copy, in the
document at the indicated location.

Value range of the parameter “Mode” in a “Part”:


CATPrtCont with history, without link

CATPrtResultWithOutLink without history, without link

CATPrtResult without history, with link

CATMaterialCont as material

AsMaterialLink as material link

CATMechProdCont as specified in “Assembly”


CATProdCont as specified in “Product Structure”

CATIA_SPEC CATIA_SPEC

CATIA_RESULT CATIA_RESULT
Value range of the parameter “Mode” in a “Product”:
CATProdCont as specified in “Product Structure”

CATSpecBreakLink break link


Sub Remove [Index] As Long
This method has been deprecated since V5R16: see Remove2.
Sub Remove2 [Index] As Long
This method removes an element at a specified “Index” position from the selection.
Sub Search [Search Criteria] As CATBSTR
This method searches for all objects within the active document that match the search criteria
and selects these objects (Section 2.4.1). Search criteria should be interactively defined in
CATIA with the command “Edit / Find / Advanced” and then transferred into a macro.

Func SelectElement ([What] As CATSafeArrayVariant, [Text] As CATBSTR, [Window] As


Boolean) As CATBSTR
This method has been deprecated: see the SelectElement2,
SelectElement3, and SelectElement4 methods.
Func SelectElement2 ([Filter] As CATSafeArrayVariant, [Message] As String,
[SelectionBefore] As Boolean) As String
This method requires a user to select an element in the active document. “Message” specifies a
string that instructs the user in the status bar. “Filter” specifies which items are allowed to be
selected. “SelectionBefore” determines whether elements that were selected before the start of
the command are considered. If “SelectionBefore” is “True” and it was selected before valid
elements, the method immediately signals that it was successful. The result of the method has
the same range as the IndicateOrSelectElement2D method. If an element outside of the active
document is selected, the result of the method is “Cancel.”

Func SelectElement3 ([Filter] As CATSafeArrayVariant, [Message] As String,


[SelectionBefore] As Boolean, [MultiSelectionMode] As CATMultiSelectionMode, [Tooltip]
As Boolean) As String
This method requires a user to select one or more elements in the active document. “Message”
specifies a string that instructs the user in the status bar. “Filter” specifies which items are
allowed to be selected. “SelectionBefore” determines whether elements that were selected
before the start of the command are considered. If “SelectionBefore” is “True” and it was
selected before valid elements, the method immediately signals that it was successful.
“MultiSelectionMode” defines the type of multi-selection. “MultiSelectionMode” can have the
following values: “CATMonoSel” (one selection), “CATMultiSelTriggWhenSelPerf” (selection
through the “Tools Palette” toolbar, “Shift” and “Ctrl” keys are not supported), or
“CATMultiSelTriggWhenUserValidatesSelection” (selection through the “Tools Palette” toolbar,
“Shift” and “Ctrl” keys are supported). “Tooltip” activates a tool tip that displays the name of a
selectable element when the mouse moves over it. The result of the method has the same
range as the IndicateOrSelectElement2D method. If an element outside of the active
document is selected, the result of the method is “Cancel.”

Func SelectElement4 ([Filter] As CATSafeArrayVariant, [ActiveDocumentMessage,


NonActiveDocumentMessage] As String, [Tooltip] As Boolean, [Document] As
Document) As String
This method requires a user to select an element in any document. “Filter” specifies which items
are allowed to be selected. “Message” specifies a string that instructs the user in the status bar
in the active and inactive documents. “Tooltip” activates a tool tip that displays the name of a
selectable element when the mouse moves over it. The “Document” parameter reads the
document that the selection is made in. The result of the method is similar to the previous two
methods.

VisProperties As VisPropertySet (Read Only)


This property returns the graphical properties of the selection.

8.196 SewSurface

This class represents a solid that was created from a surface (see Section 7.3). An object of the
class is created with the AddNewSewSurface method of the ShapeFactory class (Section
8.199).
Object Path: AnyObject.Shape.SurfaceBasedShape.SewSurface
Sub SetVolumeSupport [Volume] As Reference
This method sets the volume support for volume sew surface.
SewingIntersectionMode As CatSewingIntersectionMode
This property sets the state of the “Intersect Body” option. The value range is
“catSewingIntersect” (cut) and “catSewingNoIntersect” (no cut).

SewingSide As CATSplitSide
This property returns or sets the sewing side. If the value is “catPositiveSide,” the side in the
direction vector of the sewn will be kept. “CatNegativeSide” inverts the direction vector.

8.197 Shaft

This class represents a shaft (see Section 7.2). An object of this class is created with
the AddNewShaft or AddNewShaftFromRef methods of the ShapeFactory class (Section
8.199). This class has no properties or methods. The properties and methods of the parent
classes are used.
Object Path: AnyObject.Shape.SketchBasedShape.Revolution.Shaft

8.198 Shape
This class represents a solid (see Chapter 7). This class is the parent class of all solids. It has
no properties or methods.
Object Path: AnyObject.Shape
8.199 ShapeFactory
This class represents a 3D toolbox for creating solid geometry (see Section 7.1). An object of
this class is created with the ShapeFactory property of the Part class (Section 8.168).
Object Path: AnyObject.Factory.ShapeFactory
Func AddNewAdd ([Body] As Body) As Add

This method creates an “Add” operation between two bodies (Section 3.3.4). The “Body” is
added with the in-work body.

Func AddNewAssemble ([Body] As Body) As Assemble

This method creates an “Assembly” operation between two bodies (Section 3.3.4). The “Body”
is assembled with the in-work body.

Func AddNewBlend As AnyObject


This method creates and returns a new blend.
Func AddNewChamfer ([Edge] As Reference, [Propagation] As CATChamferPropagation,
[Mode] As CATChamferMode, [Orientation] As CATChamferOrientation, [Length1,
Value2] As Double) As Chamfer

This method creates a chamfer (see Section 7.5). “Edge” determines the object to chamfer and
is called a “Removed Edge” (Section 3.5.4). If multiple edges are to be chamfered, work with an
empty reference (Section 3.5.3). The edges are then added with
the AddElementToChamfer method of the Chamfer class (Example 7.8). “Propagation”
determines whether adjacent edges are chamfered (“0” continuous tangent continuation, “1,”
only the referenced edge). “Mode” determines whether the chamfer is defined by two lengths
(“0”) or a length and an angle (“1”). “Value2” describes the second length or angle. “Orientation”
determines which side of the edge is the first length (normal orientation: “0,” swapped
orientation: “1”).

Func AddNewCircPattern ([Shape] As AnyObject, [NumberInRadialDirection,


NumberInAngularDirection] As Long, [SpacingInRadialDirection,
SpacingInAngularDirection] As Double, [RadialPosition, AngularPosition] As Long,
[ReferenceCenter, Axis] As Reference, [AxisOrientation] As Boolean, [RotationAngle] As
Double, [RadialOrientation] As Boolean) As CircPattern

This method creates a circular pattern based on the solid “Shape” with reference to a center
axis. The “RadialPosition” and “AngularPosition” specify the location of the origin in the pattern.
“AxisOrientation” specifies whether the axis direction is inverted (no inversion: “True”).
“RotationAngle” determines the rotation angle of the entire pattern around the axis.
“RadialOrientation” defines whether all elements are kept parallel to each other (“True”) or
whether they are aligned with the radial direction (“False”).

Func AddNewCloseSurface ([CloseSurface] As Reference) As CloseSurface

This method creates a “Closed Solid” from a surface at the in-work object position within the
tree structure (see Section 7.3). Any open surfaces must be planar and must have the ability to
be closed by edges’ curves.

Func AddNewDraft ([FaceToDraft, NeutralElement] As Reference, [NeutralMode] As


CATDraftNeutralPropagationMode, [PartingElement] As Reference, [DX, DY, DZ] As
Double, [Mode] As CATDraftMode, [Angle] As Double, [SelectionMode] As
CATDraftMultiselectionMode) As Draft

This method creates a draft in the direction of the vector (DX, DY, DZ) at the in-work object
position within the tree structure (see Section 7.5). The “FaceToDraft” and the “NeutralElement”
are “RemovedSurfaces” to be defined (Section 3.5.4). “NeutralMode” determines whether only
the indicated face is used as a neutral element (value “0”) or whether any adjacent tangent
faces are used (value “1”). “Mode” determines whether the draft is constant (value “0”) or is
variable (value “1”). “SelectionMode” defines whether the elements to be drafted can be
selected explicitly (value “0”) or whether the elements can be implicitly selected as neighbors of
the neutral face (value “1”). In the second case, use an empty reference (Section 3.5.3). The
“PartingElement” parameter can be a plane, face, or empty reference.
Func AddNewEdgeFilletWithConstantRadius (…) As ConstRadEdgeFillet

This method has been deprecated since V5R14:


see AddNewSolidEdgeFilletWithConstantRadius or AddNewSurfaceEdgeFilletWithConsta
ntRadius.
Func AddNewEdgeFilletWithVaryingRadius (…) As VarRadEdgeFillet

This method has been deprecated since V5R14:


see AddNewSolidEdgeFilletWithVaryingRadius or AddNewSurfaceEdgeFilletWithVarying
Radius.
Func AddNewFaceFillet (…) As FaceFillet

This method has been deprecated since V5R14:


see AddNewSolidFaceFillet or AddNewSurfaceFaceFillet.
Func AddNewGroove ([Sketch] As Sketch) As Groove

This method creates a groove at the in-work object position within the tree structure
(see Section 7.2). The “Sketch” must include a rotation axis (Section 5.3).
Func AddNewGrooveFromRef ([Sketch] As Reference) As Groove

This method creates a groove (see Section 7.2). The “Sketch” must include a rotation axis
(Section 5.3). In contrast to the AddNewGroove method, this method uses a reference to a
sketch that serves as a parameter.

Func AddNewGSDCircPattern (…) As CircPattern


This method has been deprecated since V5R15: see AddNewSurfacicCircPattern.
Func AddNewGSDRectPattern (…) As RectPattern

This method has been deprecated since V5R15: see AddNewSurfacicRectPattern.


Func AddNewHole ([Support] As Reference, [Depth] As Double) As Hole

This method creates a hole normal to the “Support” at the origin of the support (see Section 7.2).
“Depth” controls the hole depth. The characteristics of the hole are defined with the properties of
the Hole class (Section 8.48).

Func AddNewHoleFromPoint ([X, Y, Z] As Double, [Support] As Reference, [Depth] As


Double) As Hole

This method creates a hole normal to the “Support” at the origin of the support, with “Depth”
controlling the hole depth (see Section 7.2). Reference point (X, Y, Z) must not reside on the
support: it is projected onto it. The characteristics of the hole are defined with the properties of
the Hole class (Section 8.48).
Func AddNewHoleFromRefPoint ([ReferencePoint, Support] As Reference, [Depth] As
Double) As Hole

This method creates a hole normal to the “Support” at the origin of the support, with “Depth”
controlling the hole depth (see Section 7.2). The reference point must not reside on the support:
it is projected onto it. The characteristics of the hole are defined with the properties of
the Hole class (Section 8.48).

Func AddNewHoleFromSketch ([Sketch] As Sketch, [Depth] As Double) As Hole

This method creates a hole normal to the “Sketch,” with “Depth” controlling the hole depth
(see Section 7.2). The sketch should contain only one point.

Func AddNewHoleWith2Constraints ([X, Y, Z] As Double, [Edge1, Edge2, Support] As


Reference, [Depth] As Double) As Hole

This method creates a hole normal to the “Support” at the origin of the support, with “Depth”
controlling the hole depth (see Section 7.2). Reference point (X, Y, Z) must not reside on the
support, it is projected onto it. Distance constraints between the edges, “Edge1” and “Edge2,” of
the body, and the anchor point create the hole. These distances do not change during a design
change. The edges are called “Functional Edges” (FEdge). See Section 3.5.4.

Func AddNewHoleWithConstraint ([X, Y, Z] As Double, [ReferenceEdge, Support] As


Reference, [Depth] As Double) As Hole

This method creates a hole normal to the “Support” at the origin of the support (see Section 7.2).
Reference point (X, Y, Z) must not reside on the support: it is projected onto it. A distance
constraint between the reference edge and the anchor point creates the hole. These distances
do not change during a design change. If the edge is a circle, the anchor point is always
concentric to it and the reference point (X, Y, Z) is ignored. The edges are called “Functional
Edges” (FEdge). See Section 3.5.4.

Func AddNewIntersect ([Body] As Body) As Intersect

This method creates an “Intersect” operation between two bodies (Section 3.3.4). The “Body” is
intersected with the in-work body.

Func AddNewLoft As Loft

This method creates a loft (see Section 7.2). The solid loft feature is defined by underlying
contours. This solid is created with the HybridShape property of the Loft class. For more
information, review the HybridShapeLoft class (Section 8.102 and Section 6.6).

Func AddNewMirror ([MirrorSurface] As Reference) As Mirror

This method creates a mirror of a solid (see Section 7.4). The mirror is inserted at the in-work
object position within the tree structure. The “MirrorSurface” is a “Removed Surface” (RSur) or a
plane. The definition of a “Removed Surface” is described in Section 3.5.4.
Func AddNewPad ([Sketch] As Sketch, [Height] As Double) As Pad

This method creates a pad that is based on a sketch with a defined height at the in-work object
position within the tree structure (see Section 7.2).

Func AddNewPadFromRef ([Sketch] As Reference, [Height] As Double) As Pad

This method creates a pad that is based on a sketch with a defined height at the in-work object
position within the tree structure (see Section 7.2).

Func AddNewPocket ([Sketch] As Sketch, [Depth] As Double) As Pocket

This method creates a pocket that is based on a sketch with a defined height at the in-work
object position within the tree structure (see Section 7.2).

Func AddNewPocketFromRef ([Sketch] As Reference, [Depth] As Double) As Pocket

This method creates a pocket that is based on a sketch with a defined height at the in-work
object position within the tree structure (see Section 7.2).

Func AddNewRectPattern ([Shape] As AnyObject, [NumberInDirection1,


NumberInDirection2] As Long, [StepDirection1, StepDirection2] As Double, [Position1,
Position2] As Long, [Direction1, Direction2] As Reference, [Orientation1, Orientation2] As
Boolean, [RotationAngle] As Double) As RectPattern

This method creates a rectangular pattern based on the solid “Shape” (see Section 7.4). The
“Position1” and “Position2” parameters indicate the position in the pattern that the original
element is located in. “Direction1” and “Direction2” determine the direction that the pattern
spans. The orientations define whether the directions are inverted (“True”: no inversion).
“RotationAngle” determines at what angle the entire pattern will rotate compared to the original
element. The rotation axis is normal to both directions.

Func AddNewRemove ([Body] As Body) As Remove

This method creates a “Remove” operation between two bodies (Section 3.3.4). The “Body” is
intersected with the in-work body.

Func AddNewRemovedBlend As AnyObject


This method creates a negative blend.
Func AddNewRemovedLoft As Loft

This method creates a negative loft (see Section 7.2). The method is similar to
the AddNewLoft method.
Func AddNewRemoveFace ([ToKeep, ToRemove] As Reference) As RemoveFace

This method removes a face of a solid. If several faces are needed for this operation, it is
recommended to define the “Faces to Keep” and the “Faces to Remove” with the methods of
the RemoveFace class (Section 8.186). Use empty references to create the object.
Func AddNewReplaceFace ([NewFace, ReplaceFace] As Reference, [Side] As
CatSplitSide) As ReplaceFace

This method replaces a face of a solid. “NewFace” defines the new face. “ReplaceFace” defines
the face to replace. “Side” defines which side of the solid will be kept. The value range of “Side”
is “catPositiveSide” (natural orientation) and “catNegativeSide” (inverted orientation).

Func AddNewRib ([Contour, CenterCurve] As Sketch) As Rib

This method creates a rib (see Section 7.2). “Contour” defines the profile of the rib, and
“CenterCurve” defines the guide curve.

Func AddNewRibFromRef ([Contour, CenterCurve] As Reference) As Rib

This method creates a rib (see Section 7.2). “Contour” defines the profile of the rib, and
“CenterCurve” defnes the guide curve.

Func AddNewRotate2 ([Axis] As Reference, [Angle] As Double) As Rotate

This method creates a rotation of an in-work body around the “Axis” defined by the “Angle”
(see Section 7.4). The axis can be an axis or line element.
Func AddNewScaling ([ReferenceElement] As Reference, [Ratio] As

This method creates a scaled solid from a “ReferenceElement” at a “Ratio” (see Section 7.4).
“ReferenceElement” can be a point, a plane, or a surface. If the reference element is a point, the
scaling takes place in all three coordinate directions. If the reference element is a plane, the
scaling takes only in the direction of the plane.

Func AddNewScaling2 ([ReferenceElement] As Reference, [Ratio] As Double) As


Scaling2

This method creates a scaled solid from a “ReferenceElement” at a “Ratio” (see Section 7.4).
Unlike with the AddNewScaling method, the algorithms AddNewScaling2 method are based
on surface design algorithms—for example, the HybridShapeScaling class.

Func AddNewSewSurface ([Surface] As Reference, [Side] As CATSplitSide) As


SewSurface

This method creates a “Sewn Surface” solid (see Section 7.3). “Surface” specifies the surface,
which is computed as a solid volume. The “Side” parameter determines the side of the solid. If
the value is “catPositiveSide,” the side will keep the direction vector of the sewn surface.
“CatNegativeSide” inverts the direction vector.

Func AddNewShaft ([Sketch] As Sketch) As Shaft


This method creates a shaft based on a sketch (see Section 7.2). The sketch must include an
axis.

Func AddNewShaft ([Sketch] As Sketch) As Shaft

This method creates a shaft based on a sketch (see Section 7.2). The sketch must include an
axis.

Func AddNewShell ([EntfernendeFlache] As Reference, [InnerThick, OuterThick] As


Double) As Shell

This method creates shell of a solid (see Section 7.5). All non-removed faces are thickened
inwardly with the “InnerThick” value and outwardly with the “OuterThick” value. A removed
surface is defined as a “Removed Surface” (RSur). See Section 3.5.4. If there are several
removed surfaces, they should be specified as empty reference surfaces (Section 3.5.3).
Surfaces are added with the AddFaceToRemove method of the Shellclass.

Func AddNewSlot ([Contour, CenterCurve] As Sketch) As Slot

This method creates a slot (see Section 7.2). “Contour” defines the profile of the slot, and
“CenterCurve” defines the guide curve.

Func AddNewSlotFromRef ([Contour, CenterCurve] As Reference) As Slot


This method creates a slot (see Section 7.2). “Contour” defines the profile of the slot, and
“CenterCurve” defines the guide curve.

Func AddNewSolidCombine ([Profil1, Profil2] As Reference) As SolidCombine

This method creates a solid combination of two profiles. The profiles are pulled normal to the
profile orientation. If a profile is a surface, it must have an orientation that uses
the FirstComponentDirection or SecondComponentDirection methods of
the SolidCombine class.

Func AddNewSolidEdgeFilletWithConstantRadius ([Edge] As Reference, [Propagation]


As CATFilletEdgePropagation, [Radius] As Double) As ConstRadEdgeFillet

This method creates a constant radius fillet on an edge (see Section 7.5). The edge is defined
as “Removed Edge” (Section 3.5.4). If multiple edges are in a fillet operation edge, the edges
are given an empty reference (Section 3.5.3). The edges are then added with
the AddObjectToFillet method of the ConstRadEdgeFillet class (Example 7.8). “Propagation”
determines which edges are filleted (“catMinimalFilletEdgePropagation”: only the referenced
edge, “catTangencyFilletEdgePropagation”: tangent continuity).

Func AddNewSolidEdgeFilletWithVaryingRadius ([Edge] As Reference, [Propagation] As


CATFilletEdgePropagation, [Variation] As CATFilletVariation, [DefaultRadius] As Double)
As VarRadEdgeFillet
This method creates a variable radius fillet on an edge (see Section 7.5). The edge is defined as
a “Removed Edge” (Section 3.5.4). “Propagation” determines which edges are filleted
(“catMinimalFilletEdgePropagation”: only the referenced edge,
“catTangencyFilletEdgePropagation”: tangent continuity). “Variation” determines whether the
curve between points at different radii are linear (“catLinearFilletVariation”) or cubic
(“catCubicFilletVariation”). The edge points where a radius value should be set are defined with
the AddImposedVertex method of the VarRadEdgeFillet class. An edge point is described as
a “vertex” (Section 3.5.4).

Func AddNewSolidFaceFillet ([Face1, Face2] As Reference, [Radius] As Double) As


FaceFillet

This method creates a fillet between two faces of a solid (see Section 7.5). The sketch must
include an axis. Both of these faces are classified as a “Removed Surface” (RSur). See Section
3.5.4.

Func AddNewSolidTritangentFillet ([Face1, Face2, RemoveFace] As Reference) As


TritangentFillet

This method creates a fillet tangent to three surfaces of a solid (see Section 7.5). If the fillet runs
tangentially to the supporting surfaces, the surface radius is eliminated. All three faces are
known as a “Removed Surface” (RSur). See Section 3.5.4.

Func AddNewSplit ([SplitElement] As Reference, [Side] As CATSplitSide) As Split

This method creates a split (see Section 7.3). The solid is cut off at the split element. The “Side”
parameter determines the side of the solid that is kept. If the value is “catPositiveSide,” the side
will be kept in the direction vector of the surface. “CatNegativeSide” inverts the direction vector.

Func AddNewStiffener ([Contour] As Sketch) As Stiffener

This method creates a stiffener based on a “Contour” (see Section 7.2).

Func AddNewStiffenerFromRef ([Contour] As Reference) As Stiffener

This method creates a stiffener based on a “Contour” (see Section 7.2).

Func AddNewSurfaceEdgeFilletWithConstantRadius ([Edge] As Reference, [Propagation]


As CATFilletEdgePropagation, [Radius] As Double) As ConstRadEdgeFillet

The method is similar to the AddNewSolidEdgeFilletWithConstantRadius method, but with


surface algorithms.
Func AddNewSurfaceEdgeFilletWithVaryingRadius ([Edge] As Reference, [Propagation]
As CATFilletEdgePropagation, [Variation] As CATFilletVariation, [DefaultRadius] As
Double) As VarRadEdgeFillet

The method is similar to the AddNewSolidEdgeFilletWithVaryingRadius method, but with


surface algorithms.
Func AddNewSurfaceFaceFillet ([Face1, Face2] As Reference, [Radius] As Double) As
FaceFillet
The method is similar to the AddNewSolidFaceFillet method, but with surface algorithms.
Func AddNewSurfaceTritangentFillet ([Face1, Face2, RemoveFace] As Reference) As
TritangentFillet

The method is similar to the AddNewSolidTritangentFillet method, but with surface algorithms.
Func AddNewSurfacicCircPattern ([Shape] As AnyObject, [NumberInRadialDirection,
NumberInAngularDirection] As Long, [SpacingInRadialDirection,
SpacingInAngularDirection] As Double, [RadialPosition, AngularPosition] As Long,
[ReferenceCenter, Axis] As Reference, [AxisOrientation] As Boolean, [RotationAngle] As
Double, [RadialOrientation, CompleteCrown] As Boolean) As CircPattern

The method is similar to the AddNewCircPattern method, but with surface algorithms. The only
difference is the “CompleteCrown” parameter. If the “CompleteCrown” parameter is “True,” the
circular pattern is evenly distributed over 360°.
Func AddNewSurfacicRectPattern ([Shape] As AnyObject, [Quantity1, Quantity2] As
Long, [Spacing1, Spacing2] As Double, [Position1, Position2] As Long, [Direction1,
Direction2] As Reference, [Orientation1, Orientation2] As Boolean, [RotationAngle] As
Double) As RectPattern

The method is similar to the AddNewRectPattern method, but with surface algorithms.
Func AddNewSurfacicUserPattern ([Shape] As AnyObject, [Quantity] As Long) As
UserPattern

The method is similar to the AddNewUserPattern method, but with surface algorithms.
Func AddNewSymmetry2 ([SymmetryElement] As Reference) As Symmetry
This method creates a symmetry of a solid about a symmetry element (see Section 7.4).

Func AddNewThickness ([Face] As Reference, [Thickness] As Double) As Thickness

This method creates a thickened “Face” of a solid (see Section 7.5). The face is classified as a
“Removed Surface” (RSur). See Section 3.5.4. If several faces should be specified as an empty
reference surface (Section 3.5.3), surfaces are added with the AddFaceToThicken method of
the Thickness class.

Func AddNewThickSurface ([Surface] As Reference, [Orientation] As Long, [Distance1,


Distance2] As Double) As ThickSurface

This method creates a thick surface (solid) based on a “Surface” (see Section 7.3). The
“Orientation” is “1” for an orientation toward the surface normal and “–1” for an inverted
orientation. “Distance1” defines the amount of thickening in the direction of the orientation;
“Distance2” is opposite to the orientation.

Func AddNewThreadWithOutRef As Thread

This method creates a thread definition (see Section 7.5). The thread must then be defined with
the methods of Thread class (Section 8.218).
Func AddNewThreadWithRef ([LateralSurface, Limit] As Reference) As Thread

This method creates a thread on a “LateralSurface” (see Section 7.5). The surface must be
cylindrical. “Limit” defines a limiting surface where the lateral surface terminates and serves as
reference of the thread depth. Both surfaces are classified as a “Removed Surface” (RSur).
See Section 3.5.4. The thread is then defined with the methods of Thread class (Section 8.218).

Func AddNewTranslate2 ([Distance] As Double) As Translate

This method creates a transformation of a solid (see Section 7.4). The direction of displacement
is defined by the Translate object of the body. The body is an object of
the ShapeHybridTranslate class (Section 8.147) and is extracted with
the HybridShape property of the Translate class.

Func AddNewTrim ([Body] As Body) As Trim

This method creates a “Trim” operation between two bodies (Section 3.3.4). The “Body” is
trimmed with the in-work body. The surfaces to be removed can be defined by using
the AddFaceToRemove method of the Trim class (Section 8.221) and are available as a
“Removed Surface” (RSur). See Section 3.5.4.

Func AddNewTritangentFillet (…) As TritangentFillet


This method has been deprecated since V5R14:
see AddNewSolidTritangentFillet or AddNewSurfaceTritangentFillet.
Func AddNewUserPattern ([Shape] As AnyObject, [Quantity] As Long) As UserPattern

This method creates a user-defined pattern of a solid (see Section 7.4). The location of
instances in the pattern is defined (Section 8.223) with
the AddFeatureToLocatePositions method of the UserPattern class. For example, this
method can use a sketch that contains points. When a sketch uses the value of the “Quantity”
parameter, the sketch is ignored.

Func AddNewVolume…
Volume is not covered in this book.

8.200 Shapes

This class represents a collection of solids. An object of the class is declared with
the Shapes property of the Body class (Section 8.9).
Object Path: Collection.Shapes
Func Item ([Index] As CATVariant) As Shape
This method returns a shape using its “Index.” “Index” can be a number or the name of the solid.

Func GetBoundary ([Boundary] As String) As Boundary


The method returns a boundary using its label.
8.201 Shell

This class represents a shell (see Section 7.5). An object of the class is created with
the AddNewShell method of the ShapeFactory class (Section 8.199).
Object Path: AnyObject.Shape.DressUpShape.Shell
Sub AddFaceToRemove [Face] As Reference
This method adds a face to those removed by the shell (“Faces to Remove” field). The face is
classified as a “Removed Surface” (RSur). See Section 3.5.4.

Sub AddFaceWithDifferentThickness [Face] As Reference


This method adds an existing face from those to be thickened with different offset values (“Other
Thickness Faces” field). The face is classified as a “Removed Surface” (RSur). See Section
3.5.4.

ExternalThickness As Length (Read Only)


This property returns the shell’s external thickness (“Default Outside Thickness” field). The
value can be edited with the Value method.

FacesToRemove As References (Read Only)


This property returns the collection of faces to be removed by the shell (“Faces to Remove”
field).

InternalThickness As Length (Read Only)


This property returns the shell’s internal thickness (“Default Inside Thickness” field). The value
can be edited with the Value method.

Sub RemoveFaceWithDifferentThickness [Face] As Reference


This method removes an existing face from those to be thickened with different offset values
(“Other Thickness Faces” field).

Sub SetVolumeSupport [VolumeSupport] As Reference


This method sets the volume support.
Sub WithdrawFaceToRemove [Face] As Reference
This method withdraws an existing face from those of the shell (“Faces to Remove” field).

8.202 Sketch

This class represents a sketch (Chapter 5). An object of the class is declared with
the Add or Item methods of the Sketches class (Section 8.204).
Object Path: AnyObject.Sketch
AbsoluteAxis As Axis2D (Read Only)
This property returns the 2D axis of the sketch (H and V). With the axis, geometric elements can
be placed horizontally or vertically in the sketch.

CenterLine As Line2D

This property returns the geometric 2D line defined as the center line of the sketch.

Sub CloseEdition

This method closes the sketch edition.

Constraints As Constraints (Read Only)

This property returns the list of constraints in the sketch.

Sub Evaluate
This method evaluates the constraint system of the sketch. It corresponds to an “Update” in the
sketcher.

Factory2D As Factory2D (Read Only)


This property returns the 2D toolbox of a sketch. When you need to edit a sketch, use
the OpenEdition method to create the 2D toolbox!

GeometricElements As GeometricElements (Read Only)


This property returns the list of geometrical elements in the sketch.

Sub GetAbsoluteAxisData [3DAxis] As CATSafeArrayVariant


This method returns the orientation and position of the absolute axis system of the sketch in 3D
space. The values of the array are assigned as follows: “0” to “2” (center of the axis system), “3”
to “5” (vector of the horizontal axis), and “6” to “8” (vector of the vertical axis).

Sub InverseOrientation
This method reverses the orientation of the sketch. The orientation of a contour-based solid is
thereby altered.

Func OpenEdition As Factory2D

This method creates a 2D toolbox and opens it for editing the sketch.

Sub SetAbsoluteAxisData [3DAxis] As CATSafeArrayVariant


This method sets the orientation and position of the absolute axis system of the sketch in 3D
space. This method is similar to the GetAbsoluteAxisData method’s.
8.203 SketchBasedShape

This class represents a solid defined by a sketch (Section 7.2). This class provides the basic
methods and properties for the child classes.
Object Path: AnyObject.Shape.SketchBasedShape
Sub SetProfileElement [ReferenceElement] As Reference
This method sets the profile of the solid.

Sketch As Sketch (Read Only)


This property returns the sketch of the solid.

8.204 Sketches

This class represents a collection of sketches (Section 5.1). An object of the class is created
with the Sketches property of the Body class (Section 8.9) or the HybridSketches property of
the HybridBody class (Section 8.50).
Object Path: Collection.Sketches
Func Add ([ReferenceElement] As Reference) As Sketch
This method creates a new sketch and adds it to the sketch collection. A sketch reference is a
plane or planar surface.

Func Item ([Index] As CATVariant) As Sketch


This method returns a sketch using its “Index” from the sketch collection. “Index” can be a
number or the name of the sketch.
Func GetBoundary ([Name] As String) As Boundary
This method returns a boundary using its label.

8.205 Slot

This class represents a slot (see Section 7.2). An object of the class is created with
the AddNewSlot or AddNewSlotFromRef methods of the ShapeFactory class (Section 8.199).
The class does not have any properties or methods. The properties and methods of the parent
classes are used.
Object Path: AnyObject.Shape.SketchBasedShape.Sweep.Slot

8.206 SolidCombine
This class represents a solid combine. An object of the class is created with
the AddNewSolidCombine method of the ShapeFactory class (Section 8.199).
Object Path: AnyObject.Shape.SketchBasedShape.SolidCombine
FirstComponentDirection As Reference
This property returns the direction of the first component direction (“First Component, Direction”
field).
FirstComponentProfile As Reference
This property returns the direction of the first component profile (“First Component, Profile” field).
SecondComponentDirection As Reference
This property returns the direction of the second component direction. Refer
to FirstComponentDirection.
SecondComponentProfile As Reference
This property returns the direction of the second component profile. Refer
to FirstComponentProfile.

8.207 Spline2D

This class represents a 2D spine (see Section 5.2). An object of the class is created with
the CreateSpline method of the Factory2D class (Section 8.35).
Object Path: AnyObject.GeometricElement.Geometrie2D.Curve2D.Spline2D
Sub GetControlPoints [Points] As CATSafeArrayVariant
This method gets the control points of the spline as an array.

Func GetNumberOfControlPoints As Double


This method gets the number of control points of the spline.

Sub InsertControlPointAfter [Point] As Point2D, [Position] As Long


This method inserts a control “Point” in the spline after the “Position.” If the “Position” is zero,
the new point is inserted at the first location.
8.208 Split

This class represents a split (see Section 7.3). An object of the class is created with
the AddNewSplit method of the ShapeFactory class (Section 8.199).
Object Path: AnyObject.Shape.SurfaceBasedShape.Split

SplittingSide As CATSplitSide
This property returns which side of the split will be kept. It is recommended to use the text
expression of the identifier. The value range is “catPositiveSide” (side in the direction vector of
the split element) and “catNegativeSide” (side opposite of the direction vector of the split
element).

8.209 Stiffener

This class represents a stiffener (see Section 7.2). An object of the class is created with
the AddNewStiffener or AddNewStiffenerFromRef methods of the ShapeFactory class
(Section 8.199).
Object Path: AnyObject.Shape.SketchBasedShape.Stiffener

IsFromTop As Boolean
This property returns or sets the mode of the stiffener (“Mode” field). If the property is “True,” the
“From Top” mode is checked.
IsSymmetric As Boolean
This property returns or sets whether the rib is formed symmetrically about the sketch (“Neutral
Fiber” field). If the property is “True,” the field is checked.

Sub ReverseDepth
This method reverses the orientation of the stiffener depth (“Depth, Reverse Direction” button).

Sub ReverseThickness
This method reverses the orientation of the stiffener thickness (“Thickness, Reverse Direction”
button). The IsSymmetric property must be disabled in order to use this method.

Thickness As Length (Read Only)


This property returns the value of the stiffener thickness (“Thickness” field) if
the IsFromTop property is disabled. The value can be edited with the Value method.

ThicknessFromTop As Length (Read Only)


This property returns the value of the stiffener thickness (“Thickness” field) if
the IsFromTop property is enabled. The value can be edited with the Value method.

8.210 StrParam

This class represents a parameter of the “String” type (see Section 3.4.1). An object of the class
is created with the CreateString method of the Parameters class (Section 8.167).
Object Path: AnyObject.Parameter.StringParam
Sub GetEnumerateValues [Values] As CATSafeArrayVariant
This method returns an array containing the different values of the parameter.

Func GetEnumerateValuesSize As Long


This method returns the number of values of the parameter.

Sub SetEnumerateValues [Values] As CATSafeArrayVariant


This method sets an array containing the different values of the parameter.

Sub SuppressEnumerateValues
This method sets an array containing the different values that the parameter can take (if there
are multiple values).

Value As CATBSTR
This property returns or sets the string parameter value.
8.211 SurfaceBasedShape

This class represents a solid defined by a surface or surface-based operation (see Section 7.3).
This class provides the basic properties for the CloseSurface (Section
8.16), SewSurface (Section 8.196), Split (Section 8.208), and ThickSurface (Section 8.217)
child classes.
Object Path: AnyObject.Shape.SurfaceBasedShape
Surface As Reference
This property returns or sets the surface or surface base of the solid.

8.212 Sweep

This class represents a solid translation. It provides basic methods and properties of
its Rib (Section 8.190) and Slot (Section 8.205) child classes.
Object Path: AnyObject.Shape.SketchBasedShape.Sweep
AnchorDirReverse As Boolean
This property returns whether the anchor direction is inverted (“True”) or not (“False”). The
property is only available if the MoveProfileToPath property is “True.”

CenterCurve As Sketch (Read Only)


This property returns or sets the center curve.

CenterCurveElement As Reference
This property returns or sets the center curve as a reference.

IsThin As Boolean
This property determines whether the sweep is thin (thin is “True”).

MergeEnd As Boolean
This property returns the state of the “Merge Ends” option (enabled: “True”). The property is
only available if the IsThin property is “True.”

MergeMode As CATMergeMode
This property returns or sets the end mode (“Merge Ends” field). The value range is
“catMergeOff” (not limited by existing material) and “catMergeOn” (limited by existing material).

MoveProfileToPath As Boolean
This property returns the state of the “Move Profile to Path” option. If the property is “True,” the
option is enabled.

NeutralFiber As Boolean
This property returns the state of the “Neutral Fiber” option. If the option is enabled (“True”), the
swept solid is symmetric about the contour. The property is only available if the IsThin property
is “True.”

NormalAxisDirReverse As Boolean
This property returns whether the axial direction of the profile is inverted (“True”) or not (“False”).
The property is only available if the MoveProfileToPath property is “True.”

PullingDirElement As Reference
This property returns or sets the pulling direction.

ReferenceSurfaceElement As Reference
This property returns or sets the reference surface.

Sub SetKeepAngleOption
This method sets the option that will maintain the angular position of the contour to the center
curve.

8.213 Symmetry

This class represents the symmetry of a solid (see Section 7.4). An object of the class is created
with the AddNewSymmetry2 method of the ShapeFactory class (Section 8.199).
Object Path: AnyObject.Shape.Symmetry

HybridShape As HybridShapeSymmetry (Read Only)


This property returns or sets the underlying HybridShape of the solid. Modify the properties
with the HybridShapeSymmetry class (Section 8.145).

8.214 SystemService
This class represents a communication service with the operating system and provides the
methods for accessing system variables and external programs (Sections 2.7 and 2.8). An
object of the class is declared with the SystemService property of the Application class
(Section 8.5).
Object Path: AnyObject. SystemService
Func Environ ([Variable] As CATBSTR) As CATBSTR
This method returns the value of an environment variable.

Func Evaluate ([SourceCode] As CATBSTR, [Language] As CATScriptLanguage,


[FunctionName] As CATBSTR, [Parameter] As CATSafeArrayVariant) As CATVariant
This method evaluates the “Function” of the “SourceCode.” The “Language” parameter defines
the macro language. “Parameter” is the parameter of the function being evaluated. Unlike with
the ExecuteScriptmethod, the source code is passed directly to the Evaluate method as a
parameter.
Value range of the CATScriptLanguage identifier:
CATVBScriptLanguage (CATIA-VBScript)

CATVBALanguage (CATIA-VBA)

CATBasicScriptLanguage (CATScript)

CATJavaLanguage (Java)

CATJScriptLanguage (JavaScript, not yet usable)

Func ExecuteBackgroundProcessus ([Command] As CATBSTR) As Long


This method executes a command in the background and returns a successful message. When
successful, the result is “0.” The macro runs without stopping.

Func ExecuteProcessus ([Command] As CATBSTR) As Long


This method executes a command in the foreground and waits until it is finished. When
successful, the result is “0.”

Func ExecuteScript ([Library] As CATBSTR, [Type] As CATScriptLibraryType,


[ScriptName, Function] As CATBSTR, [Parameter] As CATSafeArrayVariant) As
CATBSTR
This method executes a script. “Library” defines the name or location of the library of
CATScripts. “Type” determines the type of library. “ScriptName” and “Function” select the name
of the script and whether it is a function or subroutine. “Parameter” sets an array of parameters
for the function. The method returns the result of the function. If a subroutine has been called,
the return value is an empty string.
Value range of the CATScriptLibraryType identifier:
0: catScriptLibraryTypeDocument (storage in a CATIA document, e.g. CATPart)

1: catScriptLibraryTypeDirectory (storage in a directory)

2: catScriptLibraryTypeVBAProject (storage in a project)

Sub Print ([Text] As CATBSTR)


This method prints the contents of the “Text” parameter to standard output.

8.215 TextStream
This class represents file access to a text file (Section 2.6). It allows the reading and writing of
data sets. An object of the class is declared with the OpenAsTextStream method of
the File class (Section 8.36).
Object Path: CATIA.FileSystem.File.TextStream
AtEndOfLine As Boolean
This property returns a Boolean value that specifies whether the index position in the stream is
at the end of the line.

AtEndOfStream As Boolean
This property returns a Boolean value that specifies whether the index position in the stream is
at the end of the stream.
Sub Close
This method closes a text stream.

Func Read ([NumberOfCharacters] As Long) As CATBSTR


This method returns a string that contains a given number of characters from the current
position in the stream. The number of characters to read is determined by the
“NumberOfCharacters” parameter. One or more rows can be ignored. In this case, the line
breaks, CHR(10), are included in the result. When the file reaches the end, the length of the
returned string is less than the value of the “NumberOfCharacters” parameter.

Func ReadLine As CATBSTR


This method returns a string that contains a line of characters from the current position in the
stream.

Sub Write [Text] As CATBSTR


This method writes a string in the text stream. If a data set is written, the last character of the
parameter must be CHR (10).
8.216 Thickness

This class represents a solid thickness (see Section 7.5). It allows the reading and writing of
data sets. An object of the class is created with the AddNewThickness method of
the ShapeFactory class (Section 8.199).
Object Path: AnyObject.Shape.DressUpShape.Thickness

Sub AddFaceToThicken [Face] As Reference


This method adds a new face to be thickened (“Default Thickness Faces” field). The face is
classified as a “Removed Surface” (RSur). See Section 3.5.4.

Sub AddFaceWithDifferentThickness [Face] As Reference


This method adds an existing face from those to be thickened with different offset values (“Other
Thickness Faces” field). The face is classified as a “Removed Surface” (RSur). See Section
3.5.4.

FacesToThicken As References (Read Only)


This property returns the collection of faces to be thickened (“Default Thickness Faces” field).

Offset As Length (Read Only)


This property returns or sets the thickness value (“Default Thickness” field). The value can be
edited with the Value method.

Sub RemoveFaceWithDifferentThickness [Face] As Reference


This method removes an existing face from those to be thickened with different offset values
(“Other Thickness Faces” field).

Sub SetVolumeSupport [VolumeSupport] As Reference


This method sets the volume support for the thickness.
Sub WithdrawFaceToThicken [Face] As Reference
This withdraws an existing thickened face (“Default Thickness” field).
8.217 ThickSurface

This class represents a solid thickness based on a surface (see Section 7.3). An object of the
class is created with the AddNewThickSurface method of the ShapeFactory class (Section
8.199).
Object Path: AnyObject.Shape.SurfaceBasedShape.ThickSurface

BotOffset As Length (Read Only)


This property returns the value of the bottom offset (“Second Offset” field). The value can be
edited with the Value method.

OffsetSide As Long (Read Only)


This property returns the offset direction of the thick surface. If the value is “1,” the thick surface
is oriented in the direction of the surface normal. “–1” is an inverted orientation.

Sub Swap_OffsetSide
This method reverses the orientation of the thick surface (“Reverse Direction” button).

TopOffset As Length (Read Only)


This property returns the value of the top offset (“First Offset” field). The value can be edited
with the Value method.
8.218 Thread

This class represents a thread (see Section 7.5). An object of the class is created with
the AddNewThreadWithOutRef or AddNewThreadWithRef methods of
the ShapeFactory class (Section 8.199).
Object Path: AnyObject.Shape.DressUpShape.Thread
Sub CreateStandardThreadDesignTable [Type] As CatThreadStandard
This method creates a standard thread design table (“Numerical Definition, Type” dropdown list).

Sub CreateUserStandardDesignTable [Name, FilePath] As String


This method is similar to the CreateUserStandardDesignTable method of the Hole class
(Section 8.48).
Depth As Double
This property returns the thread depth (“Thread Depth” field).

Diameter As Double
This property returns the thread diameter (“Thread Diameter” field).

LateralFaceElement As Reference
This property returns or sets the lateral face (“Lateral Face” field). The surface must be
cylindrical and is defined as a “Removed Surface” (RSur). See Section 3.5.4.

LimitFaceElement As Reference
This property returns or sets the limit face (“Limit Face” field). The surface is defined as a
“Removed Surface” (RSur). See Section 3.5.4.

Pitch As Double
This property returns the thread pitch (“Pitch” field).

Sub ReverseDirection
This method reverses the direction of the thread.

Sub SetExplicitPolarity [Polarity] As CatThreadPolarity


This method determines whether the thread is a female thread (“catTap”) or is a male thread
(“catThread”).

Side As CATThreadSide
This property returns the thread or tap side (“Pitch” field). You should use the text expression of
the identifier. The value range is “catRightSide” (right-hand thread) and “catLeftSide” (left-hand
thread).

ThreadDescription As StrParam (Read Only)


This property returns the thread description parameter (e.g. “M8”).

8.219 TransformationShape

This class represents a solid that is defined by a transformation (see Section 7.4). This class
does not have any properties or methods.
Object Path: AnyObject.Shape.TransformationShape

8.220 Translate

This class represents a solid translation (see Section 7.4). An object of the class is created with
the AddNewTranslate2 method of the ShapeFactory class (Section 8.199).
Object Path: AnyObject.Shape.Translate

HybridShape As HybridShapeTranslate (Read Only)


This property returns the underlying HybridShape of the solid body.

8.221 Trim

This class represents a “Trim” Boolean operation (see Section 3.3.4). An object of the class is
created with the AddNewTrim method of the ShapeFactory class (Section 8.199).
Object Path: AnyObject.Shape.BooleanShape.Trim

Sub AddFaceToKeep [Face] As Reference


This method adds a new face to be kept (“Faces to Keep” field). The face is known as a
“Removed Surface” (RSur). See Section 3.5.4. The surface must not be divided by the second
body.

Sub AddFaceToKeep2 [Face, AdjacentFace] As Reference


This method adds a new face to be kept (“Faces to Keep” field). Unlike with
the AddFaceToKeep method, faces are cut if the face is divided by the operation. Both faces
are considered as a “Removed Surface” (RSur). See Section 3.5.4.

Sub AddFaceToRemove [Face] As Reference


This method adds a new face to be removed (“Faces to Remove” field). The face is known as a
“Removed Surface” (RSur). See Section 3.5.4. The surface must not be divided by the second
body.

Sub AddFaceToRemove2 [Face, AdjacentFace] As Reference


This method adds a new face to be removed (“Faces to Remove” field). Unlike with
the AddFaceToRemove method, faces are cut if the face is divided by the operation. Both
faces are considered as a “Removed Surface” (RSur). See Section 3.5.4.
Sub WithdrawFaceToKeep [Face] As Reference
This method withdraws an existing kept face defined with the AddFaceToKeep method.

Sub WithdrawFaceToKeep2 [Face, AdjacentFace] As Reference


This method withdraws an existing kept face defined with the AddFaceToKeep2 method.

Sub WithdrawFaceToRemove [Face] As Reference


This method withdraws an existing removed face defined with the AddFaceToRemove method.

Sub WithdrawFaceToRemove2 [Face, AdjacentFace] As Reference


This method withdraws an existing removed face defined with
the AddFaceToRemove2 method.

8.222 TritangentFillet

This class represents a tritangent fillet (see Section 7.5). An object of the class is created with
the AddNewSolidTritangentFillet or AddNewSurfaceTritangentFillet methods of
the ShapeFactory class (Section 8.199).
Object Path: AnyObject.Shape.DressUpShape.Fillet.TritangentFillet
FaceToRemove As Reference
This property returns a face to be removed (“Faces to Remove” field). The face is defined as a
“Removed Surface” (RSur). See Section 3.5.4.

FirstFace As Reference
This property returns or sets the reference to the first support surface (“Faces to Fillet” field).
The face is defined as a “Removed Surface” (RSur). See Section 3.5.4.

SecondFace As Reference
This property returns or sets the reference to the second support surface (refer to FirstFace).
8.223 UserPattern

This class represents a user pattern (see Section 7.4). An object of the class is created with
the AddNewUserPattern or AddNewSurfacicUserPattern methods of
the ShapeFactory class (Section 8.199).
Object Path: AnyObject.Shape.TransformationShape.Pattern.UserPattern

Sub AddFeatureToLocatePositions [Pattern] As AnyObject


This method adds a new element to locate instances (“Positions” field). In general this is a
sketch that contains only points.

AnchorPoint As AnyObject
This property returns the anchor point of the user pattern (“Anchor” field).
FeatureToLocatePositions As AnyObject (Read Only)
This property returns the collection of elements to locate instances (“Positions” field).

8.224 VarRadEdgeFillet

This class represents a variable radius fillet (see Section 7.5). An object of the class is created
with
the AddNewSolidEdgeFilletWithVaryingRadius or AddNewSurfaceEdgeFilletWithVaryingR
adiusmethods of the ShapeFactory class (Section 8.199).
Object Path: AnyObject.Shape.DressUpShape.Fillet.EdgeFillet.VarRadEdgeFillet
Sub AddEdgeToFillet [Edge] As Reference, [Radius] As Double
This method adds a new edge to the variable radius edge fillet (“Edge(s) to Fillet” field). The
edges are defined as “Removed Edges” (REdge). See Section 3.5.4.

Sub AddImposedVertex [Point] As Reference, [Radius] As Double


This method adds a point to the points list (“Points” field). The point is defined as a “Vertex”
(Section 3.5.4).

BitangencyType As CATFilletBitangencyType
This property returns or sets the fillet bitangency type (“Circle Fillet” field). The value range is
“catSphereBitangencyType” (cross section perpendicular to the supporting surface) and
“catCircleBitangencyType” (cross section perpendicular to a spine).

EdgesToFillet As References (Read Only)


This property returns the collection of edges to be filleted (“Edge(s) to Fillet” field).

FilletSpine As Reference
This property returns or sets the spine if the BitangencyType property is
“CATCircleBitangencyType” (“Spine” field).

FilletVariation As CATFilletVariation
This property returns or sets the edge fillet radius variation mode (“Variation” field). The value
range is “catLinearFilletVariation” and “catCubicFilletVariation.”

Func ImposedVertexRadius ([Point] As Reference) As Length


This method returns the fillet radius on an imposed vertex. The value can be edited with
the Value method.

ImposedVertices As References (Read Only)


This property returns the collection of vertices where a radius has been imposed (“Points” field).

Sub WithdrawEdgeToFillet [Kante] As Reference


This method withdraws an edge from the fillet (“Edge(s) to Fillet” field).

Sub WithdrawImposedVertex [Point] As Reference


This method withdraws a vertex from the fillet (“Points” field).

8.225 VisPropertySet
This class represents a toolbox with which the visual properties of an object can be analyzed
and changed. An object of the class is created with the VisProperties method of
the Selection class (Section 8.195).
Object Path: AnyObject.VisPropertySet
Func GetLayer ([Type] As CatVisLayerType, [Number] As Long) As CatVisPropertyStatus
This method returns the number and type of the layer elements in a selection. If the type is
“catVisLayerBasic,” a layer is given. If the type is “catVisLayerNone,” a layer is not given. The
return value of the function signals the success of the method. If the return value is
“catVisPropertyDefined,” all tested items are on the same layer. If the return value is
“catVisPropertyUnDefined,” at least one element differs.

Func GetPick ([Pick] As CatVisPropertyPick) As CatVisPropertyStatus


This method returns the state of the pick mode for the current selection (“Pick Mode”). If “Pick”
equals “catVisPropertyPickAttr,” the elements are selectable. If “Pick” equals
“catVisPropertyNoPickAttr,” the elements cannot be selected. The return value of the function
signals the success of the method. If the return value is “catVisPropertyDefined,” all tested
elements have the same pick mode. If the return value is “catVisPropertyUnDefined,” at least
one element differs.

Func GetRealColor ([Red, Green, Blue] As Long) As CatVisPropertyStatus


This method retrieves the RGB values of the real colors of elements in a selection (see Section
2.5.1). The return value of the function signals the success of the method. If the return value is
“catVisPropertyDefined,” all tested elements have the same color. If the return value is
“catVisPropertyUnDefined,” at least one element differs.

Func GetRealInheritance ([PropertyType] As CatVisPropertyType, [Inheritance] As Long)


As CatVisPropertyStatus
This method retrieves whether an expression is activated for a real inheritance (see Section
2.5.1). If “Inheritance” is “1,” an inheritance is enabled. If “Inheritance” is “0,” inheritance is not
enabled. “PropertyType” has the following values: “catVisPropertyLineType” (line type),
“catVisPropertyWidth” (line width), “catVisPropertyColor” (color), and “catVisPropertyOpacity”
(transparency). The return value of the function signals the success of the method. If the return
value is “catVisPropertyDefined,” all tested elements have the same characteristics. If the return
value is “catVisPropertyUnDefined,” at least one element differs.

Func GetRealLineType ([LineType] As Long) As CatVisPropertyStatus


This method retrieves the line type (see Section 2.5.1) as a position number in the
“Tools/Options/General/Display/Line Type” list (value between 1 and 63). The return value of
the function signals the success of the method. If the return value is “catVisPropertyDefined,” all
tested elements have the same line type. If the return value is “catVisPropertyUnDefined,” at
least one element differs.

Func GetRealOpacity ([Transparency] As Long) As CatVisPropertyStatus


This method retrieves the real transparency (see Section 2.5.1) of the elements in a selection.
The value of “Transparency” has a value range from “0” (transparent) to “255” (opaque). The
return value of the function signals the success of the method. If the return value is
“catVisPropertyDefined,” all tested elements have the same transparency. If the return value is
“catVisPropertyUnDefined,” at least one element differs.

Func GetRealWidth ([LineWidth] As Long) As CatVisPropertyStatus


This method retrieves the real line width (real, see Section 2.5.1) of the elements in a selection
as the position number of the “Tools/Options/General/Display/Thickness” list (value between 1
and 55). The return value of the function signals the success of the method. If the return value is
“catVisPropertyDefined,” all the elements tested have the same line width. If the return value is
“catVisPropertyUnDefined,” at least one element differs.

Func GetShow ([InShow] As CatVisPropertyShow) As CatVisPropertyStatus


This method retrieves the state show mode for the current selection (“Show/NoShow” mode). If
“InShow” equals “catVisPropertyShowAttr,” the elements are in show. If “InShow” equals
“catVisPropertyNoShowAttr,” the elements are in no-show. The return value of the function
signals the success of the method. If the return value is “catVisPropertyDefined,” all the
elements tested have the same show state. If the return value is “catVisPropertyUnDefined,” at
least one element differs.

Func GetSymbolType ([SymbolType] As Long) As CatVisPropertyStatus


This method retrieves the symbol type of the elements of a selection (range, see Sample
Program). The return value of the function signals the success of the method. If the return value
is “catVisPropertyDefined,” all tested elements have the same symbol. If the return value is
“catVisPropertyUnDefined,” at least one element differs.

Func GetVisibleColor ([Red, Green, Blue] As Long) As CatVisPropertyStatus


This method gets the RGB values of the visible color (see Section 2.5.1). Refer
to GetRealColor.
Func GetVisibleInheritance ([PropertyType] As CatVisPropertyType, [Inheritance] As
Long) As CatVisPropertyStatus
This method gets the visible inheritance (see Section 2.5.1). Refer to GetRealInheritance.
Func GetVisibleLineType ([LineType] As Long) As CatVisPropertyStatus
This method gets the visible line type (see Section 2.5.1). Refer to GetRealLineType.
Func GetVisibleOpacity ([Transparency] As Long) As CatVisPropertyStatus
This method gets the visible transparency (see Section 2.5.1). Refer to GetRealOpacity.
Func GetVisibleWidth ([LineWidth] As Long) As CatVisPropertyStatus
This method gets the visible line width (see Section 2.5.1). Refer to GetRealWidth.
Sub SetLayer [Type] As CatVisLayerType, [Number] As Long
This method sets the number (0 to 999) and the layer type of the elements in a selection. If the
type is “catVisLayerBasic,” a layer is assigned. If the type is “catVisLayerNone,” the layer is
removed.

Sub SetPick [Pick] As CatVisPropertyPick


This method sets the state of elements in pick mode. If “Pick” equals “catVisPropertyPickAttr,”
the elements are in pick mode. If “Pick” equals “catVisPropertyNoPickAttr,” the elements are in
no-pick mode.

Sub SetRealColor [Red, Green, Blue, Inheritance] As Long


This method sets the RGB values of the real colors of elements in a selection (see Section
2.5.1). The color values are a number between “0” and “255.” Inheritance is either “0” (no
inheritance) or “1” (inheritance).

Sub SetRealLineType [LineType, Inheritance] As Long


This method sets the line type (see Section 2.5.1) as a position number in the
“Tools/Options/General/Display/Line Type” list (value between 1 and 63). Inheritance is either “0”
(no inheritance) or “1” (inheritance).

Sub SetRealOpacity [Transparency, Inheritance] As Long


This method sets the real transparency (see Section 2.5.1) of the elements in a selection. The
value of “Transparency” has a value range from “0” (transparent) to “255” (opaque). Inheritance
is either “0” (no inheritance) or “1” (inheritance).

Sub SetRealWidth [LineWidth, Inheritance] As Long


This method sets the real line width (see Section 2.5.1) of the elements in a selection as the
position number of the “Tools/Options/General/Display/Thickness” list (value between 1 and 55).
Inheritance is either “0” (no inheritance) or “1” (inheritance).

Sub SetShow [ImShow] As CatVisPropertyShow


This method sets the state of the show mode for the current selection (see Section 2.5.2). If
“InShow” equals “catVisPropertyShowAttr,” the elements are in show. If “InShow” equals
“catVisPropertyNoShowAttr,” the elements are in no-show.

Sub SetSymbolType [SymbolType] As Long


This method sets the symbol type of the elements in a selection. The value range is similar to
the GetSymbolType method’s.
Sub SetVisibleColor [Red, Green, Blue, Inheritance] As Long
This method sets the visible color (see Section 2.5.1). Refer to SetRealColor.
Sub SetVisibleLineType [LineType, Inheritance] As Long
This method sets the visible line type (see Section 2.5.1). Refer to SetRealLineType.
Sub SetVisibleOpacity [Transparency, Inheritance] As Long
This method sets the visible transparency (see Section 2.5.1). Refer to SetRealOpacity.
Sub SetVisibleWidth [Linienstarke, Vererbung] As Long
This method sets the visible line width (see Section 2.5.1). Refer to SetRealWidth.
9. Featured VBScript Commands
In this chapter, important VBScript commands for programming with CATScript are listed.

9.1 Abs
Abs is a function that returns the absolute value of a number (amount).

Example:

9.2 Asc
Asc is a function that returns the numerical ANSI character code value of the first character in a
string.

Example:

9.3 Boolean
Boolean is a variable type that can make values “True” or “False.”

9.4 Byte
Byte is a variable type with a range of “0” to “255.”

9.5 CBool
CBool is a function that returns the result of a logical test of a “Boolean” variable type.
Example:

9.6 CByte
CByte is a function that returns a number converted to the “Byte” variable type. Decimal points
are rounded. If the decimal point is equal to “0.5,” it is rounded to the nearest even number.

Example:
9.7 CDate
CDate is a function that transfers an expression into the date-time format with the “Date”
variable type. The expression must correspond to the national convention. If the expression is a
number, the integer part of a date is converted into the fractional part of time.

Example:

9.8 CDbl
CDbl is a function that returns a number converted to the “Double” variable type.

Example:

9.9 Chr
Chr is a function that converts a number into a character of the ANSI character code.

Example:

9.10 CInt
CInt is a function that returns a number converted to the “Integer” variable type. Decimal places
are rounded. If the decimal point is equal to “0.5,” it is rounded to the nearest even number.

Example:

9.11 CLng
CLng is a function that returns a number converted to the “Long” variable type. Decimal places
are rounded. If the decimal point is equal to “0.5,” it is rounded to the nearest even number.

Example:
9.12 Const
Const declares a variable as a constant. The following code’s assignment value is reported as
an error in the macro.

Example:

9.13 Cos
Cos is a function that calculates the cosine of an angle. The result is between “—1” and “1.” The
angle is measured in radians.

Example:

9.14 CSng
CSng is a function that returns a number converted to the “Single” variable type.

Example:

9.15 CStr
CStr is a function that converts an expression to the “String” variable type.

Example:

9.16 Date
Date is a function that either designates the “Date-Time” variable type (e.g. “11/08/2002
12:34:58”) or returns the current date of the operating system.

Example:
9.17 Day
Day is a function that returns the date as an integer.

Example:

9.18 Dim
Dim declares one or more variables (Section 1.8.2). Whether inside a function or subroutine,
the declaration is only valid in the statement where it resides. If the declaration is made in the
head of a macro, it is valid for all functions and subroutines.

Example:

9.19 Dim ()
Dim () declares a variable or object field (Section 1.8.2). The index is a dimension with counting
started at “0.” The dimension of a field can be changed in a macro with the ReDim statement
(Section 9.57).

Example:

9.20 Double
Double is the variable type for floating point double precision.

9.21 Do-Until
Do-Until describes a loop with an initial condition (Section 1.9.5).

9.22 Do-While
Do-While describes a loop with an input condition (Section 1.9.4).

9.23 Empty
Empty is an uninitialized identifier for the contents of a variable (see Section 9.38).

9.24 End
End marks the end of a function, subroutine, loop, or branch.
9.25 Err
Err is an object that is automatically available in a macro and gives information about the error
status of the macro. The object is used in conjunction with the statement On Error Resume
Next (Section 9.55).

9.26 Exit
Exit is a statement that prematurely terminates a function, subroutine, loop, or branch.

9.27 Exp
Exp is a function that calculates to a power of “n.”

Example:

9.28 Fix
Fix is a function that returns the integer portion of a number (see Section 9.35). The decimal
places are truncated.

Example:

9.29 For-Next
For-Next describes an incrementing loop (Section 1.9.3).

9.30 Function
Function marks the beginning of a function (Section 1.8.3.3).

9.31 Hour
Hour is a function that prints the hour of a time as an integer.

Example:
9.32 If-Then-Else
If-Then-Else describes a branch (Section 1.9.1).

9.33 InputBox
InputBox is a function for text entry (Section 2.1.2).

9.34 InStr
InStr is a function that determines the position of a substring “Part” in the string “All.” The
optional parameter “Start” can be specified, starting from which character is being compared.

Example:

9.35 Int
Int is a function that returns the integer portion of a number (see Section 9.28). The fractional
part of a positive number is truncated. A negative number is rounded to the nearest whole
number.

Example:

9.36 Integer
Integer is the variable type for an integer.

9.37 IsDate
IsDate is a function that checks whether an expression is the “Date-Time” variable type. The
parameter “Expression” can be the “Date” or “String” variable type.

Example:

9.38 IsEmpty
IsEmpty is a function that checks whether a variable is initialized. The function returns “True” if
the variable has not yet been assigned a value (see Section 9.23).

Example:
9.39 IsNull
IsNull is a function that checks whether a variable contains an invalid value. The function
returns “True” if the contents of a variable are “0” (Section 9.54).

Example:

9.40 IsNumeric
IsNumeric is a function that checks whether a character string is a number. The function
returns “True” if the entire expression is recognized as a number.

Example:

9.41 Join
Join is a function that converts the contents of a one-dimensional array to a “String” variable
type. The optional parameter “Delimiter” defines a character to be written between each value of
the field variables. If the parameter is omitted, a space is used as a delimiter.

Example:
9.42 LCase
LCase is a function that converts a string into a string consisting of lowercase letters.

Example:

9.43 Left
Left is a function that returns a specified number of characters from the left side of a string.

Example:

9.44 Len
Len is a function that prints the number of characters in a string.

Example:

9.45 Log
Log is a function that determines the natural logarithm of a number. A natural logarithm has the
base “n.”

Example:

9.46 Long
Long is a variable type for an integer that has an increased range of values.

9.47 LTrim
LTrim is a function that creates a string that has no spaces at the beginning of the string.
Example:

9.48 Mid
Mid is a function that reads a specified number of characters from a string. “Start” indicates the
position of the first character. “Length” is the number of characters read, including the start
character.

Example:

9.49 Minute
Minute is a function that prints the minute of a time as an integer.

Example:

9.50 Mod
Mod is an operator that determines the modulus. The modulus is the remainder of an integer
division.
Example:

9.51 Month
Month is a function that returns the month of a date as an integer.

Example:

9.52 MsgBox
MsgBox is a function for a text output (Section 2.1.1).

9.53 Now
Now is a function that returns the current date and time of the operating system.

Example:
9.54 Null
Null is an identifier for the invalid contents of a variable (see Section 9.39).

9.55 On Error Resume Next


The On Error Resume Next statement tells the macro to pass a runtime error and jump to the
next instruction. Note: this statement is only valid for its respective function or subroutine!
The Err object (Section 9.25) responds to a runtime error in the macro.
Example:

9.56 Randomize
The Randomize statement initializes the random number generator (see Section 9.60).

9.57 ReDim
ReDim is a statement that assigns a variable field to one dimension (see Section 9.19).

Example:

9.58 Rem
Rem marks a comment line. Rem is an abbreviation for the apostrophe character (see Section
1.8.1).

9.59 Right
Right is a function that returns a specified number of characters from the right side of a string.

Example:
9.60 Rnd
Rnd is a function that returns a random value between “0” (inclusive) and “1” (exclusive). In the
head of a macro that uses the Rnd function, use the Randomize statement to initialize the
random number generator through the system clock (Section 9.56).

Example:

9.61 RTrim
RTrim is a function that creates a string that has no spaces at the end of the string.

Example:

9.62 Second
Second is a function that prints the second of a time as an integer.

Example:

9.63 Select Case


Select Case indicates a branch that separates multiple blocks of statements (Section 1.9.2).

9.64 Set
Set directs the definition of an object (Section 1.8.2).

9.65 Sin
Sin is a function that calculates the sine of an angle. The result is between “–1” and “1.” The
angle is measured in radians.

Example:

9.66 Single
Single is a variable type for floating point single precision.

9.67 Sgn
Sgn is a function that determines the sign of a number. The function can take the values “–1,”
“0,” and “1.” If the number is negative, the function value is “–1.” If the number is zero, the value
is “0.”
Example:

9.68 Sqr
Sqr is a function that determines the square root of a number.

Example:

9.69 StrReverse
StrReverse is a function that reverses the sequence of characters in a string.

Example:

9.70 String
String is a variable type for a string.
9.71 Sub

Sub marks the beginning of a subroutine (Section 1.8.3.2).

9.72 Tan
Tan is a function that calculates the tangent of an angle. The angle is measured in radians.

Example:

9.73 Time
Time is a function that returns the current time of the operating system.

Example:

9.74 Timer
Timer is a function that prints the number of seconds that have elapsed from midnight
(operating system time). This function can be stopped with macro times.
Example:

9.75 TimeValue
TimeValue is a function that generates a time from a string or extracts a proportion o time from
a date.

Example:

9.76 Trim
Trim is a function that creates a string that has no spaces at the beginning or end of the string.

Example:

9.77 UCase
UCase is a function that converts a string into a string consisting of uppercase letters.

Example:

9.78 Year
Year is a function that returns the year of a date as an integer.

Example:

You might also like