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: 

iLogic - Place with Mates while location is dependent on a parameter

0 REPLIES 0
Reply
Message 1 of 1
waynehelley
208 Views, 0 Replies

iLogic - Place with Mates while location is dependent on a parameter

Hello all,

 

I have been using iLogic together with iMates for some time to automate assembly creation.  I have always used the follwing to automatically generate iMates on place.

 

oAsmCompDef = ThisApplication.ActiveDocument.ComponentDefinition
Dim oOccEnumerator As ComponentOccurrencesEnumerator
oOccEnumerator = oAsmCompDef.Occurrences.AddUsingiMates("file location and part number and extension), False)

 

The problem I have now is that Part B can contrain to either the left-hand or right-hand side of Part A dependant on if a parameter is set to 'Left' or 'Right'.

 

Hence for Part B, the composite iMate 'Part A to Part B' can always be used.

 

Part A contains 2 different composite iMates, 'Part A to Part B' and 'Part A to Right-Hand Part B'

 

So my logic will be (assuming Part A is already sat in the assembly and I am placing Part B)...

 

If Tier_Location="Left"

Place Part B while constraining to Part A mating 'Part A to Part B' to 'Part A to Part B'

Else

Place Part B while contraining to Part A mating 'Part A to Part B' to 'Part A to Right-Hand Part B'

End If

 

Doesn anybody know if there is any way to make this possible in iLogic?

 

 

Wayne Helley
Inventor 2013 Certified Professional

Autodesk Inventor Professional 2023
Visual Studio 2022
Windows 10 Pro, 64-bit
Tags (3)
0 REPLIES 0

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

Post to forums  

Autodesk Design & Make Report