Click or drag to resize

GH_RhinoScriptInterfaceSaveDocumentAs Method

Save the currently active Grasshopper document in a specific location. If there is no active document, nothing will happen.

Namespace:  Grasshopper.Plugin
Assembly:  Grasshopper (in Grasshopper.dll)
Syntax
public bool SaveDocumentAs(
	string filename
)

Parameters

filename
Type: SystemString
Path of file to save to (must be a *.gh or *ghx extension).

Return Value

Type: Boolean
True on success, false on failure.
Examples
VBScript
Call GrasshopperExampleScript()
Sub GrasshopperExampleScript()
  Dim GH 
  Set GH = Rhino.GetPlugInObject("Grasshopper")
  Call GH.SaveDocumentAs("C:\GrasshopperBackup\[" & Hour(Now()) & "][" & Minute(Now()) & "][" & Second(Now()) & "].ghx")
  Set GH = Nothing
End Sub
See Also