Article | 41023366 |
Type | HowTo |
Product | Engine |
Version | 4.1.6.1028 |
Date Added | 1/8/2004 |
Submitted by | Michelle Satullo |
Keywords |
How can I get rid of the 0 before the inches using the arctictual units?
for example when I dimension something I get 0' 8 1/16" I don't want the zero to show up
New properties for dimension was added in version 5.0 (DimZin ,DimAzin etc)
For vesion 4 you can use the following code:
In DefaultDimTxt Event you can to trim the dimlength as follow:
Dim txt As String If InStr(1, dimText, Chr(34), vbTextCompare) < 1 And _ InStr(1, dimText, Chr(39), vbTextCompare) < 1 Then Exit Sub 'if is a Engineering or Architectural dimension then ... txt = dimText If Left(txt, 1) = "0" Then txt = Right(txt, Len(txt) - 3) Else Dim tmp As String tmp = Left(txt, 2) If tmp = "R0" Or tmp = "d0" Then 'Diameter or Radial txt = Left(tmp, 1) & Right(txt, Len(txt) - 4) End If End If dimText = txt