CATIA V5-Macro Programming With Visual Basic Script1
CATIA V5-Macro Programming With Visual Basic Script1
CATIA V5-Macro Programming With Visual Basic Script1
Preface
1 Basics
1.9.2 Select-Case-Else
1.9.3 For-Next
1.9.4 Do-While
1.9.5 Do Until
1.10.1 CATIA-Application
2.4.1 Search
2.4.2 Recognize
3 Components of CATParts
3.1 Attributes
3.3.1 Bodies
3.4.1 Parameter
3.4.3 Formulas
3.5 References
4 Components of CATProducts
4.1 Attributes
4.4 Constraints
5 2D Wireframe Geometry
6.2 Points
6.3 Lines
6.4 Planes
6.5 Curves
6.6 Surfaces
6.8 Operations
7 Solids
7.5 Operations
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.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.56 Randomize
9.57 ReDim
9.58 Rem
9.59 Right
9.60 Rnd
9.61 RTrim
9.62 Second
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
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.
{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:
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:
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
The next step is to create a new macro and name it “GreetingMacro.CATScript” (Figure 1.2):
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).
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).
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.
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.
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.
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.
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
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”
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.
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).
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.
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:
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:
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
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 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).
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.
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.
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).
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
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
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:
“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.
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.
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:
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.
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
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
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
“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.
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:
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) :
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 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.
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.
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.
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:
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
Hiding one or more elements of a selection is made with the SetShow method of
the VisPropertySet class (Section 8.225) :
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.
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.
“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
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.”
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.
“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.
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):
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).
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):
The PartBody can be declared with the MainBody property of the Part class (Section 8.168):
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:
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:
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:
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:
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:
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).
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
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.
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
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.
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.
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):
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.
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).
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):
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.
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.
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.
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).
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
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.
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.
The Sketch class offers more than the possibility of the SetAbsoluteAxisData method to
change the axis system of a sketch.
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).
The rotation axis of a sketch can be defined using the CenterLine property of the Sketch class
(Section 8.202).
FIGURE 5.5 Result of the example “Standard Element, Construction Element, and Rotation Axis”
The Dimension class (Section 8.24) offers a measurement with a value to be assigned
because of the parent classes of the Value property.
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.
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
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
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
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”
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
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).
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).
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
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).
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
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
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”
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.
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.
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).
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
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”
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
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
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
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.
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.
8.5 Application
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.
FileSearchOrder As CATBSTR
This property returns the search order when you open a CATIA document. Multiple search
paths are separated by colons.
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.
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.
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.
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.
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.
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.
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
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.
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.
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
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).
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.
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.”
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.
Name As CATBSTR
This property returns the name 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
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).
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.
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).
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).
or
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 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.
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.
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 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).
8.25 Document
Sub Close
This method closes a document. It does not check whether the document must be saved.
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 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.
SeeHiddenElements As Boolean
This property returns whether a user states “Show” or “NoShow” in the display window
(“NoShow” = “True”).
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).
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).
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).
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).
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.
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).
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.
This method creates a closed circle around a center point (X, Y) with a radius “R.”
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.
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.
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.”
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.
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).
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.
This method creates a projection of an object on the sketch. The projection is normal to the
plane.
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.”
8.37 FileComponent
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.
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
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).
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 Reverse
This method reverses the hole direction (“Reverse” button).
ThreadingMode As CATHoleThreadingMode
This property returns the hole threading mode. The value range of the property is
“catThreadedHoleThreading” (with threads) and “catSmoothHoleThreading” (without threads).
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
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).
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.
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”).
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
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.
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.
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.
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.”
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.
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
DiameterMode As Boolean
This property returns whether the circle is a diameter (“True”) or radius (“False”).
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).
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).
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).
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).
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.
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.
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).
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 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).
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”).
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).
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).
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).
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.
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.
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.
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.
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.
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).
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
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.”
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).
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).
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).
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.
This method creates a new element, distorting an original element in the three principal
directions (see Example 6.12).
This method creates an axis from a circle, ellipse, oblong, sphere, or revolution.
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).
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).
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.”
This method creates a circule passing through three points “Point1,” “Point2,” and “Point3”
(see Section 6.5.2).
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.
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.”
This method creates a circle that is defined by an axis, a point, and two angles (refer
to AddNewCircleCenterAxis).
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).
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.
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.
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.)
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.
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.
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.”
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.)
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.”
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.
This method creates an undefined transformation of the “Translate” type. The transformation is
defined with the properties of the HybridShapeTranslate class (Section 8.147).
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).
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.
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.
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.
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).
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).
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.
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 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.
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”).
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”).
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”).
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.
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”).
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”).
This method creates a line between two points (see Example 6.4).
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. The line is extended from
the start point at “Length1” and from the end point at “Length2.”
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”).
This method creates a lofted surface. The section definitions are made with
the AddSectionToLoft method of the HybridShapeLoft class (Section 8.102).
This method creates a near derivative from multiple elements. It selects the element that is
closest to the reference geometry.
This method creates a new plane passing through one planar curve.
This method creates a new plane passing through one line and one point.
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.
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.
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.”
This method creates a plane normal to a curve through a point of the curve (see Section 6.4.2).
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”).
This method creates a plane parallel to a reference plane through a point (see Example 6.6).
This method creates a plane that is tangent to a surface through a point on the surface.
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”).
This method creates a coordinate point. The coordinates of the point are measured relative to a
reference point.
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.
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”).
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”).
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.
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.
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.
This method creates a tangent point on a curve. The orientation of the tangent is determined by
the parameter “Direction.”
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”).
This method creates a revolution surface of a planar profile, rotated about an axis lying on the
profile plane.
This method creates a sphere or a spherical section around a center. The angular parameters
define the spherical section.
This method creates a spine. The position of the spine is defined with the methods of
the HybridShapeSpine class (Section 8.135).
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).
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.
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).
This method creates a swept surface with a user profile that is pulled along the guide curve.
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.
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.
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).
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.
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.
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.
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.”
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.
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).
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.
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).
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 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
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.
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.
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
Curve As Reference
This property returns or sets the reference curve of the line (“Curve” field).
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).
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
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.
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.
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.
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
Point As Reference
This property returns or sets the reference point of the line (“Point” field).
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).
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).
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.
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).
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).
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).
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).
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.
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.
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”).
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
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.
OffsetedObject As Reference
This property returns or sets the object to offset (“Surface” field).
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
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.
RefAxisSystem As Reference
This property returns or sets the reference axis system (“Axis System” 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 RemoveAll
This method removes all the elements in the list of “Points.”
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”).
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.
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”).
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).
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.
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).
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).
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”).
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.
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.
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
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”).
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).
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.”
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.
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).
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).
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.
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.
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).
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.
InvertAxis As Boolean
This property returns or sets whether the reference direction is inverted.
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 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.
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.
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.
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.
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.
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.
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.
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).
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 RemoveParameter
This method removes a conical sweep parameter.
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.
SmoothActivity As Boolean
This property returns or sets the state of the “Angular Correction” option.
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.
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.
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.
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.
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
Thickness1 As Double
This property returns or sets the first thickness value in the first direction.
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.”
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.”
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.
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.
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.
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.
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 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.
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.
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.
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
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.
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.
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.
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.
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.
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.
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.
InWorkObject As AnyObject
This property returns or sets the work object of the CATPart.
MainBody As Body
This property returns or sets the main body of the CATPart.
Sub Update
This method updates the CATPart result with respect to its specifications.
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.
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.
ItemToCopy As AnyObject
This property returns or sets the shape to be copied.
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.
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.
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).
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.
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).
DescriptionRef As String
This property returns or sets the product’s description for a reference product (“Description”
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.
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”).
This method creates a component from the root product of another product. The new
component must already be loaded as a document.
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 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.
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.
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.”
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.
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.
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.
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.
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
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).
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
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
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.
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.
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.
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!
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.
CATMaterialCont as material
CATIA_SPEC CATIA_SPEC
CATIA_RESULT CATIA_RESULT
Value range of the parameter “Mode” in a “Product”:
CATProdCont as specified in “Product Structure”
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.
This method creates an “Assembly” operation between two bodies (Section 3.3.4). The “Body”
is assembled with the in-work body.
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”).
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”).
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.
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 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.
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).
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).
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.
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.
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.
This method creates an “Intersect” operation between two bodies (Section 3.3.4). The “Body” is
intersected with the in-work body.
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).
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).
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).
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).
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).
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.
This method creates a “Remove” operation between two bodies (Section 3.3.4). The “Body” is
intersected with the in-work body.
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).
This method creates a rib (see Section 7.2). “Contour” defines the profile of the rib, and
“CenterCurve” defines the guide curve.
This method creates a rib (see Section 7.2). “Contour” defines the profile of the rib, and
“CenterCurve” defnes the guide curve.
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.
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.
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.
This method creates a shaft based on a sketch (see Section 7.2). The sketch must include an
axis.
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.
This method creates a slot (see Section 7.2). “Contour” defines the profile of the slot, and
“CenterCurve” defines the guide curve.
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.
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).
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.
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.
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.
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).
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.
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.
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).
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.
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.
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.
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.
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
Sub Evaluate
This method evaluates the constraint system of the sketch. It corresponds to an “Update” in the
sketcher.
Sub InverseOrientation
This method reverses the orientation of the sketch. The orientation of a contour-based solid is
thereby altered.
This method creates a 2D toolbox and opens it for editing the sketch.
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.
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.
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.
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.
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.
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.”
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
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.
CATVBALanguage (CATIA-VBA)
CATBasicScriptLanguage (CATScript)
CATJavaLanguage (Java)
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.
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
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
Sub Swap_OffsetSide
This method reverses the orientation of the thick surface (“Reverse Direction” button).
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).
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.
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).
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
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
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
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.
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).
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.”
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.
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.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.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
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: