Using FME's Gentrans mode

Liz Sanderson
Liz Sanderson
  • Updated


FME’s GENTRANS mode is a way to do a quick translation between two formats. GENTRANS performs translations that are very similar to the Universal Translator’s Generate/Translate functionality. GENTRANS is useful for when you need to perform quick translations between different formats, and don’t need to do any special operations that would normally be performed using FME Workbench.

Why use GENTRANS: the advantage of Gentrans is that it is very easy to run in batch scripts. However, we would recommend starting with either FME Workbench or Quick Translator before jumping into using GENTRANS.


Simply type:
 fme gentrans

...on a command line (eg DOS window) to discover the syntax and functionality of the GENTRANS command.

GENTRANS and Pipelines

A pipeline is similar to an FME Mapping File, which itself is a non-graphic version of a workspace. The difference is that a pipeline doesn't have defined readers or writers, just a set of processing commands. GENTRANS doesn't allow use of workspaces, but you could probably turn a workspace into a pipeline by first saving it as a mapping file (File > Save As) and then editing the mapping file in a text editor to delete the source and destination dataset definitions.

It's complicated, so I guess the point is that if you need to process the data in some way, then GENTRANS might not be the best solution and you should probably be using FME Workbench.


Conversion with Coordinate System Reprojection

  FME GENTRANS LOG_FILENAME gentrans.log ACAD drainage_design_P001.dwg COORDSYS,  BritishNatGrid ACAD drainage_design2_P001.dxf COORDSYS,BritishNatGrid

Translation with a Parameter File

Generating a parameter file:
  FME GENTRANS GUI GENERATE key.param ACAD drainage_design_P001.dwg ACAD drainage_design2_P001.dxf

Using a parameter file:
  FME GENTRANS LOG_FILENAME logfile.txt parameter_file.txt

Generate a GENTRANS command from a GUI

This example opens a GUI which outputs a GENTRANS command line. Simply prefix it with "FME GENTRANS" to run it.

Generate a GENTRANS command from a Parameter File


Translation with Reader and Writer Keywords

  FME Gentrans ACAD "S:\key-systems\drainage_design_P001.dwg"  "RUNTIME_MACROS,\"METAFILE,acadScan,_EXPAND_BLOCKS,no,_EXPAND_VISIBLE,no,_BULGES_AS_ARCS,no,  _STORE_BULGE_INFO,yes,_READ_PAPER_SPACE,no,ACAD_IN_READ_GROUPS,no,_IGNORE_UCS,no,  _MERGE_SCHEMAS,YES\",META_MACROS,\"Source_EXPAND_BLOCKS,no,Source_EXPAND_VISIBLE,no,  Source_BULGES_AS_ARCS,no,Source_STORE_BULGE_INFO,yes,Source_READ_PAPER_SPACE,no,  SourceACAD_IN_READ_GROUPS,no,Source_IGNORE_UCS,no\",METAFILE,acadScan,COORDSYS,BritishNatGrid,  IDLIST," ACAD "S:\key-systems\drainage_design_P001.dxf"  "RUNTIME_MACROS,\"_ATTRKIND,external_attributes,_REL,Release2000,  _TMPL,S:\key-systems\drainage_design_P001.dwg\",  META_MACROS,\"Dest_ATTRKIND,external_attributes,Dest_REL,Release2000,  Dest_TMPL,S:\key-systems\drainage_design_P001.dwg\",METAFILE,ACAD,COORDSYS,BritishNatGrid"

Batch Processing using GENTRANS

   for /R x: %%F in (*.shp) do fme gentrans LOG_FILENAME "y:\%%~pF%%~nF.log" PIPELINE ground2grid.fmi SHAPE "%%F" SHAPE "y:\%%~pF"

Was this article helpful?



Please sign in to leave a comment.