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: 

Mate edges using using I-logic

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
Anonymous
571 Views, 4 Replies

Mate edges using using I-logic

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 

 

4 REPLIES 4
Message 2 of 5
FINET_Laurent
in reply to: Anonymous

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

Message 3 of 5
Anonymous
in reply to: FINET_Laurent

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);

 

Message 4 of 5
FINET_Laurent
in reply to: Anonymous

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
in reply to: FINET_Laurent

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  

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

Post to forums  

Autodesk Design & Make Report