3. 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.
5. FME Workbench 2 (Pipelines)
FGDB
Reader
Reprojection:
NAD27 -> WGS84
As-Built
Test: PL is Existing
(Not Surveyed)
Symbolization
(Colors/Styles)
Export all KMLs
Into a single KMZ
Test: PL is As-Built
(Surveyed)
Test: PL is in
Construction
11. 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.
LogClipper.bat