Quantcast
Channel: Forums - ArcObjects SDKs
Viewing all articles
Browse latest Browse all 1374

Question on Loops!!

$
0
0
I created a program in ArcO that has a dialog box that users answer questions in to get an mxd to draw. I missed a step in the program. I have it written where if they choose Annual stations it will draw an mxd from the current year folder. I forgot to program in differeent years. For Example: If they choose Annual and 2010 then it needs to draw the mxd from the 2010 folder. I'm not to sure how to fix my loop. Should it be:

If cboStations.Text = "Annual" then
If cboYear.Text = "2010" Then
Select Case cboDistrict.Text
Case "Abilene"
pApp.OpenDocument ("K: .........

Code is below:
Code:

Private Sub cmdMap_Click()

   
    Dim UserValue As String
    Dim Value As String
    Dim Year As String
    Dim pDoc As IDocument
    Dim pApp As IApplication
   
   
    Set pDoc = New MxDocument
    Set pApp = pDoc.Parent
   
    If cboStations.Text = "Annual" Then
                     
    Select Case cboDistrict.Text
        Case "Abilene"
            pApp.OpenDocument ("K:\TASS\4_MAPPING_DATA_SUPPORT\Traffic_Mapping\District_Maps\2012\Abilene\Abilene_Base_Map.mxd")
        Case "Amarillo"
            pApp.OpenDocument ("K:\TASS\4_MAPPING_DATA_SUPPORT\Traffic_Mapping\District_Maps\2012\Amarillo\Amarillo_Base_Map.mxd")
        Case "Atlanta"


Viewing all articles
Browse latest Browse all 1374

Trending Articles