Tclcaller.

运行工具命令语言(TCL)命令,并将其返回值分配给属性。

The Tcl command can operate on the feature’s geometry and/or attributes, using any of the built-in Tcl functions provided by the Tcl language, as well as any of the FME-provided Tcl facilities.

See the Tcl language reference manual (www.tcl.tk.)和FME TCL变量和功能下面的部分有关功能的详细信息。

常见的TCL示例用法包括:

  • 来自属性的修剪空格:

fme_setattribute tranmedAttribute [string trim [fme_getattribute workinalattribute]]

  • 将所有非数字字符替换为属性中的空格:

fme_setattribute anattribute [regsub -all {[^ 0-9]} [fme_getattribute anattribute] {}]

请注意,在这种情况下,返回值是实际所做的替换的数量。

  • Match a regular expression against an attribute:

regexp {^[A-Za-z]$} [FME_GetAttribute anAttribute]

This regular expression tests if the entire value of the attribute consists only of alphabetic characters.

Note that when matching regular expressions, the return value will be 1 if the expression matched, and 0 otherwise.

  • Log a custom message to the log window:

FME_LogMessage fme_inform {This is my message}

The recommended way to manipulate feature attributes is through the functions that are provided for this purpose:

fme_getAttribute Attrname.

fme_settribute attrname nemval.

fme_copyattribute destattrname srcattrname.

FME_RenameAttribute destAttrName srcAttrName

FME_UnsetAttributes attrName1 [attrName2 attrName3 ...]

参数

输出功能参数

复制控件

Advanced

FME TCL变量和功能

Usage Notes

% 特点

由于FME解析器限制,TCL表达式不能包含百分比(%)字符。如果需要%字符,则应将表达式编码为TCL过程,并将外部文件放入“源”中。请注意,您可以使用A避免%字符问题stringformatter.transformer, which provides a convenient way to access the Tcl 'format' command.

编辑变压器参数

使用一组菜单选项,可以通过引用工作区中的其他元素来分配变压器参数。一些变压器也可提供更高级的功能,例如高级编辑器和算术编辑器。要访问这些选项的菜单,请单击除适用的参数旁边。有关更多信息,请参阅Transformer Parameter Menu Options

变压器类别

亚搏在线工作流程

FME社亚搏国际在线官网区

The FME Community is the place for demos, how-tos, articles, FAQs, and more. Get answers to your questions, learn from other users, and suggest, vote, and comment on new features.

搜索有关此变压器的样本和信息FME社亚搏国际在线官网区