🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #17845

Re: Method to convert "6p36" to 1.5?

#17845
From: maxdunn
Date: Fri, 09 May 2003 00:32
14 lines
1317 bytes
The following function will get you the number of points as a double from a string expression in Picas and Points, i.e. for 6p36 it will return 108.

Public Function PicasToPoints(ByVal sPicas As String) As Double
    Dim arSplit() As String
    If Right(sPicas, 1) = "p" Then sPicas = sPicas & "0"
    If InStr(sPicas, "p") > 0 Then
        arSplit = Split(sPicas, "p")
        PicasToPoints = 12 * CDbl(arSplit(0)) + CDbl(arSplit(1))
    Else
        PicasToPoints = 12 * CDbl(sPicas)
    End If
End Function

Max
Technical Details
Message-ID: <1de90e1d.2@WebX.la2eafNXanI>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-01!sn-xit-08!supernews.com!newshosting.com!news-xfer1.atl.newshosting.com!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.tpinternet.pl!newsfeed01.sul.t-online.de!t-online.de!WebX
References: <1de90e1d.-1@WebX.la2eafNXanI>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f939a,c48e239d65fbe1e5
X-Google-Attributes: gidf939a,public
X-Google-ArrivalTime: 2003-05-08 17:38:06 PST
From: maxdunn <maxdunn@siliconpublishing.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-01!sn-xit-08!supernews.com!newshosting.com!news-xfer1.atl.newshosting.com!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.tpinternet.pl!newsfeed01.sul.t-online.de!t-online.de!WebX
Newsgroups: adobe.scripting.indesign
Subject: Re: Method to convert "6p36" to 1.5?
Message-ID: <1de90e1d.2@WebX.la2eafNXanI>
Date: Thu, 8 May 2003 17:32:43 -0700
References: <1de90e1d.-1@WebX.la2eafNXanI>
Lines: 16
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit