Message 1 of 4
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have written a code to get a value from the user and multiply half of it to the existing angular dimension in the sheet. The code has no error however, it doesn't work.
Dim oDoc As DrawingDocument = ThisDrawing.Document Dim oSheet As Sheet = oDoc.ActiveSheet Dim val As String = InputBox("Enter Shell OD in inch", "User Input") If val = "" Or Not IsNumeric(val) Then MsgBox("Please enter a valid numeric value.") Exit Sub End If Dim OD As Double = CDbl(val) For Each oDim As GeneralDimension In oSheet.DrawingDimensions.GeneralDimensions If oDim.Type = DimensionTypeEnum.kAngularDimensionType Then ' Get the current angular dimension value Dim oAngleDim As AngularGeneralDimension = oDim Dim angleValue As Double = oAngleDim.ModelValue ' Multiply by the scale factor (user input value) Dim ARC As Double = angleValue * OD / 2 ' Update the dimension text to show both original and new values oDim.Text.FormattedText = "<DimensionValue/><br/>" & ARC.ToString End If Next
Solved! Go to Solution.