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: 

use edge of imate

1 REPLY 1
Reply
Message 1 of 2
Anonymous
190 Views, 1 Reply

use edge of imate

I am trying to find the edge connected to the imate. I want to use the edge for further connection.

For finding the edge I have written:

For i = 1 To oocc1.iMateDefinitions.Count
If oocc1.iMateDefinitions.item(i).Name = "Insert In2" Then
bFoundDefinition = True
Set oimate = oocc1.iMateDefinitions.item(i)
Set oedge = oimate.Entity
Exit For
End If
Next
' Exit sub if an iMate wasn't found.
If Not bFoundDefinition Then
MsgBox "The occurrence does not contain an iMate named ""Insert In2"""
Exit Function
End If

lateron i connect to the edge with:

Set oiMateResult = oAsmCompDef.iMateResults.AddByiMateAndEntity(oimate, oedge)

probably I am not allowed to use: oimate.entity to find the edge because the connection gives me an error. Does anyone knows a workaround to find and use the edge connected to the imate?
1 REPLY 1
Message 2 of 2
Anonymous
in reply to: Anonymous

Did you make a Proxy of the Edge? "rspaargaren" wrote in message news:11046049.1085653540481.JavaMail.jive@jiveforum2.autodesk.com... > I am trying to find the edge connected to the imate. I want to use the edge for further connection. > > For finding the edge I have written: > > For i = 1 To oocc1.iMateDefinitions.Count > If oocc1.iMateDefinitions.item(i).Name = "Insert In2" Then > bFoundDefinition = True > Set oimate = oocc1.iMateDefinitions.item(i) > Set oedge = oimate.Entity > Exit For > End If > Next > ' Exit sub if an iMate wasn't found. > If Not bFoundDefinition Then > MsgBox "The occurrence does not contain an iMate named ""Insert In2""" > Exit Function > End If > > lateron i connect to the edge with: > > Set oiMateResult = oAsmCompDef.iMateResults.AddByiMateAndEntity(oimate, oedge) > > probably I am not allowed to use: oimate.entity to find the edge because the connection gives me an error. Does anyone knows a workaround to find and use the edge connected to the imate?

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

Post to forums  

Autodesk Design & Make Report