Derived feature mirrored?

Derived feature mirrored?

angermaier
Enthusiast Enthusiast
335 Views
3 Replies
Message 1 of 4

Derived feature mirrored?

angermaier
Enthusiast
Enthusiast
I'm looking for a way to find out, if the derived part is mirrored. If I look in the ComponentDefinition i can find the parent part in two places: in the _DerivativeDescriptors.DerivedPartDescriptors and in the Features.ReferenceFeatures.
I already thought of comparing the RangeBox of the feature to the RangeBox of the parent part to find out if it's mirrored, but i'm not quite sure if that method will uncover any mirrored features.
Is there any other way to find out if the derived component is mirrored?
0 Likes
336 Views
3 Replies
Replies (3)
Message 2 of 4

angermaier
Enthusiast
Enthusiast
I found out that my idea to compare the range boxes is absurd, because if you mirror a part the extents will stay the same (except you use a scale).
Anyway: Has anybody an idea how to find out if a derived component is mirrored?
0 Likes
Message 3 of 4

Anonymous
Not applicable

Here is some code to do that. This queries the
first derived part component in the active part document.

 

Sanjay-

 

 

Sub IsDerivedComponentMirrored()   

    Dim oDoc As PartDocument
    Set oDoc =
ThisApplication.ActiveDocument
   
    Dim
oDef As PartComponentDefinition
    Set oDef =
oDoc.ComponentDefinition
   
    Dim
oDerivedPartComponent As DerivedPartComponent
    Set
oDerivedPartComponent =
oDef.ReferenceComponents.DerivedPartComponents.Item(1)
   

    If Not oDerivedPartComponent.Definition.MirrorPlane =
kDerivedPartNoMirrorPlane Then
       
MsgBox "The first derived part component is mirrored."
    End
If
End Sub


style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
face=Arial size=2>
 
0 Likes
Message 4 of 4

angermaier
Enthusiast
Enthusiast
Thank you very much! That's what I've been looking for.
0 Likes