You are here: Surpac Concepts > Macros > SCL > GUIDO > GuidoResource
GEOVIA Surpac

GuidoResource

Overview

The GuidoResource command allows access to files under the standard SSI_RESOURCE: directory. Presently only a get operation is available.

Synopsis

GuidoResource get relativePathname

Description

GuidoResource will read the given file and return its contents.

Arguments

get The get option is the only supported sub-function at this time

relativePathname relativePathname is a relative path to a file that exists under the SSI_RESOURCE: directory

Examples

Example 1

The example below demonstrates the use of GuidoResource to read and then display a text file.

# GuidoResource Example 1
# define the form
set formDef {
  # a form proc to test GuidoResource
  proc runGuidoResource {} {
    set resource [GuidoResource get "misc/helpfulhints.ssi"]
    puts $resource
  }
  GuidoForm form {
    -label "Using Menu Components"
    -default_buttons
    -layout BoxLayout Y_AXIS
    GuidoFiller fil1 {
      -height 1
    }
    GuidoButton goButton {
      -caption "Press for some action"
      -width 25
      -action valueChanged {[runGuidoResource]}
    }
    GuidoFiller fil1 {
      -height 1
    }  
  }
}
# Create and run the form
SclCreateGuidoForm formHandle $formDef {}
$formHandle SclRun {}
      

See Also

Guido