Displays a Windows file save dialog box allowing the user to enter a file name. Note, this function does not save the file.
Rhino.SaveFileName ([strTitle [, strFilter [, strFolder [, strFilename [, strExtension]]]]])
strTitle |
Optional. String. A dialog box title. |
strFilter |
Optional. String. A series of string pairs that specify filters you can apply to the file. If you specify file filters, only files that match filter criteria will appear in the Files list. The first string in the string pair describes the filter; the second string indicates the file name extension to use. Multiple extensions may be specified by using a semicolon (the ';' character) as the delimiter. The string ends with two '|' characters. For example, the string "Text Files (*.txt)|*.txt|All Files (*.*)|*.*||" will add two filters to the Files list. |
strFolder |
Optional. String. The initial folder. |
strFilename |
Optional. String. The initial file name that appears in the Filename box. If not specified, no initial file name appears. |
strExtension |
Optional. String. The default file name extension. If the user does not include an extension in the Filename box, the specified extension is automatically appended to the file name. If this parameter is not specified, no extension is appended. |
String |
The file name if successful. |
Null |
If not successful, or on error. |
Dim strFilename
strFilename = Rhino.SaveFileName
If Not IsNull(strFilename) Then
MsgBox strFilename
End If
strFilename = Rhino.SaveFileName ("Save", "Text Files (*.txt)|*.txt||")
If Not IsNull(strFilename) Then
MsgBox strFilename
End If
strFilename = Rhino.SaveFileName ("Save", "Text Files (*.txt)|*.txt|All Files (*.*)|*.*||")
If Not IsNull(strFilename) Then
MsgBox strFilename
End If