Skip to main content
Solved

How to extract workspace parameters in bulk from .fmw scripts?

  • December 4, 2023
  • 4 replies
  • 99 views

dragonsam

I am doing an inventarisation of all our scripts. Each script has the workspace parameters completed. This information is ideal for the inventary. I have found a way to do this adding each .fmw script individually, but this is very time consuming so I am looking for a way to do so in bulk.

 

I tried to use Directory reader to initially find all the .fmw scripts in a particular path, and this works, however I do not find a way now from this list how to extract info from inside the various files. I tried the FeatureReader transformer as I used this before to extract DWG files in bulk, but that does not seem to work for .fmw files.

Best answer by david_r

You're on the right track. In the FeatureReader, use the FMW reader. Check the output from the UserParameters feature type, see https://docs.safe.com/fme/html/FME-Form-Documentation/FME-ReadersWriters/fmw/Feature_Representation.htm

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

4 replies

dustin
Influencer
Forum|alt.badge.img+31
  • Influencer
  • 627 replies
  • December 4, 2023

It sounds like you need a Parent-Child workspace setup using the WorkspaceRunner. In the first workspace (parent), you will use the Directory and File Pathnames Reader to create a feature for each of the .fmw files. Those will be fed into the WorkspaceRunner, where it will be set to the second workspace (child) that is running your script.


david_r
Celebrity
  • 8391 replies
  • Best Answer
  • December 4, 2023

You're on the right track. In the FeatureReader, use the FMW reader. Check the output from the UserParameters feature type, see https://docs.safe.com/fme/html/FME-Form-Documentation/FME-ReadersWriters/fmw/Feature_Representation.htm


dragonsam
  • Author
  • 1 reply
  • December 5, 2023

You're on the right track. In the FeatureReader, use the FMW reader. Check the output from the UserParameters feature type, see https://docs.safe.com/fme/html/FME-Form-Documentation/FME-ReadersWriters/fmw/Feature_Representation.htm

Thank you, that was exactly what I was looking for. It works now.


krystalp
Contributor
Forum|alt.badge.img+3
  • Contributor
  • 7 replies
  • July 9, 2024

I was hoping to use the FMW Reader to see what version of Python was set in the Workspace Parameters but it doesn’t seem to capture that.  Any other suggestions?