Skip to main content
deleted 2 characters in body
Source Link
artwork21
  • 35.2k
  • 8
  • 67
  • 134

The snippet I mentioned in my comment, http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#/d/000100000026000000.htm, is pulling in the ExportFormat value through the function argument. When the function is called from a different method it is providing that value (e.g. "PDF" or "JPG"), which you are not using the function arguments. You need to assign that value to the variable before the Select Case statement:

e.g

    Dim pExport = IExport
    'pExport = New PDFCreate <-------------  not needed
    ExportFormat = "PDF"

    Select Case ExportFormat
        Case "PDF"
            pExport = New ExportPDF

The snippet I mentioned in my comment, http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#/d/000100000026000000.htm, is pulling in the ExportFormat value through the function argument. When the function is called from a different method it is providing that value (e.g. "PDF" or "JPG"), which you are not using the function arguments. You need to assign that value to the variable before the Select Case statement:

e.g

    pExport = New PDFCreate
    ExportFormat = "PDF"

    Select Case ExportFormat
        Case "PDF"
            pExport = New ExportPDF

The snippet I mentioned in my comment, http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#/d/000100000026000000.htm, is pulling in the ExportFormat value through the function argument. When the function is called from a different method it is providing that value (e.g. "PDF" or "JPG"), which you are not using the function arguments. You need to assign that value to the variable before the Select Case statement:

e.g

    Dim pExport = IExport
    'pExport = New PDFCreate <-------------  not needed
    ExportFormat = "PDF"

    Select Case ExportFormat
        Case "PDF"
            pExport = New ExportPDF
Source Link
artwork21
  • 35.2k
  • 8
  • 67
  • 134

The snippet I mentioned in my comment, http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#/d/000100000026000000.htm, is pulling in the ExportFormat value through the function argument. When the function is called from a different method it is providing that value (e.g. "PDF" or "JPG"), which you are not using the function arguments. You need to assign that value to the variable before the Select Case statement:

e.g

    pExport = New PDFCreate
    ExportFormat = "PDF"

    Select Case ExportFormat
        Case "PDF"
            pExport = New ExportPDF