Add constraint with ilogic without naming the geometry of the parts possible?

Add constraint with ilogic without naming the geometry of the parts possible?

assbuild
Observer Observer
405 Views
3 Replies
Message 1 of 4

Add constraint with ilogic without naming the geometry of the parts possible?

assbuild
Observer
Observer

Hello,
is it possible to define a constraint in an assembly with an iLogic rule without having defined the geometries within the parts before?

I Use the code snipped like:

Constraints.AddMate("Mate1", "Part1:1", "Work Plane1", "Part2:1", "Work Plane1",
                    offset := 0.0, e1InferredType := InferredTypeEnum.kNoInference, e2InferredType := InferredTypeEnum.kNoInference,
                    solutionType := MateConstraintSolutionTypeEnum.kNoSolutionType,
                    biasPoint1 := Nothing, biasPoint2 := Nothing)

This works fine as long as I´m able to name the used geometry within my parts. But as I´m working within a Vault invoronment with a lot "released" parts or parts from content center, it is not possible to name the geometry within the parts since i am not supposed to work on the parts themselves. 

 

I´m working with Inventor 2020 at the moment.

 

About help or workarounds I would be very grateful!

Regards,

Ole

0 Likes
406 Views
3 Replies
Replies (3)
Message 2 of 4

JamesMeBoi
Enthusiast
Enthusiast

Yes there is, I just ran into this issue when using sub assembly's inside of an a bigger assembly. I believe you need to use work planes and work axis to do what you want to do. Give that a try at least not sure how it will work with vault but id be interested to see.

0 Likes
Message 3 of 4

assbuild
Observer
Observer

Thanks for the advice. I think with the use of existing planes and coordinate systems I get further in some situations.

Nevertheless, the actual question still remains for me:

If I manually create a constraint in an assembly, it will be created and saved uniquely in the assembly, without having to edit the parts themselves. This behavior must be be reproduceable somehow by script, right?

The used geometries of the parts must already present a unique object in the file even without that I assign a name to it manually before.

0 Likes
Message 4 of 4

WCrihfield
Mentor
Mentor

It is possible, but may require either more work, or an equivalent amount of work to actually creating the constraints manually, because you still have to find and identify the entities within the assembly that you want to constrain together one way or another.  You either have to know something unique about what you are searching for, or you have to make/create something unique about what you're searching for, in order to find it.  To incorporate something like Pick or manual selection would pretty much negate most of the automation advantage of the rule.  One thing I've seen folks do is assign attributes to the proxy objects in the assembly that they will be constraining to/between ahead of time (similar to 'named entities' but without user interface tool).  However, that also requires you to either use one of the available add-ins, a macro, or a rule to help you assign the names, and some manual selections, which also seems like it would be practically eliminating the advantage of the automation later.

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes