Problem in AddAngleConstraint

Problem in AddAngleConstraint

Anonymous
Not applicable
557 Views
4 Replies
Message 1 of 5

Problem in AddAngleConstraint

Anonymous
Not applicable
I have program which adds component into assembly and applies angle constraints,
object proxyW;
panelOcc.CreateGeometryProxy(panelDef.WorkPlanes["YZ Plane"], out proxyW);
oAsmComp.Constraints.AddAngleConstraint(oAsmComp.WorkPlanes["YZ Plane"], false, proxyW, false, Math.PI / 2, null, null, true);

where oAsmComp is and assembly compoennt definition.

Angle constraints is getting applied and there is no problem.
But whenever design doctor is on in assembly due to some constraints error, this angle constraint is not getting updated. How to resolve this problem?

After deleting these constraints having problem, I found this angle constraint got updated.

Is there any way to detect whether design doctor is on or to force update even if doctor is on?
or to delete all problemetic constraints?
0 Likes
558 Views
4 Replies
Replies (4)
Message 2 of 5

Anonymous
Not applicable

You can find all problematic constraints in an
assembly by iterating over all assembly constraints and querying
AssemblyConstraint.HealthStatus property. If you so wish, you can then delete
all such constraints.

 

Sanjay-

 
0 Likes
Message 3 of 5

Anonymous
Not applicable
Thanks for the suggestion.

My assembly will have at least more than 300 assembly constraints always. In this case program will end up with iterating through all these hundreds of constraints. I was hoping there would be short cut to query these unhealthy constraints probably through design doctor.

But I do not understand why these unhealthy assembly constraints should stop new angle constraints to get updated.?
0 Likes
Message 4 of 5

Anonymous
Not applicable

<<But I
do not understand why these unhealthy assembly constraints should stop new angle
constraints to get updated.?>>

 

I don't know the answer to this either. Can you
reproduce this thru the user interface as well? If so, try posting this question
to the Inventor newsgroup. If the issue is API-specific, please let me
know.

 

Sanjay-
0 Likes
Message 5 of 5

Anonymous
Not applicable
I tried through user interface and found same problem. By this we can guess this issue is not API specific.

Thanks for the help.
0 Likes