create iLogic mate using iMate

create iLogic mate using iMate

danijel.radenkovic
Collaborator Collaborator
2,883 Views
25 Replies
Message 1 of 26

create iLogic mate using iMate

danijel.radenkovic
Collaborator
Collaborator

Hello,

I am trying to create an mate as on the image below.

Any help is very appreciated.

 

1.png

 

Regards

Danijel

Inventor 2018/Windows 10 x64
If this information was helpful, please consider marking it as an Accepted Solution by using the Accept as Solution. Kudos are also gladly accepted.
0 Likes
Accepted solutions (1)
2,884 Views
25 Replies
Replies (25)
Message 21 of 26

Curtis_Waguespack
Consultant
Consultant

hi @JBerns 

I noticed after the fact that you had attached files here, so here is an example for those files too. 

 

The thing to know about this, is that you can create the constraint in the assembly, and then get the code from that constraint in the rule editor 

 

I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com

aaa.png

 

 'create an insert constraint 
 Constraints.AddInsert _
		("Insert:1",
		"Cyl_iMate_2019-10-25_01:1",
		"Edge0", 
		"Cyl_iMate_2019-10-25_02:1", 
		"Edge0",
		axesOpposed := True,
		distance := 100 mm,
		lockRotation : = False, 
		biasPoint1 := Nothing, 
		biasPoint2 := Nothing)

EESignature

0 Likes
Message 22 of 26

jberns-newell
Contributor
Contributor

Curtis,

 

Thanks for looking into this.

 

The bearing is placed, but the AddInsert fails:

Constraints.AddInsert: No work feature or named entity with the name "Proxy:Edge0" was found in the component: "Bearing3".

I will research proxies and edges to see if I can debug the code.

 

Here is another thread related to this AddByTwoimates discussion:

https://forums.autodesk.com/t5/inventor-customization/create-ilogic-mate-using-imate/m-p/9107384#M10... 

 

(You may already be following this thread - pardon the duplication.)

 

 

Regards,

Jerry

0 Likes
Message 23 of 26

Curtis_Waguespack
Consultant
Consultant

@jberns-newell 

 

that might have just been my mistake, but if you create the insert, and then use the iLogic editor to get the code, it will tell you what it needs ... basically it just creates the code for you. Then you can delete the constraint, etc.

 

I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com

EESignature

0 Likes
Message 24 of 26

JBerns
Advisor
Advisor

@Curtis_Waguespack ,

 

Thanks for the graphic in the previous post. I add not used that method to capture an existing Constraint.

That was useful information.

 

I will explore this option.

 

I am still open to suggestions from you and the community on how best to manage (place-assemble-replace) fasteners in assemblies. Will it be best practice to use iMates, Named Geometry, something else?

 

 

Thanks,

Jerry

-----------------------------------------------------------------------------------------
CAD Administrator
Using AutoCAD & Inventor 2025
Autodesk Certified Instructor
Autodesk Inventor 2020 Certified Professional
Autodesk AutoCAD 2017 Certified Professional
0 Likes
Message 25 of 26

Anonymous
Not applicable

@JBerns 

The screencast link you sent didn't work, something about the video being "unlisted".

However, I managed to open your cad files (had to download a newer version of IV to do so), and I can't see Inventor allowing two iMates with different offset values to match (using the ALT-drag technique)

 

To be double sure, you should be able to create an iMate the same way as you would normally create a constraint, but instead of selecting geometry, select the iMates in the model browser.

In the assembly you sent, you will notice you can create an iMate between 'Align1' in both the bolt and the washer using this method, but its impossible to do the same with 'Insert In1' as the offset values don't match.

 

Here's a snip from the IV help that confirms this:

"The iMate definition properties must always match for the iMate definitions to match. iMate definitions with matching names and match lists, but without matching properties, do not match."

 

My guess is that when using the ALT-drag technique you are mistakenly picking up on a model edge rather than the other iMate.

 

I use fasteners from content center but I've never had to create iMates for them using code. I often constrain them manually then use Component.Replace if I need a different size & the constraints stay intact. What's your complete workflow? There may be a better way to achieve your end goal.

0 Likes
Message 26 of 26

Anonymous
Not applicable

@JBerns 

just managed to watch the screencast you posted. As suspected, the iMate is matching with the model edge, not the other iMate.

0 Likes