AnsweredAssumed Answered

export layout to PDF in modelbuilder

Question asked by geonetadmin on Aug 4, 2010
Original User: ukvick

Hi!

I am looking for a solution in order to export a predefined layout (map) with the data that I am interested of within to PDF and have the advanced options taking part of the export options. I do not see how to do it. I succeed with the export MXD to PDF but I can not add the advanced options part. The thing is that I have to create a multiple layouts with pdf layers and feature attibutes on it. All of this it has to be done in ArcGIS 9.3. I have seen that you can do something like that in ArcGIS 10 but I don't have it yet.

Any ideas?

Sincerely yours

Felipe

PD.- I got this code for VB 6 but it does not work at all:

Sub SetAttributeExportsForPdf()
  Dim pMxDocument As IMxDocument
  Dim pMap As IMap
  Dim pEnumLayer As IEnumLayer
  Dim pLayer As ILayer
  Dim pId As New UID
  Dim pLayerFields As ILayerFields
  Dim pFeatureLayer As IFeatureLayer
  Dim pFieldInfo As IFieldInfo2
  Dim iCurField As Long
  Set pMxDocument = Application.Document
  Set pMap = pMxDocument.FocusMap
  pId = "{E156D7E5-22AF-11D3-9F99-00C04F6BC78E}"
  Set pEnumLayer = pMap.Layers(pId, True)
  pEnumLayer.Reset
  Set pLayer = pEnumLayer.Next
  Do While Not pLayer Is Nothing
    Debug.Print pLayer.Name
    If TypeOf pLayer Is ILayerFields And TypeOf pLayer Is IFeatureLayer Then
      Set pLayerFields = pLayer
      Set pFeatureLayer = pLayer
      iCurField = 0
      Set pFieldInfo = Nothing
      For iCurField = 0 To pLayerFields.FieldCount - 1
        Set pFieldInfo = pLayerFields.FieldInfo(iCurField)
        If (pLayer.Name = "sign_total_Qty") And (pFieldInfo.Alias = "sign_total_Qty" Or _
            pLayerFields.Field(iCurField).Name = pFeatureLayer.DisplayField) Then
          pFieldInfo.Visible = True
        Else
          pFieldInfo.Visible = False
        End If
        Debug.Print "   Field='" & pFieldInfo.Alias & "'" & " Visiblity = " & pFieldInfo.Visible; ""
      Next
    End If
    Set pLayer = pEnumLayer.Next
  Loop
End Sub

Attachments

Outcomes