Mate edges using using I-logic

Mate edges using using I-logic

Anonymous
Not applicable
689 Views
4 Replies
Message 1 of 5

Mate edges using using I-logic

Anonymous
Not applicable

I'm trying to mate two edges of two different cuboids in Inventor, I've named the edges manually, but now I'm trying to mate them using the I-logic code but the assembly is not fetching the edge name. It says "there is no such feature as Edge 1 in cuboid-1". I'm using the following code:-

 

 

Constraints.AddMate("Face_Mate_1", "Cuboid_1", "Edge 1", "Cuboid_2", "Edge 13",
 offset := 0.0, e1InferredType := InferredTypeEnum.kNoInference, e2InferredType := InferredTypeEnum.kNoInference,
 solutionType := MateConstraintSolutionTypeEnum.kOpposedSolutionType,
 biasPoint1 := Nothing, biasPoint2 := Nothing)

 

@Jon.Balgley 

 

0 Likes
Accepted solutions (1)
690 Views
4 Replies
Replies (4)
Message 2 of 5

FINET_Laurent
Advisor
Advisor
Accepted solution

Morning,

 

This should be a syntax issue. Make sure you respect capital letters and spaces (Part names in the assembly & edges names) ..

 

Could you provide files ?  (make sure it's not confidential)
Regards,

 

FINET L.

If this post solved your question, please kindly mark it as "Solution"

If this post helped out in any way to solve your question, please drop a "Like"

@LinkedIn     @JohnCockerill

0 Likes
Message 3 of 5

Anonymous
Not applicable

Hello,

So I was trying to convert this I-logic code for face naming for an assembly in inventor , I'm attatching the code below:

-

Face oFace1 = (Inventor.Face)Part1.ComponentDefinition.WorkSurfaces["Face 1"];
Face oFace2 = (Inventor.Face)Part2.ComponentDefinition.WorkSurfaces["Face 7"];
 
FaceProxy oAsmFace1, oAsmFace2;
object obj1;
occ1.CreateGeometryProxy(oFace1, out (obj1));
 
object obj2;
occ2.CreateGeometryProxy(oFace2, out (obj2));
 
oAsmFace1 = (FaceProxy)obj1;
oAsmFace2 = (FaceProxy)obj2;
 
oAssDoc.ComponentDefinition.Constraints.AddMateConstraint(oAsmFace1, oAsmFace2, 0);

 

0 Likes
Message 4 of 5

FINET_Laurent
Advisor
Advisor

Morning,

 

Is this a question ? I'm not sure to understand.

 

Regards,

 

FINET L.

If this post solved your question, please kindly mark it as "Solution"

If this post helped out in any way to solve your question, please drop a "Like"

@LinkedIn     @JohnCockerill

Message 5 of 5

Anonymous
Not applicable

Morning Laurent, So basically I was trying to convert an I-logic code into C#(C-sharp)...the code was regarding the process of mating with face naming using inventor, the code that I've sent you is my attempt to convert that I-logic code into C#.

@FINET_Laurent  

0 Likes