Indexes   

Part (Object)

The root level object inside a PartDocument object.
Role: It aggregates all the objects making up the part document.
It provides many factories and collections. The collections list only the direct children of the part. Selection.Search allows to get all objects of one type.
See also:
PartDocument

Property Index

AnnotationSets
Returns the collection object containing the annotation sets.
AxisSystems
Returns the collection object containing the coordinate systems.
Bodies
Returns the collection object containing the bodies that are direct children of the part.
Constraints
Returns the collection object containing the part constraints.
Density
Returns the part density.
GeometricElements
Returns the collection object containing the part geometrical elements.
HybridBodies
Returns the collection object containing the hybrid bodies that are direct children of the part.
HybridShapeFactory
Returns the part hybrid shape factory.
InWorkObject
Returns or sets the in work object of the part.
MainBody
Returns or sets the main body of the part.
OrderedGeometricalSets
Returns the collection object containing the ordered geometrical sets of the part.
OriginElements
Returns the object defining the part 3D reference axis system.
Parameters
Returns the collection object containing the part parameters.
Relations
Returns the collection object containing the part relations.
ShapeFactory
Returns the part shape factory.
SheetMetalFactory
Returns the sheet metal factory of the part.
SheetMetalParameters
Returns the sheet metal parameters of the part.
UserSurfaces
Returns the collection object containing the user surfaces.

Method Index

Activate
Unsuppresses an object for the update process.
CreateReferenceFromBRepName
Creates a reference from a GenericNaming label.
CreateReferenceFromName
Creates a reference from a GenericNaming label.
CreateReferenceFromObject
Creates a reference from a operator.
FindObjectByName
Finds an object that is not a collection by its name.
GetCustomerFactory
Returns a customer factory from a code string defined by the customer.
Inactivate
Suppresses an object from being updated.
IsInactive
Indicates whether an object is deactivated.
IsUpToDate
Indicates whether an object needs to be updated.
UpdateObject
Updates an object with respect to its specifications.
Update
Updates of the part result with respect to its specifications.

Properties


o Property AnnotationSets() As (Read Only)
Returns the collection object containing the annotation sets. All the annotation sets that are aggregated in the part might be accessed thru that collection.
Example:
The following example returns in annotationSets the annotation sets of the partRoot part from the partDoc part document:
 Set partRoot = partDoc.Part
 Dim annotationSets As AnnotationSets
 Set annotationSets = partRoot.AnnotationSets
 
o Property AxisSystems() As (Read Only)
Returns the collection object containing the coordinate systems. All the coordinate systems that are aggregated in the part might be accessed thru that collection.
Example:
The following example returns in axisSystems the coordinate systems of the partRoot part from the partDoc part document:
 Set partRoot = partDoc.Part
 Dim axisSystems As AxisSystems
 Set axisSystems = partRoot.AxisSystems
 
o Property Bodies() As (Read Only)
Returns the collection object containing the bodies that are direct children of the part.
It does not return all the bodies of the part, particularly the bodies in a boolean operation.
Example:
The following example returns in bodiesColl the collection of the bodies of the partRoot part from the partDoc part document:
 Set partRoot = partDoc.Part
 Set bodiesColl = partRoot.Bodies
 
o Property Constraints() As (Read Only)
Returns the collection object containing the part constraints. Only 3D constraints are concerned here, 2D constraints are managed in sketches.
Example:
The following example returns in csts the constraints of the partRoot part from the partDoc part document:
 Set partRoot = partDoc.Part
 Set csts = partRoot.Constraints
 
o Property Density() As (Read Only)
Returns the part density.
Example:
The following example displays the density of the part:
 Set partRoot = partDoc.Part
 MsgBox "The density is " & partRoot.Density
 
o Property GeometricElements() As (Read Only)
Returns the collection object containing the part geometrical elements. Only 3D elements are concerned here, 2D elements are managed in sketches. The origin elements are also accessible thru that collection.
Example:
The following example returns in geomElts the 3D elements of the partRoot part from the partDoc part document:
 Set partRoot = partDoc.Part
 Set geomElts = partRoot.GeometricElements
 
