Sketch Constraint Visibility

Sketch Constraint Visibility

BromanSillito
Advocate Advocate
640 Views
3 Replies
Message 1 of 4

Sketch Constraint Visibility

BromanSillito
Advocate
Advocate

I'm having trouble finding a way to hide the constraints in a part sketch using the API. I'm creating a sketch with the API with several hole center points that are fixed. However, the fixed constraints make it hard for the user to see the hole points. Does anyone out there know how to hide sketch constraints with the API?

 

 

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

frederic.vandenplas
Collaborator
Collaborator
Accepted solution

Try this

 

ThisApplication.CommandManager.ControlDefinitions.Item("SketchHideAllConstraintsCtxCmd").Execute
If you think this answer fullfilled your needs, improved your knowledge or leads to a solution,
please feel free to "kudos"
Message 3 of 4

BromanSillito
Advocate
Advocate
Perfect!! Thanks!
0 Likes
Message 4 of 4

MarkyTomm
Enthusiast
Enthusiast

Hi Frederick,

 

That is a great snippet of code, is there a similar one to show all sketch constraints?

 

I tried replacing the Hide with Show (see below) but it does not appear to be that simple, it throws an error when i run it

ThisApplication.CommandManager.ControlDefinitions.Item("SketchShowAllConstraintsCtxCmd").Execute

Regards

Mark

0 Likes