Dears,
I'm trying control DIM precision of 2D Drawing by iLogic/VB.NET. Could you please help me done it?
The red stick need to show by rule >500 then precision = 0; <500 then precision = 1.1
This ref. post help me got all dims of drawing: https://forums.autodesk.com/t5/inventor-ilogic-and-vb-net-forum/get-dimension-tolerance-value-from-a...
Thank you very much!
Solved! Go to Solution.
Solved by Alexander_Chernikov. Go to Solution.
Hi, you can try next code in VBA or convert it to iLogic
Public Sub Prec_of_Dim()
Dim oDoc As DrawingDocument
Set oDoc = ThisApplication.ActiveDocument
Dim oSheet As Sheet
Set oSheet = oDoc.ActiveSheet
Dim oDrDim As DrawingDimension
Dim dVal As Double
Dim i As Long
dVal = 50 ' value in centimeters!
For i = 1 To oSheet.DrawingDimensions.Count
Set oDrDim = oSheet.DrawingDimensions(i)
If oDrDim.ModelValue < dVal Then oDrDim.Precision = 1
If oDrDim.ModelValue >= dVal Then oDrDim.Precision = 0
Next
End Sub
Do you find the posts helpful? "LIKE" these posts! | Відповідь корисна? Клікніть на "ВПОДОБАЙКУ" цім повідомленням!
Have your question been answered successfully? Click "ACCEPT SOLUTION" button. | На ваше запитання відповіли? Натисніть кнопку "ПРИЙНЯТИ РІШЕННЯ"
.
Can't find what you're looking for? Ask the community or share your knowledge.