Question

workbench name as attribute

  • 1 February 2013
  • 2 replies
  • 4 views

Hi,

 

 

how can I fetch the workbench name and define it as an attribute value?

 

 

Thanks, Felix

2 replies

Badge +14
Use a ParameterFetcher and fetch:

 

 

FME_MF_DIR - to get the FMW path

 

FME_MF_NAME - to get the FMW name

 

 

Whilst the Parameter fetcher appears to not like you adding the name macro, it still fetches it. Perhaps Safe will expose all the macro's her in future.

 

 

If you want to get this with Phthon or TCl you'll need to fetch it like $(FME_MF_NAME).

 

 

 

Badge +14
For general interest I have dicovered from Safe that if you:

 

  1. Open Workbench
  2. Find the 'Shutdown TCL Script' Advanced Parameter.
  3. Paste in this code:
 

 

foreach key [array names FME_MacroValues] {

 

    puts "$key : $FME_MacroValues($key)" }

 

  1. Run the workspace
Then all of the available Macro's will be listed at the bottom of the log file. I have filed a PR to ask for 4 of the more useful ones that are missing from the ParameterFetcher's pull down list to be added, including FME_MF_NAME.

Reply