Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Derived feature mirrored?

3 REPLIES 3
Reply
Message 1 of 4
angermaier
311 Views, 3 Replies

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

Derived feature mirrored?

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?
3 REPLIES 3
Message 2 of 4
angermaier
in reply to: angermaier

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

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?
Message 3 of 4
Anonymous
in reply to: angermaier

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


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>
 
Message 4 of 4
angermaier
in reply to: angermaier

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

Thank you very much! That's what I've been looking for.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report