Tolerance is not showing?

Tolerance is not showing?

Anonymous
Not applicable
1,220 Views
5 Replies
Message 1 of 6

Tolerance is not showing?

Anonymous
Not applicable

Hello!

I would like to put different tolerances depending on the value and tried something like below but the tolerance is not showing on the drawing. Can anyone advise me what am I doing wrong? Thank you in advance!

If (oParam.Value <= 15) Then
    oParam.Tolerance.SetToSymmetric(0.1)
ElseIf (oParam.Value >15) AndAlso (oParam.Value <= 30) Then
    oParam.Tolerance.SetToSymmetric(0.15)
Else
    oParam.Tolerance.SetToSymmetric(0.2)
End If

  

0 Likes
Accepted solutions (1)
1,221 Views
5 Replies
Replies (5)
Message 2 of 6

Anonymous
Not applicable

Btw I can see tolerances are correctly applied in the parameter of .ipt but they are not shown in the drawing.

0 Likes
Message 3 of 6

bradeneuropeArthur
Mentor
Mentor

hi, could you upload the complete code to investigate?

 

Regards,

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

Message 4 of 6

Anonymous
Not applicable

Hi Arthur,

Thank you for your reply.

 

I wrote code something like this.

Dim oValue As Inventor.Parameter
oValue = params.Item("value.Name")
oValue.Tolerance.SetTosymmetric("0.2 mm")

 

The complete code is a bit long but you can find it on my github. See line 90.

https://github.com/Minso-xyz/automated-drawing-backup.ring/blob/master/backup_ring/backup_ring/Form1...

 

Thank you for your help!

0 Likes
Message 5 of 6

marcin_otręba
Advisor
Advisor
Accepted solution

hi,

how is your dimensions in drawing created ? it is retrived from model like :

https://knowledge.autodesk.com/support/inventor-products/learn-explore/caas/CloudHelp/cloudhelp/2016...

 

or placed directly in drawing ? - if yes then tolerance will not occur in your drawing.

Hi, maybe you want to check my apps:


DrawingTools   View&ColoringTools   MRUFolders

Message 6 of 6

Anonymous
Not applicable

@marcin_otręba 

Hi Marcin,

Thank you for your reply.

I tried "Retrieve Model Annotations" as you suggested and it works now! Thank you!!

0 Likes