Any exceptions generated while running the script will cause the translation to fail.
Access to a feature’s attributes is provided via the FME Objects Node.js API. To view the API documentation, navigate to the FME installation folder and go to this location: fmeobjects\nodejs\apidoc\index.html.
FME can access Node.js modules that are stored on the file system. Use the require function to load these modules. FME will search both the standard Node.js module location and the workspace location to find the module to be loaded.
The print function has been implemented to print out a custom log message to the standard FME log file.
The fme_get_attribute function has been implemented to retrieve an attribute value as an encoded UTF-8 string from the current feature, given a single parameter containing the attribute name string.
The fme_set_attribute function has been implemented to set an attribute name and value as an encoded UTF-8 string attribute on the current feature, given two parameters containing the attribute name and value strings.
The fme_attribute_exists function checks whether the specified attribute exists on the current feature, and returns true or false depending on whether it does.
Editing Transformer Parameters
Using a set of menu options, transformer parameters can be assigned by referencing other elements in the workspace. More advanced functions, such as an advanced editor and an arithmetic editor, are also available in some transformers. To access a menu of these options, click beside the applicable parameter. For more information, see Transformer Parameter Menu Options.
FME Licensing Level
FME Professional edition and above
Search FME Knowledge Center
Search for samples and information about this transformer on the FME Knowledge Center.