Inventor Customization

Inventor Customization

New Member
1 Posts
0 Kudos
Registered: ‎09-17-2012
Post 1 of 2

How to change Angle Constraint in Assembly?

361 Views, 1 Replies
01-05-2013 02:59 AM

I got a problem with editing angle constraint in assemblies. I tried edit property of constraint but it didn't move model. Simply changing Angle attribute of constraint item don't work.


Only way I achieved movemenet is


         AngleConstraint a = (AngleConstraint)oOccurrence.Constraints[i];
         Object oEntity1 = a.EntityOne;
         Object oEntity2 = a.EntityTwo;
         String sVal = "" + angle + " deg";
         AngleConstraint d=oAsmCompDef.Constraints.AddAngleConstraint(oEntity1, oEntity2, sVal);
         d.Name = name;

but this is really slow, as much as changing throught parameter:

if (assemblyDoc.ComponentDefinition.Parameters[i].Name == "d655")
Inventor.Parameter invParam = assemblyDoc.ComponentDefinition.Parameters[i];
invParam.Value = Math.PI * angle/180;


Can someone help me with a quicker method?

ADN Support Specialist
1,352 Posts
81 Kudos
Registered: ‎06-12-2011
Post 2 of 2

Re: How to change Angle Constraint in Assembly?

01-13-2013 08:25 PM in reply to: Articles



to drive assembly constraint, you need to use the methods of DriveConstraintSettings. Please refer to this post:

Xiaodong Liang
Developer Technical Services
Autodesk Developer Network

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Are you interested in helping shape the future of the Autodesk Community? To participate in this brief usability study, please click here. Your time and input is greatly appreciated!