fmeobjects.FMEDialog.xlatePrompt

FMEDialog.xlatePrompt(defaultSourceFormat, defaultSourceDataset, defaultDestFormat, defaultDestDataset, userDirectives)

This method displays a dialog to prompt the user to choose a source format and dataset.

Parameters:
  • defaultSourceFormat (str) – The default source format that will be selected when the dialog is opened. If none is desired, then this should be a 0 length string.

  • defaultSourceDataset (str) – The default source dataset that will appear when the dialog is opened. If none is desired, then this should be a 0 length string.

  • defaultDestFormat (str) – The default destination format that will be selected when the dialog is opened. If none is desired, then this should be a 0 length string.

  • defaultDestDataset (str) – The default destination dataset that will appear when the dialog is opened. If none is desired, then this should be a 0 length string.

  • userDirectives (dict or list[str]) –

    (Optional) Specify one or more additional directives to be used by the dialog. All elements in this collection must be strings. A list should be used if one key is to be set to multiple values. If a list is passed in, key-value pairs such as those in a dict must be placed side by side. For example, the key should be placed in the first list element, followed by the value for the key. These user directives are honoured:

    • TITLE: The title to be used in the dialog box.

    • LIMIT_FORMATS: The short names of the only formats that will be allowed, separated by | characters.

    • SPATIAL_SETTINGS: If value is “yes”, then any settings box that allows for specifying spatial constraints will have that aspect remain enabled. The default is”yes”. If the value is “no”, then the spatial area specification aspect of the settings boxes is disabled. This directive is useful for disabling spatial settings when a source dialog is done only for the purpose of gathering schema information.

Return type:

tuple[str, str, str, str, list[str], list[str]] or None

Returns:

The source format, source dataset, destination format, and destination dataset along with the source user directives and destination user directives, these can be used directly with the FMEUniversalReader and FMEUniversalWriter respectively. This tuple is formated (sourceFormat, sourceDataset, destFormat, destDataset, [sourceUserDirectives], [destUserDirectives]). None is returned if the user pressed Cancel. The source user directives returned are as follows:

  • RUNTIME_MACROS: The runtime macros are in the next position.

  • META_MACROS: The metafile macros are in the next position.

  • METAFILE: The metafile name is in the next position.

  • COORDSYS: The coordinate system is in the next position.

  • IDLIST: The id list is in the next position.

The destination user directives returned are as follows:`

  • RUNTIME_MACROS: The runtime macros are in the next position.

  • META_MACROS: The metafile macros are in the next position.

  • METAFILE: The metafile name is in the next position.

  • COORDSYS: The coordinate system is in the next position.