Author Topic: Leading zeros  (Read 1943 times)

0 Members and 1 Guest are viewing this topic.

Humbertogo

  • Guest
Leading zeros
« on: August 21, 2006, 12:40:39 PM »
How to Leading zeros
for example if i have
an  value 0.001 must be confort to  .001

deegeecees

  • Guest
Re: Leading zeros
« Reply #1 on: August 21, 2006, 12:45:59 PM »
If in the dwg, find/replace "0." with "." should do the trick.

DaveW

  • Guest
Re: Leading zeros
« Reply #2 on: August 21, 2006, 02:31:16 PM »
Convert it to a trimmed string.

Dim MyNumber as Double

MyNumber = 0.75

Dim MyString as String

MyString = trim(str(MyNumber))

To convert the string to a double use Cdbl(MyString)
To convert the string to an integer use Cint(MyString)

Humbertogo

  • Guest
Re: Leading zeros
« Reply #3 on: August 22, 2006, 01:50:26 AM »
Thanks

deegeecees

  • Guest
Re: Leading zeros
« Reply #4 on: August 22, 2006, 08:42:02 AM »
What he said.