Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

Automatically iMate connection upon placement? Help!!

munderwood4GRE6
Enthusiast

Automatically iMate connection upon placement? Help!!

munderwood4GRE6
Enthusiast
Enthusiast

I'm trying to figure out how to access Inventors functionality to place components automatically using iMates.

munderwood4GRE6_0-1640293421760.png

This works when placing them using the button and window. But I'm trying to place them through factory. They come in with the connectors. I just don't know how to use iLogic to tell the matching iMates to connect.

0 Likes
Reply
300 Views
2 Replies
Replies (2)

JelteDeJong
Mentor
Mentor

You can do it like this:

Dim doc As AssemblyDocument = ThisDoc.Document
Dim occurrences = doc.ComponentDefinition.Occurrences
' Summary:
'     Method that adds a new occurrence into the assembly. This method is the equivalent
'     of using the Place Component command with the "Use iMate" check box checked.
'     The method returns a failure if no matches are found.
'
' Parameters:
'   FullDocumentName:
'     Input string that specifies the full document name of the part or the sub-assembly.
'     If only the FullFileName is specified, the master document within the file is
'     used.
'
'   PlaceAllMatching:
'     Optional input Boolean that indicates whether to place multiple components corresponding
'     to all iMate definition matches in the assembly. If specified to be True, multiple
'     ComponentOccurrences could be returned. If specified to be False, a single ComponentOccurrence
'     corresponding to the first match is returned.
'
'   Options:
'     Input NameValueMap object that specifies additional options for creating the
'     occurrence. (An empty NameValueMap object can be provided). See Remarks for valid
'     options.
occurrences.AddUsingiMates(FullDocumentName)

Jelte de Jong
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


Blog: hjalte.nl - github.com

0 Likes

fidel.makatiaD5W7V
Alumni
Alumni

Hello @munderwood4GRE6 you can also read more on imates with ilogic here

Inventor 2022 Help | Add assembly mate constraint | Autodesk

Inventor 2022 Help | Add iMate Definition | Autodesk

Inventor 2022 Help | iMate Creation During Occurrence Placement | Autodesk

 

 



Fidel Makatia
Developer Advocate

href=https://help.autodesk.com/view/INVNTOR/2022/ENU/?guid=GUID-0BD48573-7193-4285-87B7-6727555D053E rel= "noopener noreferrer">Inventor 2022 Documentation |
0 Likes