How to get Axis info, Axis ID by Inventor API?

How to get Axis info, Axis ID by Inventor API?

Anonymous
Not applicable
1,035 Views
3 Replies
Message 1 of 4

How to get Axis info, Axis ID by Inventor API?

Anonymous
Not applicable

Hi everyone,

 

To constraint with other object, i want to get information of axis (axis id,...) as below using the Inventor API ?
I checked, but I could only find information of work axis on model tree (BrowserNode).

 

Image_Description.png

 

I would appreciate any ideas/suggestions.

MinhHN.

0 Likes
Accepted solutions (1)
1,036 Views
3 Replies
Replies (3)
Message 2 of 4

JamieVJohnson2
Collaborator
Collaborator

That looks like a Revolve Feature, and the axis will be found inside the Feature object.

Jamie Johnson : Owner / Sisu Lissom, LLC https://sisulissom.com/
Message 3 of 4

Anonymous
Not applicable

@Anonymous : Thank you for responding!

 

I used the code below to access object Revolve Feature,
but I cannot find the information of the axis, I'm still checking...

 

PartFeatures prtFeats = oPrtCompDef.Features;

RevolveFeatures revolveFeats = prtFeats.RevolveFeatures;
// revolveFeats.Count = 2

RevolveFeature.PNG

 

0 Likes
Message 4 of 4

Anonymous
Not applicable
Accepted solution

Hi,

 

Option InferredTypeEnum.kInferredLine is used to constraint axis of Revolve Feature with axis of other object.

 

// Add Mate constraint in Assembly
oAsmCompDef.Constraints.AddMateConstraint(face1, face2, 0, InferredTypeEnum.kInferredLine, InferredTypeEnum.kInferredLine);

// Add iMate constraint in Part
oPrtCompDef.iMateDefinitions.AddMateiMateDefinition(face, 0, InferredTypeEnum.kInferredLine);

 

Thanks for viewing the post.

Minh.HN

 

 

 

0 Likes