Startup & Shutdown Python Scripts
- FME allows us to run python scripts before and
after a translation.
- This is very useful because you can carry out
maintenance tasks on your datasets before they
are pushed into a different format.
- In this example I will be compacting the FGDB
before the translation then call a batch file to
clean up the FME’s log after the translation.
FME Workbench 2 (Pipelines)
NAD27 -> WGS84
Test: PL is Existing
Export all KMLs
Into a single KMZ
Test: PL is As-Built
Test: PL is in
Shutdown Python Script
- The following python script runs a batch file named
“LogClipper.bat” after the translation is done.
- Once the batch file runs the Python script closes.
- more +94 command: Using the original FME log
file “Pipelines.log” it creates a
“Pipelines.log.new” file which only shows the logs
data from line 95 down to the end of the log.
- Move /y command: Replaces the original log with
the new condensed version.
- Notepad opens showing the clipped log containing
the feature counts.