span8
span4
span8
span4
The FMEObjects Python API is available for use in the Startup and Shutdown Python (Workspace Parameters - Advanced in Workbench), as well as in the PythonCaller and PythonCreator transformers. One of the objects available is the FMELogFile, which provides access to the Workbench log. Most of the FMELogFile methods are for adding messages to the log, but the setCallBack method allows you to send a copy of all log messages to your own function. This lets you parse the log messages as they are created and pass information from those messages to features in the workspace while it is running.
下面的三个例子说明了工作区运行期间日志信息的一些可能使用。
A customer found that some of his Microstation DGN files had been truncated. Normally, FME just posts a warning in the log file if it encounters a truncated file, but doesn't fail the translation. The customer wanted failures in order to separate the truncated files from the correct ones.
The Workbench readers often report file or table metadata to the log, but do not add this information to the features read from the file. The DGNMetadata example extracts the Global Origin, Master and Sub unit names and ratios from all the Microstation DGN files in a folder and outputs this information to an Excel file.
Output:
仿射器变压器从输入控制向量计算最佳拟合仿射变换,然后使用它来转换观察到的输出功能。记录计算的参数,但未存储在转换的功能上。GetafeAfeParameters示例将这些参数提取到CSV文件中以进行替代使用。
© 2019 Safe Software Inc |法律