Skip to main content
Question

workbench name as attribute

  • February 1, 2013
  • 2 replies
  • 26 views

Hi,

 

 

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

 

 

Thanks, Felix

2 replies

davideagle
Contributor
Forum|alt.badge.img+21
  • Contributor
  • February 1, 2013
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).

 

 

 


davideagle
Contributor
Forum|alt.badge.img+21
  • Contributor
  • February 5, 2013
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.

Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings