NXOpen.UF.Ui.CreateFilebox¶
-
Ui.
CreateFilebox
()¶ Refer to UF_UI_create_filebox for documentation.
Signature:
CreateFilebox(promptString, titleString, filterString, defaultName)
Parameters: - promptString (str) – Text for standard prompt.
- titleString (str) – The dialog title.
- filterString (list of str) – The initial value of filter_string is used to initialize the Filter list and text field. If it contains only the pattern and not the path, then “/current_dir/pattern” is used for the filter. If it contains only the path and not the pattern, then “path*” is used for the filter. If the path doesn’t exist,”current_dir*” is used for the filter. On Unix when OK is selected from the FSB dialog, the filter_string is the complete path+pattern of the filter. On NT, the FSB dialog doesn’t have a filter edit box. Therefore, when OK is selected, the returned filter_string is always set to the folder + ‘*’ + extension of the selected file. The user must allocate a buffer big enough to hold the maximum possible file filter_string, which is MAX_FSPEC_BUFSIZE bytes. This function does not support multiple patterns.
- defaultName (str) – The default name is used to initialize the Selection text field. If it’s an empty string or NULL string, the Selection text field is set to the current directory.
Returns: A Tuple
Return type: A tuple consisting of (filterString,filename,response)
filterString(list of str): Modified value of filterString
filename(list of str): When OK is selected from the FSB dialog, filename is whatever was typed into the Selection field. Usually, it is a complete path+name if the string is automatically set by clicking on one of the files in the filter list. Note: An error message displays if no filename is entered; even if there is a directory path in the selection field. It is caller’s responsibility to allocate enough memory for the filename string.
response(int): UF_UI_OK: OK was selected UF_UI_CANCEL: CANCEL was selected
License requirements: None