Adding tolerance to dimension placed on drawing by iLogic

Adding tolerance to dimension placed on drawing by iLogic

harvey_craig2RCUH
Advocate Advocate
492 Views
2 Replies
Message 1 of 3

Adding tolerance to dimension placed on drawing by iLogic

harvey_craig2RCUH
Advocate
Advocate

I would like to add a tolerance to my linear dimension after I have placed it with iLogic in my drawing. I have successfully managed to apply my dimension, however, I can't find how to add a tolerance to this. 

 

Something like this:

ThisDrawing.BeginManage()
If True Then 
	Dim linDim1 = genDims.AddLinear("Dimension 1", VIEW1.SheetPoint(0.5, 1.4), namedGeometry1, namedGeometry2)
	linDim1.Tolerance.SetToSymmetric(0.25) 'I expected it to be along the lines of this but this isn't it. I can't find tolerance in the object tree.
End If
ThisDrawing.EndManage()

 

Thanks,

Harvey

0 Likes
Accepted solutions (2)
493 Views
2 Replies
Replies (2)
Message 2 of 3

Michael.Navara
Advisor
Advisor
Accepted solution

You can try to access NativeEntity of the linDim1. It is of type LinearGeneralDimension which has Tolerance property.

 

 

ThisDrawing.ActiveSheet.DrawingDimensions.GeneralDimensions.AddLinear(...).NativeEntity.Tolerance.SetToSymmetric(0.1)

 

 

 

Message 3 of 3

Curtis_Waguespack
Consultant
Consultant
Accepted solution

@harvey_craig2RCUH

 

Michael.Navara is spot on, but a bit of explanation might help understand what's going on.

 

When we use the iLogic functions to place or create things, iLogic creates them as a iManaged<things> that are special subsets of the Inventor API's same things.

 

So in this case iLogic creates an iManagedGeneralDimension which just has special iLogic things bolted on to the native Inventor GeneralDimension.

 

You can see this in the tooltip if you hover over the AddLinear function, it tells you that it will create this dimension as an iManagedGeneralDimension 

 

Curtis_Waguespack_1-1722350143915.png

If you go to the end of that line and type a dot, you will see that you can grab the NativeEntity from that iManagedGeneralDimension :

 

Curtis_Waguespack_5-1722350803742.png

 

Add another line and you can find tolerance in the intellisense tooltip to guide you through this

 

Curtis_Waguespack_6-1722350863827.png

 

We might notice that in the image above it tells us that the type is "As Tolerance".

 

So we can declare this line as a tolerance, and then that allows the intellisense menu to know what we're working with, so that it can continue to guide us through the creation of the item... in this case a tolerance.

 

Curtis_Waguespack_4-1722350422122.png

 

 

EESignature