iLogic to set Tolerance Type without using SetTo...

iLogic to set Tolerance Type without using SetTo...

engilic
Advocate Advocate
331 Views
0 Replies
Message 1 of 1

iLogic to set Tolerance Type without using SetTo...

engilic
Advocate
Advocate

Hi all,

 

I would like to make a code to change the style of dimensions on a drawing but before that to get tolerance type and Upper and Lower limit together with Hole and Shaft tolerance if they are not grayed out (disabled).

 

I can do it by getting the Tolerance Type (5 digit number, ex. 31245,  or description like kBasicTolerance) and then with multiple loops set the specific Type of Tolerance with SetToBasic, SetToDeafult, SetTo....

Is there a way to use Tolerance.ToleranceType.Equals(something) or some other direct way of saying "I want new Tolerance Type to be the same as the old one which I saved as some parameter"?


I tried to put in brackets old dimension type (original) Tolerance.ToleranceType or Tolerance.ToleranceType.ToString, nothing works.

 

Then I guess it is easy to save Upper and Lower limit, Hole and Shaft tolerance, and put them back.

 

Thank you

0 Likes
332 Views
0 Replies
Replies (0)