Product : Engine, Version : 4.1.6.1028, ArticleID : 41023366

HowTo : How can I get rid of the 0 before the inches using the arctictual units?

Article41023366
TypeHowTo
ProductEngine
Version4.1.6.1028
Date Added1/8/2004
Submitted byMichelle Satullo
Keywords

Subject

How can I get rid of the 0 before the inches using the arctictual units?

Summary

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

Solution

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