pycatia.mec_mod_interfaces.part¶
Module initially auto generated using V5Automation files from CATIA V5 R28 on 2020-06-11 12:40:47.360445
Warning
The notes denoted “CAA V5 Visual Basic Help” are to be used as reference only. They are there as a guide as to how the visual basic / catscript functions work and thus help debugging in pycatia.
- class pycatia.mec_mod_interfaces.part.Part(com_part_object)¶
Note
CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)
System.IUnknownSystem.IDispatchSystem.CATBaseUnknownSystem.CATBaseDispatchSystem.AnyObjectPartThe root level object inside a PartDocument object.Role: It aggregates all the objects making up the partdocument.It provides many factories and collections. The collections list only thedirect children of the part. Selection.Search allows to get all objects of onetype.See also:PartDocument- activate(i_object: AnyObject) None ¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
- o Sub Activate(AnyObject iObject)Unsuppresses an object for the update process. A unsuppressed object isagain taken into account for the calculation of the part.Parameters:iObjectThe object to unsuppress for the update processExample:The following example unsuppresses the pad1 pad:Set partRoot = partDoc.PartSet pad1 = partRoot.FindObjectByName(“Pad.1”)partRoot.Activate(pad1)
- Parameters:
i_object (AnyObject) –
- Return type:
None
- property analyze: Analyze¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)
- o Property Analyze() As Analyze (Read Only)Returns the Analyze object associated to the currentproduct.Example:This example retrieves in EngineAnalysis the Analyze objectofthe Engine product.Dim EngineAnalysis As AnalyzeSet EngineAnalysis = Engine.Analyze
- Return type:
- property annotation_sets: Collection¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)
- o Property AnnotationSets() As Collection (Read Only)Returns the collection object containing the annotation sets. All theannotation sets that are aggregated in the part might be accessed thru thatcollection.Example:The following example returns in annotationSets the annotation sets ofthe partRoot part from the partDoc part document:Set partRoot = partDoc.PartDim annotationSets As AnnotationSetsSet annotationSets = partRoot.AnnotationSets
- Returns:
Collection
- property axis_systems: AxisSystems¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)
- o Property AxisSystems() As AxisSystems (Read Only)Returns the collection object containing the coordinate systems. All thecoordinate systems that are aggregated in the part might be accessed thru thatcollection.Example:The following example returns in axisSystems the coordinate systems ofthe partRoot part from the partDoc part document:Set partRoot = partDoc.PartDim axisSystems As AxisSystemsSet axisSystems = partRoot.AxisSystems
- Returns:
AxisSystems
This will only return axis systems under the Axis Systems node. Axis systems within a Geometrical Set will not be returned.
- property bodies: Bodies¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)
- o Property Bodies() As Bodies (Read Only)Returns the collection object containing the bodies that are directchildren of the part.It does not return all the bodies of the part, particularly the bodies in aboolean operation.Example:The following example returns in bodiesColl the collection of thebodies of the partRoot part from the partDoc partdocument:Set partRoot = partDoc.PartSet bodiesColl = partRoot.Bodies
- Return type:
- property constraints: Constraints¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)
- o Property Constraints() As Constraints (Read Only)Returns the collection object containing the part constraints. Only 3Dconstraints are concerned here, 2D constraints are managed insketches.Example:The following example returns in csts the constraints of the partRootpart from the partDoc part document:Set partRoot = partDoc.PartSet csts = partRoot.Constraints
- Return type:
- create_reference_from_b_rep_name(i_label: str, i_object_context: AnyObject)¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
- o Func CreateReferenceFromBRepName(CATBSTR iLabel,AnyObject iObjectContext) As ReferenceCreates a reference from a GenericNaming label. This allows manipulation ofB-Rep (Type Functinal and Relimited) that are not easy toaccess.Parameters:iLabelThe GenericNaming identification for an object. This is a crypticform for “the edge surrounded by the face extruded from line.12 of sketch.4 andthe face…”)iObjectContextThe Object Context of Resolution This is the feature used for labelGenericNaming resolutionReturns:The reference to a B-Rep sub-element such a face or an edge
- create_reference_from_geometry(i_object: AnyObject) Reference ¶
Note
- Microsoft Visual Basic Object Browser
- Function CreateReferenceFromGeometry(iObject As AnyObject) As ReferenceMember of MECMOD.Part
- create_reference_from_name(i_label: str)¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
- o Func CreateReferenceFromName(CATBSTR iLabel) As ReferenceCreates a reference from a GenericNaming label. This allows manipulation ofB-Rep (type Functional Only) that are not easy to access.Parameters:iLabelThe GenericNaming identification for an object. This is a crypticform for “the edge surrounded by the face extruded from line.12 of sketch.4 andthe face…”)Returns:The reference to a B-Rep sub-element such a face or an edge
- Parameters:
i_label (str) –
- Return type:
- create_reference_from_object(i_object: AnyObject)¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
- o Func CreateReferenceFromObject(AnyObject iObject) AsReferenceCreates a reference from a operator. Use of reference allows a uniformhandling of B-Rep and non B-Rep objects.Parameters:iObjectThe geometric object to be referenced. It can be a plane, a line ora point.Returns:The reference to the object. This way, a direction can be either anedge of a pad or a 3D line.
- property density: float¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)
- o Property Density() As double (Read Only)Returns the part density.Example:The following example displays the density of thepart:Set partRoot = partDoc.PartMsgBox “The density is “ & partRoot.Density
- Return type:
float
- property file_name: str¶
- Return type:
str
- find_object_by_name(i_obj_name: str) AnyObject ¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
- o Func FindObjectByName(CATBSTR iObjName) As AnyObjectFinds an object that is not a collection by its name. Scan in depth amongall the direct and indirect children (expensive, but hard toescape).Parameters:iObjNameThe name to be searchedReturns:The object, if foundExample:The following example tests if the object was found:Set partRoot = partDoc.PartSet obj = partRoot.FindObjectByName(“Wrong name”)If TypeName(obj)=”Nothing” ThenMsgBox “Object not found”End If
- Parameters:
i_obj_name (str) –
- Return type:
- property full_name: str¶
- Return type:
str
- property geometric_elements: GeometricElements¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)
- o Property GeometricElements() As GeometricElements (ReadOnly)Returns the collection object containing the part geometrical elements.Only 3D elements are concerned here, 2D elements are managed in sketches. Theorigin elements are also accessible thru that collection.Example:The following example returns in geomElts the 3D elements of thepartRoot part from the partDoc part document:Set partRoot = partDoc.PartSet geomElts = partRoot.GeometricElements
- Return type:
- get_customer_factory(i_factory_iid: str) Factory ¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
- o Func GetCustomerFactory(CATBSTR iFactoryIID) As FactoryReturns a customer factory from a code string defined by the customer. Itallows a customer to define its own factory to create its ownobjects.Parameters:iFactoryIIDThe code name of the factory
- Parameters:
i_factory_iid (str) –
- Return type:
- property hybrid_bodies: HybridBodies¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)
- o Property HybridBodies() As HybridBodies (Read Only)Returns the collection object containing the hybrid bodies that are directchildren of the part.Example:The following example returns in hybridBodiesColl the collection ofhybrid bodies of the partRoot part from the partDoc partdocument:Set partRoot = partDoc.PartSet hybridBodiesColl = partRoot.HybridBodies
- Return type:
- property hybrid_shape_factory: HybridShapeFactory¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)
- o Property HybridShapeFactory() As Factory (Read Only)Returns the part hybrid shape factory. It allows the creation of hybridshapes in the part.Example:The following example returns in hybridShapeFact the hybrid shapefactory of the partRoot part from the partDoc partdocument:Set partRoot = partDoc.PartDim hybridShapeFact As FactorySet hybridShapeFact = partRoot.HybridShapeFactory
- Return type:
- property in_work_object: AnyObject¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)
- o Property InWorkObject() As AnyObjectReturns or sets the in work object of the part. The in work object is theobject after which a new object is added.Example:Set partRoot = partDoc.PartSet partRoot.InWorkObject = cylindricPadIf ( partRoot.InWorkObject <> cylindricPad ) ThenMsgBox “There is a big problem”End If
- Return type:
- inactivate(i_object: AnyObject) None ¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
- o Sub Inactivate(AnyObject iObject)Suppresses an object from being updated. A suppressed object is not takeninto account for the calculation of the part.Parameters:iObjectThe object to suppress from being updatedExample:The following example suppresses the pad1 pad from beingupdated:Set partRoot = partDoc.PartSet pad1 = partRoot.FindObjectByName(“Pad.1”)partRoot.Inactivate(pad1)
- Parameters:
i_object (AnyObject) –
- Return type:
None
- is_inactive(i_object: AnyObject) bool ¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
- o Func IsInactive(AnyObject iObject) As booleanIndicates whether an object is deactivated. A deactivated object is nottaken into account for the calculation of the part.Parameters:iObjectThe object to examineExample:The following example returns in isInactive whether the pad1 pad isdeactivated:Set partRoot = partDoc.PartSet pad1 = partRoot.FindObjectByName(“Pad.1”)isInactive = partRoot.IsInactive(pad1)
- Parameters:
i_object (AnyObject) –
- Return type:
bool
- is_up_to_date(i_object: AnyObject) bool ¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
- o Func IsUpToDate(AnyObject iObject) As booleanIndicates whether an object needs to be updated. An object which is notup-to-date has not be calculated with the lastspecifications.Parameters:iObjectThe object to examineExample:The following example returns in isuptodate whether the pad1 pad isup-to-date:Set partRoot = partDoc.PartSet pad1 = partRoot.FindObjectByName(“Pad.1”)isuptodate = partRoot.IsUpToDate(pad1)
- Parameters:
i_object (AnyObject) –
- Return type:
bool
- property main_body: Body¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)
- o Property MainBody() As BodyReturns or sets the main body of the part.Example:The following example returns the main body of the part of the currentdocument.Dim mainBody As BodySet mainBody=CATIA.ActiveDocument.Part.MainBody
- Return type:
- property ordered_geometrical_sets: OrderedGeometricalSets¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)
- o Property OrderedGeometricalSets() As OrderedGeometricalSets (ReadOnly)Returns the collection object containing the ordered geometrical sets ofthe part.Example:The following example returns in ogsColl the collection of orderedgeometrical sets of the partRoot part from the partDoc partdocument:Set partRoot = partDoc.PartSet ogsColl = partRoot.OrderedGeometricalSets
- Return type:
- property origin_elements: OriginElements¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)
- o Property OriginElements() As OriginElements (Read Only)Returns the object defining the part 3D reference axissystem.Example:The following example returns in originElts the origin of the partRootpart from the partDoc part document:Set partRoot = partDoc.PartSet originElts = partRoot.OriginElements
- Return type:
- property parameters: Parameters¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)
- o Property Parameters() As Parameters (Read Only)Returns the collection object containing the part parameters. All theparameters that are aggregated in the different objects of the part might beaccessed thru that collection.Example:The following example returns in params the parameters of the partRootpart from the partDoc part document:Set partRoot = partDoc.PartDim params As ParametersSet params = partRoot.Parameters
- Return type:
- path() Path ¶
Returns the pathlib.Path() object of the document fullname. example e://users//psr//Parts//MyNicePart.CATPart >>> Part.path().name MyNicePart.CATPart >>> Part.path().parent e://users//psr//Parts// >>> Part.path().suffix .CATPart
- Return type:
Path()
- property relations: Relations¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)
- o Property Relations() As Relations (Read Only)Returns the collection object containing the part relations. All therelations that are used to valuate the parameters of the part might be accessedthru that collection.Example:The following example returns in rels the relations of the partRootpart from the partDoc part document:Set partRoot = partDoc.PartSet rels = partRoot.Relations
- Return type:
- property shape_factory: ShapeFactory¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)
- o Property ShapeFactory() As Factory (Read Only)Returns the part shape factory. It allows the creation of shapes in thepart.Example:The following example returns in shapeFact the shape factory of thepartRoot part from the partDoc part document:Set partRoot = partDoc.PartDim shapeFact As FactorySet shapeFact = partRoot.ShapeFactory
- Return type:
- property sheet_metal_factory: Factory¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)
- o Property SheetMetalFactory() As Factory (Read Only)Returns the sheet metal factory of the part. It allows the creation ofsheet metal elements in the part.Example:The following example returns in sheetMetalFact the sheet metal factoryof the partRoot part from the partDoc part document:Set partRoot = partDoc.PartDim sheetMetalFact As FactorySet sheetMetalFact = partRoot.SheetMetalFactory
- Returns:
Factory
- Returns:
Factory
- property sheet_metal_parameters: AnyObject¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)
- o Property SheetMetalParameters() As AnyObject (Read Only)Returns the sheet metal parameters of the part.Example:The following example returns in sheetMetalParm the sheet metalparameters of the partRoot part from the partDoc partdocument:Set partRoot = partDoc.PartDim sheetMetalParm As SheetMetalParametersSet sheetMetalFact = partRoot.SheetMetalParameters
- Return type:
- update() None ¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
- o Sub Update()Updates of the part result with respect to its specifications. Anycomposing 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.PartpartRoot.Update
- Return type:
None
- update_object(i_object: AnyObject) None ¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
- o Sub UpdateObject(AnyObject iObject)Updates an object with respect to its specifications. Any composingspecification of the object that hasn’t its result up-to-date will recomputeit, thus propagating changes to the object.Parameters:iObjectThe object to be updatedExample:The following example updates Pad.1:Set partRoot = partDoc.PartSet pad1 = partRoot.FindObjectByName(“Pad.1”)partRoot.UpdateObject(pad1)
- Parameters:
i_object (AnyObject) –
- Return type:
None
- property user_surfaces: Collection¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)
- o Property UserSurfaces() As Collection (Read Only)Returns the collection object containing the user surfaces. All the usersurfaces that are aggregated in the part might be accessed thru thatcollection.Example:The following example returns in userSurfaces the user surfaces of thepartRoot part from the partDoc part document:Set partRoot = partDoc.PartDim userSurfaces As UserSurfacesSet userSurfaces = partRoot.UserSurfaces
- Return type: