Lock Dimension(s)


Hi there,

I am currently trying to create a small program that creates a part from a "Master" part which has 3 dimensions (it's just a simple tube with Diameter, Thickness and Length as dimension names).

After creation, I'd like to lock the Diameter and Thickness dimensions , leaving Length variable. This is to prevent users changing these critical dimensions, as these are connected to part numbers reflecting these dimensions.

I have looked for some kind of value that states if the dimension is either locked or not, but I was not able to find it using the SoldEdge Spy Tool.

I also tried to somehow "select" the dimensions and apply the Lock command (ID 10948), but that didn't work out either (I am quite a noob at programming).

Is there any other way to lock these dimensions? I am using VB.NET.

Tymen Jissink

 Edit: I just found it, it was the "Constraint" property, setting it to "False" locks the dimension 


Posted by: T. Jissink
Post date: 9/20/2009 9:22:26 PM


RE: Lock Dimension(s)

Edit: I just found it, it was the "Constraint" property, setting it to "False" locks the dimension


That is not exactly true. Constraint=False just makes the dimension not driving, but driven. You can still select the circle in the profile and change its diameter by hand.

If you want to do one more step, after applying Constraint=False in the dimension you should aplply a Relations2D.AddFix(objCircle) to your circle. This way the circle is locked and it's more difficult to change it by programming.

Also, the Length of your example should be driven by a dimension in a sketch. If you use (for example) the automatic dimension that SE puts when a extruded protrusion is done, it is not possible to apply a Constraint=False to it.

Hope this helps,



Posted by: Julian Guillo
Post date: 9/21/2009 11:57:37 AM

RE: Lock Dimension(s)


Thanks for your reply Julian.

I didn't try changing the diameter of the circle by hand, just the dimension (stupid me ).

Thanks for the AddFix function. I will use that one too.


Posted by: T. Jissink
Post date: 9/22/2009 3:37:19 AM