HOW TO
Instructions, and the the use of the code sample provided, show how to make a list of all the predefined projections available in ArcGIS using Visual Basic for Applications and ArcObjects.
Note:
Code in the project's ThisDocument code module only runs in the current map document. To store the code in all map documents, open the Normal.mxt ThisDocument code module instead.
Code:
Sub ListProjections()
Dim pSRFactory As ISpatialReferenceFactory
Set pSRFactory = New SpatialReferenceEnvironment
Dim pPCSList As ISet
Set pPCSList = pSRFactory.CreatePredefinedProjections
Dim pProj As IProjection
Set pProj = pPCSList.Next
Do Until pProj Is Nothing
Debug.Print pProj.Name
Debug.Print pProj.FactoryCode
Set pProj = pPCSList.Next
Loop
End Sub
Get help from ArcGIS experts
Download the Esri Support App