Q: I need to change a derived part from "not mirrored" to "mirrored". Is there an example showing how to do this?
A: Here is a VBA example that mirrors a derived part.
Sub testMirrorDerivedPart()
Dim oPartDoc As Document
Set oPartDoc = ThisApplication.ActiveDocument
If oPartDoc.DocumentType <> kPartDocumentObject Then Exit Sub
Dim oRefComps As ReferenceComponents
Set oRefComps = oPartDoc.ComponentDefinition.ReferenceComponents
Dim oDerPartC As DerivedPartComponent
Set oDerPartC = oRefComps.DerivedPartComponents(1)
Dim oDerPartDef As DerivedPartDefinition
Set oDerPartDef = oDerPartC.Definition
If (TypeOf oDerPartDef Is DerivedPartUniformScaleDef) Then
Dim oDerPartUScaleDef As DerivedPartUniformScaleDef
Set oDerPartUScaleDef = oDerPartDef
If (oDerPartUScaleDef.MirrorPlane = kDerivedPartNoMirrorPlane) Then
Debug.Print "not mirrored - mirroring now"
oDerPartUScaleDef.MirrorPlane = kDerivedPartMirrorPlaneXY
oDerPartC.Definition = oDerPartUScaleDef
Else
Debug.Print "mirrored un-mirrowing now"
oDerPartUScaleDef.MirrorPlane = kDerivedPartNoMirrorPlane
oDerPartC.Definition = oDerPartUScaleDef
End If
End If
End Sub