o Property HybridBodies() As (Read Only)
Returns the collection object containing the hybrid bodies that are direct children of the part.
Example:
The following example returns in hybridBodiesColl the collection of hybrid bodies of the partRoot part from the partDoc part document:
 Set partRoot = partDoc.Part
 Set hybridBodiesColl = partRoot.HybridBodies
 
o Property HybridShapeFactory() As (Read Only)
Returns the part hybrid shape factory. It allows the creation of hybrid shapes in the part.
Example:
The following example returns in hybridShapeFact the hybrid shape factory of the partRoot part from the partDoc part document:
 Set partRoot = partDoc.Part
 Dim hybridShapeFact As Factory
 Set hybridShapeFact = partRoot.HybridShapeFactory
 
o Property InWorkObject() As
Returns or sets the in work object of the part. The in work object is the object after which a new object is added.
Example:
 Set partRoot = partDoc.Part
 Set partRoot.InWorkObject = cylindricPad
 If ( partRoot.InWorkObject <> cylindricPad ) Then
      MsgBox "There is a big problem"
 End If
 
o Property MainBody() As
Returns or sets the main body of the part.
Example:
The following example returns the main body of the part of the current document.
 Dim mainBody As Body
 Set mainBody=CATIA.ActiveDocument.Part.MainBody
 
o Property OrderedGeometricalSets() As (Read Only)
Returns the collection object containing the ordered geometrical sets of the part.
Example:
The following example returns in ogsColl the collection of ordered geometrical sets of the partRoot part from the partDoc part document:
 Set partRoot = partDoc.Part
 Set ogsColl = partRoot.OrderedGeometricalSets
 
o Property OriginElements() As (Read Only)
Returns the object defining the part 3D reference axis system.
Example:
The following example returns in originElts the origin of the partRoot part from the partDoc part document:
 Set partRoot = partDoc.Part
 Set originElts = partRoot.OriginElements
 
o Property Parameters() As (Read Only)
Returns the collection object containing the part parameters. All the parameters that are aggregated in the different objects of the part might be accessed thru that collection.
Example:
The following example returns in params the parameters of the partRoot part from the partDoc part document:
 Set partRoot = partDoc.Part
 Dim params As Parameters
 Set params = partRoot.Parameters
 
o Property Relations() As (Read Only)
Returns the collection object containing the part relations. All the relations that are used to valuate the parameters of the part might be accessed thru that collection.
Example:
The following example returns in rels the relations of the partRoot part from the partDoc part document:
 Set partRoot = partDoc.Part
 Set rels = partRoot.Relations
 
o Property ShapeFactory() As (Read Only)
Returns the part shape factory. It allows the creation of shapes in the part.
Example:
The following example returns in shapeFact the shape factory of the partRoot part from the partDoc part document:
 Set partRoot = partDoc.Part
 Dim shapeFact As Factory	
 Set shapeFact = partRoot.ShapeFactory
 
o Property SheetMetalFactory() As (Read Only)
Returns the sheet metal factory of the part. It allows the creation of sheet metal elements in the part.
Example:
The following example returns in sheetMetalFact the sheet metal factory of the partRoot part from the partDoc part document:
 Set partRoot = partDoc.Part
 Dim sheetMetalFact As Factory
 Set sheetMetalFact = partRoot.SheetMetalFactory
 
o Property SheetMetalParameters() As (Read Only)
Returns the sheet metal parameters of the part.
Example:
The following example returns in sheetMetalParm the sheet metal parameters of the partRoot part from the partDoc part document:
 Set partRoot = partDoc.Part
 Dim sheetMetalParm As SheetMetalParameters
 Set sheetMetalFact = partRoot.SheetMetalParameters
 
o Property UserSurfaces() As (Read Only)
Returns the collection object containing the user surfaces. All the user surfaces that are aggregated in the part might be accessed thru that collection.
Example:
The following example returns in userSurfaces the user surfaces of the partRoot part from the partDoc part document:
 Set partRoot = partDoc.Part
 Dim userSurfaces As UserSurfaces
 Set userSurfaces = partRoot.UserSurfaces
 

Methods


