shrug-l: Display accuracy (solution)
Larry.Kung@dca.state.fl.us
Larry.Kung@dca.state.fl.us
Thu, 21 Jul 2005 16:26:28 -0400
This is a multipart message in MIME format.
--=_alternative 007048CF85257045_=
Content-Type: text/plain; charset="US-ASCII"
Thanks to Mark Nelson's suggestion and Valentina Boycheva's script (see
below). After battling with it for a couple of days Valentina found out
it only works in the Project's .mxd not the Normal.mxt (a fine print from
ESRI). Valentina was very patient with me and I appreciate a lot.
_________________________________
Larry H. Kung
DEM/GIS
Dept. of Community Affairs
(850) 413-9979
From: Valentina Boycheva
Sent: Wednesday, July 20, 2005 11:45 AM
To: Mark Nelson; Cheryl Mullane; David Jenkins
Subject: RE: shrug-l: Display accuracy
The macro below will change the display units to show 3 decimal points. It
has to be called in ThisDocument (Project only), MxDocument_NewDocument
and MxDocument _OpenDocument.
Sub SetMapUnits()
Dim pDoc As IMxDocument
Set pDoc = ThisDocument
Dim pMap As IMap
Set pMap = pDoc.FocusMap
Dim pNumericFormat As INumericFormat
Set pNumericFormat = New NumericFormat
With pNumericFormat
.AlignmentOption = esriAlignRight
.RoundingOption = esriRoundNumberOfDecimals
.AlignmentWidth = 1
.RoundingValue = 3 ' change as necessary
.ShowPlusSign = True
.UseSeparator = True
.ZeroPad = False
End With
Dim pReportUnitFormat As IReportUnitFormat
Set pReportUnitFormat = pDoc
pMap.DistanceUnits = esriDecimalDegrees
Set pReportUnitFormat.NumericFormat = pNumericFormat
End Sub
From: shrug-l-admin@lists.dep.state.fl.us
[mailto:shrug-l-admin@lists.dep.state.fl.us] On Behalf Of
Larry.Kung@dca.state.fl.us
Sent: Monday, July 18, 2005 7:46 AM
To: shrug-l@lists.dep.state.fl.us
Subject: shrug-l: Display accuracy
Can someone tell me how to display more than 2 decimal points when I am
using Decimal Degrees as my display units? I'm running ArcMap 9.0.
Thanks.
_________________________________
Larry H. Kung
DEM/GIS
Dept. of Community Affairs
(850) 413-9979
--=_alternative 007048CF85257045_=
Content-Type: text/html; charset="US-ASCII"
<br><font size=2 face="sans-serif">Thanks to Mark Nelson's suggestion and
Valentina Boycheva's script (see below). After battling with it for
a couple of days Valentina found out it only works in the Project's .mxd
not the Normal.mxt (a fine print from ESRI). Valentina was very patient
with me and I appreciate a lot.</font>
<br><font size=2 face="sans-serif">_________________________________<br>
<br>
Larry H. Kung<br>
DEM/GIS<br>
Dept. of Community Affairs<br>
(850) 413-9979<br>
</font>
<br><font size=2 color=#000080 face="Arial"> </font>
<div align=center>
<br>
<hr></div>
<br><font size=2 face="Tahoma"><b>From:</b> Valentina Boycheva <b><br>
Sent:</b> Wednesday, July 20, 2005 11:45 AM<b><br>
To:</b> Mark Nelson; Cheryl Mullane; David Jenkins<b><br>
Subject:</b> RE: shrug-l: Display accuracy</font>
<br><font size=3 face="Times New Roman"> </font>
<br><font size=2 face="Arial">The macro below will change the display units
to show 3 decimal points. It has to be called in ThisDocument (</font><font size=2 color=red face="Arial">Project
only</font><font size=2 face="Arial">), MxDocument_NewDocument and MxDocument
_OpenDocument.</font>
<br><font size=2 face="Arial"> </font>
<br><font size=2 face="Arial"> </font>
<br><font size=2 face="Arial">Sub SetMapUnits()</font>
<br><font size=2 face="Arial"> </font>
<br><font size=2 face="Arial">Dim pDoc As IMxDocument</font>
<br><font size=2 face="Arial"> Set pDoc = ThisDocument</font>
<br><font size=2 face="Arial">Dim pMap As IMap</font>
<br><font size=2 face="Arial"> Set pMap = pDoc.FocusMap</font>
<br><font size=2 face="Arial"> </font>
<br><font size=2 face="Arial">Dim pNumericFormat As INumericFormat</font>
<br><font size=2 face="Arial"> Set pNumericFormat = New NumericFormat</font>
<br><font size=2 face="Arial"> With pNumericFormat</font>
<br><font size=2 face="Arial"> .AlignmentOption
= esriAlignRight</font>
<br><font size=2 face="Arial"> .RoundingOption
= esriRoundNumberOfDecimals</font>
<br><font size=2 face="Arial"> .AlignmentWidth
= 1</font>
<br><font size=2 face="Arial"> .RoundingValue
= 3 ' change as necessary</font>
<br><font size=2 face="Arial"> .ShowPlusSign
= True</font>
<br><font size=2 face="Arial"> .UseSeparator
= True</font>
<br><font size=2 face="Arial"> .ZeroPad = False</font>
<br><font size=2 face="Arial"> End With</font>
<br><font size=2 face="Arial"> </font>
<br><font size=2 face="Arial">Dim pReportUnitFormat As IReportUnitFormat</font>
<br><font size=2 face="Arial"> Set pReportUnitFormat = pDoc</font>
<br><font size=2 face="Arial"> pMap.DistanceUnits = esriDecimalDegrees</font>
<br><font size=2 face="Arial"> Set pReportUnitFormat.NumericFormat
= pNumericFormat</font>
<br><font size=2 face="Arial"> </font>
<br><font size=2 face="Arial"> </font>
<br><font size=2 face="Arial">End Sub</font>
<br><font size=2 face="Arial"> </font>
<div align=center>
<br>
<hr>
<br>
<hr></div>
<br><font size=2 face="Arial">From: shrug-l-admin@lists.dep.state.fl.us
[mailto:shrug-l-admin@lists.dep.state.fl.us] On Behalf Of Larry.Kung@dca.state.fl.us<br>
Sent: Monday, July 18, 2005 7:46 AM<br>
To: shrug-l@lists.dep.state.fl.us<br>
Subject: shrug-l: Display accuracy</font>
<br><font size=2 face="Arial"> </font>
<br><font size=2 face="Arial"><br>
Can someone tell me how to display more than 2 decimal points when I am
using Decimal Degrees as my display units? I'm running ArcMap 9.0.
Thanks. <br>
_________________________________<br>
<br>
Larry H. Kung<br>
DEM/GIS<br>
Dept. of Community Affairs<br>
(850) 413-9979</font>
--=_alternative 007048CF85257045_=--