pycatia.cat_sch_platform_interfaces.sch_update_instances

Module initially auto generated using V5Automation files from CATIA V5 R28 on 2020-09-25 14:34:21.593357

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.cat_sch_platform_interfaces.sch_update_instances.SchUpdateInstances(com_object)

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357)

System.IUnknown
System.IDispatch
System.CATBaseUnknown
System.CATBaseDispatch
System.AnyObject
SchUpdateInstances

Interface to update all component instances when the catalog reference
component has been changed.
update_all_instances_from_reference(i_comp_local_ref: SchComponent) None

Note

CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
o Sub UpdateAllInstancesFromReference(SchComponent
iCompLocalRef)

Update all the instances of a given local reference in a document. Both the
local reference and all its instances will be updated to account for any
changes in the corresponding catalog reference.

Example:

This example illustrates how to update all the schematic component
instances
in the active document by selecting any one of the instances or their
local reference.


‘ — get SchUpdateInstances interface
Dim objCurrentDoc As Document
Dim objPrdRoot As Product
Dim objSchRoot As SchematicRoot
Dim objUpdateInstances As SchUpdateInstances
Set objCurrentDoc = CATIA.ActiveDocument
Set objPrdRoot = objCurrentDoc.Product
Set objSchRoot = objPrdRoot.GetTechnologicalObject (“SchematicRoot”)
Set objUpdateInstances = objSchRoot.GetInteface (“CATIASchUpdateInstances”,objCurrentDoc)

‘ — get the local reference
Dim objPrdInst As Product
Dim objPrdRef As Product
Dim objCompRef As SchComponent
‘ — get an instance, objPrdInst from the selected set of
objects
Set objPrdInst = objCurrentDoc.Selection.FindObject(“CATIAProduct”)
Set objPrdRef = objPrdInst.ReferenceProduct
Set objCompRef = objSchRoot.GetInterface (“CATIASchComponent”,objPrdRef)

‘ — update all the instances
objUpdateInstances.UpdateAllInstancesFromReference
objCompRef
Parameters:

i_comp_local_ref (SchComponent) –

Return type:

None