Zum Hauptinhalt gehen

Passing Workflow Variables to a Print Template

Kommentare

2 Kommentare

  • Permanently deleted user

    wow - that looks like one way of doing it... I don't know python all that well - something that's on the cards to do!!

    I approach it a different way where I collect the values for the variables (from a form) and pass them to the printtemplates function that is available...

    I set the templates (.rpx) files up as per normal with the appropriate variables first, then at run time the values are collected, and then assimilated into a longish URL that is invoked by the Display Hyperlink activity in workflow...

    Here's an example of a hard-coded template file that I'm turning layers on/off for depending on what layout option they choose from the list... the 'size' variable is the actual template ID as geocortex knows it. You will need to dynamically get the map extent for this approach to work properly but there is an activity to do this in workflow...

    "http://devgeocortex01.fire.dse.vic.gov.au/Geocortex/Essentials/ge37/rest/sites/fire/printtemplates/" & size.ToString &

    "/print?bbox=" & bbox.ToString & "&bboxSR=&targetSR=&time=&graphics=&layers=99%28hide%3A*%29%3B33%28show%3A*%29%3B6%28hide%3A*

    %29%3B11%28hide%3A*%29%3B100%28show%3A*%29%3B20%28show%3A*%29%3B34%28hide%3A*%29%3B4%28hide%3A*%29%3B23%28hide%3A*

    %29%3B35%28hide%3A*%29%3B102%28hide%3A*%29" & graticule & topo_base &

    "&layerDefinitions=&opacity=&mapServiceOptions=&featureLayerOptions=&scale=" & scale.ToString & "&dpi=" & print_dpi & "

    &outputFormat=Pdf&tf__incident_name=" & incident_name & "&tf__obsdate=" & obs_date & "&tf__scale=" & print_scale.toString &

    "&tf__map_notes=" & map_notes.ToString & "&f=file#"

    If this seems a valid option, I'll send you the workflow if you like...

    cheers

    Gareth

     

     

    0
  • James Landwehr

    Thanks to both for your replies. Gareth, if you wouldn't mind posting the workflow and it's related template, I'd be grateful. Thanks. Jim

    0

Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.