fmeobjects.FMEDialog.destPrompt

FMEDialog.destPrompt(defaultDestFormat, defaultDestDataset, userDirectives)

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

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

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

  • 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.

    • EXCLUDE_FORMATS: The short names of the formats that will NOT be allowed, separated by | characters. Exclude takes precedence over LIMIT_FORMATS.

    • SETTINGS_ONLY: If value is “yes”, then the settings box is shown for the passed in default destination format/dataset The default is “no”.

    • 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, list[str]] or None

Returns:

The destination format and dataset along with the user directives, these can be used directly with the FMEUniversalWriter. This tuple is formatted (destFormat, destDataset, [directives]). None is returned if the user pressed Cancel. The 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.