Rs Super Saver
Last changed: dale@mcneel.com-204.177.179.143

.
DeveloperRhinoScript
Version4.0
SummaryDemonstrates how to display the File Properties dialog when saving Rhino files.

Question

When you right-click on a file, using Windows Explorer, and pick "Properties...", to bring up the File Properties dialog, you can add summary information to a file by clicking on the Summary tab and entering the appropriate information. For example:

Is there a way to bring up this dialog when saving Rhino files?

Answer

Rhino does not have this capability. But, it is possible to create a script, using RhinoScript that will do this.

The following sample script will save the Rhino file by scripting Rhino's Save command. If the command was successful in saving the file, script will then display the File Properties dialog and display the summary information for that file.

RhinoScript

  Sub SuperSaver()
    Rhino.Command "_Save"
    If (0 = Rhino.LastCommandResult()) Then
      Dim objShell, objFolder, objFolderItem, objInfo
      Set objShell = CreateObject("Shell.Application")
      Set objFolder = objShell.NameSpace(Rhino.DocumentPath)
      If (Not objFolder Is Nothing) Then
        Set objFolderItem = objFolder.ParseName(Rhino.DocumentName)
        If (Not objFolderItem Is Nothing) Then
          Call objFolderItem.InvokeVerbEx("properties", "summary")
        End If
        Set objFolderItem = Nothing
      End If
      Set objFolder = Nothing
      Set objShell = Nothing
    End If
  End Sub

Rhino Toolbar Button Macro

  _-NoEcho _-RunScript (
  Rhino.Command "_Save"
  If (0 = Rhino.LastCommandResult()) Then
  Set objShell = CreateObject("Shell.Application")
  Set objFolder = objShell.NameSpace(Rhino.DocumentPath)
  If (Not objFolder Is Nothing) Then
  Set objFolderItem = objFolder.ParseName(Rhino.DocumentName)
  If (Not objFolderItem Is Nothing) Then
  Call objFolderItem.InvokeVerbEx("properties", "summary")
  End If
  Set objFolderItem = Nothing
  End If
  Set objFolder = Nothing
  Set objShell = Nothing
  End If
  )