McNeel Wiki
Saving File Summary Information
edit · print · help · all topics
Main Pages

AccuRender

Bongo

Brazil r/s

Developer

Flamingo

Penguin

Rhino Blogs

Rhino

Rhino Labs

Search

Languages

Česky

Deutsch

English

Español

Français

Italiano

Polish

日本語

한국어

中文(繁體)

中文(简体)

 
.
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
  )
rename · changes · history · subscriptions · lost and found · references · file upload