o Sub Activate( iObject)
Unsuppresses an object for the update process. A unsuppressed object is again taken into account for the calculation of the part.
Parameters:
iObject
The object to unsuppress for the update process
Example:
The following example unsuppresses the pad1 pad:
 Set partRoot = partDoc.Part
 Set pad1 = partRoot.FindObjectByName("Pad.1")
 partRoot.Activate(pad1)
o Func CreateReferenceFromBRepName( iLabel,
iObjectContext) As
Creates a reference from a GenericNaming label. This allows manipulation of B-Rep (Type Functinal and Relimited) that are not easy to access.
Parameters:
iLabel
The GenericNaming identification for an object. This is a cryptic form for "the edge surrounded by the face extruded from line.12 of sketch.4 and the face...")
iObjectContext
The Object Context of Resolution This is the feature used for label GenericNaming resolution
Returns:
The reference to a B-Rep sub-element such a face or an edge
o Func CreateReferenceFromName( iLabel) As
Creates a reference from a GenericNaming label. This allows manipulation of B-Rep (type Functional Only) that are not easy to access.
Parameters:
iLabel
The GenericNaming identification for an object. This is a cryptic form for "the edge surrounded by the face extruded from line.12 of sketch.4 and the face...")
Returns:
The reference to a B-Rep sub-element such a face or an edge
o Func CreateReferenceFromObject( iObject) As
Creates a reference from a operator. Use of reference allows a uniform handling of B-Rep and non B-Rep objects.
Parameters:
iObject
The geometric object to be referenced. It can be a plane, a line or a point.
Returns:
The reference to the object. This way, a direction can be either an edge of a pad or a 3D line.
o Func FindObjectByName( iObjName) As
Finds an object that is not a collection by its name. Scan in depth among all the direct and indirect children (expensive, but hard to escape).
Parameters:
iObjName
The name to be searched
Returns:
The object, if found
Example:
The following example tests if the object was found:
 Set partRoot = partDoc.Part
 Set obj = partRoot.FindObjectByName("Wrong name")
 If TypeName(obj)="Nothing" Then
      MsgBox "Object not found"
 End If
 
o Func GetCustomerFactory( iFactoryIID) As
Returns a customer factory from a code string defined by the customer. It allows a customer to define its own factory to create its own objects.
Parameters:
iFactoryIID
The code name of the factory
o Sub Inactivate( iObject)
Suppresses an object from being updated. A suppressed object is not taken into account for the calculation of the part.
Parameters:
iObject
The object to suppress from being updated
Example:
The following example suppresses the pad1 pad from being updated:
 Set partRoot = partDoc.Part
 Set pad1 = partRoot.FindObjectByName("Pad.1")
 partRoot.Inactivate(pad1)
o Func IsInactive( iObject) As
Indicates whether an object is deactivated. A deactivated object is not taken into account for the calculation of the part.
Parameters:
iObject
The object to examine
Example:
The following example returns in isInactive whether the pad1 pad is deactivated:
 Set partRoot = partDoc.Part
 Set pad1 = partRoot.FindObjectByName("Pad.1")
 isInactive = partRoot.IsInactive(pad1)
o Func IsUpToDate( iObject) As
Indicates whether an object needs to be updated. An object which is not up-to-date has not be calculated with the last specifications.
Parameters:
iObject
The object to examine
Example:
The following example returns in isuptodate whether the pad1 pad is up-to-date:
 Set partRoot = partDoc.Part
 Set pad1 = partRoot.FindObjectByName("Pad.1")
 isuptodate = partRoot.IsUpToDate(pad1)
o Sub UpdateObject( iObject)
Updates an object with respect to its specifications. Any composing specification of the object that hasn't its result up-to-date will recompute it, thus propagating changes to the object.
Parameters:
iObject
The object to be updated
Example:
The following example updates Pad.1:
 Set partRoot = partDoc.Part
 Set pad1 = partRoot.FindObjectByName("Pad.1")
 partRoot.UpdateObject(pad1)
o Sub Update()
Updates of the part result with respect to its specifications. Any composing specification that hasn't its result up-to-date will recompute it, thus propagating changes to the whole part.
Example:
The following example update the part:
 Set partRoot = partDoc.Part
 partRoot.Update
 

Copyright © 2006, Dassault Systèmes. All rights reserved.