ConstraintStatus returned by API differs from UI status

ConstraintStatus returned by API differs from UI status

Maxim-CADman77
Advisor Advisor
447 Views
3 Replies
Message 1 of 4

ConstraintStatus returned by API differs from UI status

Maxim-CADman77
Advisor
Advisor

 

When I open the only Sketch contained in the attached IPT I see "Fully Constrained" note in the right side of the status bar.

I expect API will return 51713 value of ConstraintStatus of the Sketch BUT

when I run this iLogic code:

MsgBox(ThisDoc.Document.ComponentDefinition.Sketches(1).ConstraintStatus,,"First Sketch ConstraintStatus:")

I get 51714.

Why?

 

PS: The issue is reproducible in both Inventor 2014 and 2019.2

Please vote for Inventor-Idea Text Search within Option Names

0 Likes
448 Views
3 Replies
Replies (3)
Message 2 of 4

chandra.shekar.g
Autodesk Support
Autodesk Support

@Maxim-CADman77,

 

Actually, sketch is not "fully constrained". One SketchArc is not constrained as shown in below image.

Under_Constrained.png

So, sketch is modifed to "fully constrained" one. Modified part is attached with this post. Now, try below iLogic code to get ConstrainStatus as 51713.

 

MsgBox(ThisDoc.Document.ComponentDefinition.Sketches(1).ConstraintStatus,,"First Sketch ConstraintStatus:")

Thanks and regards,


CHANDRA SHEKAR G
Developer Advocate
Autodesk Developer Network



0 Likes
Message 3 of 4

Maxim-CADman77
Advisor
Advisor

Your answer is based only on color of this arc?

Is it really under-constrained (can be changed by adding some dimension or constraint)?

I can't add any dimension or constrain without making the sketch over-constrained.

Neither can do the Inventor itself:

If I press "Automatic Dimensions And Constraints" button, choose the arc as Curves and press Apply the arc remains colored as under-constrained:

image.png

I'd rather say it is colored in that way by some mistake (?in API?).

Don't you think so?

Please vote for Inventor-Idea Text Search within Option Names

0 Likes
Message 4 of 4

chandra.shekar.g
Autodesk Support
Autodesk Support

@Maxim-CADman77,

 

To investigate further, a change request(INVGEN-24070) is created with engineering team.

 

Thanks and regards,


CHANDRA SHEKAR G
Developer Advocate
Autodesk Developer Network



0 Likes