You are here: Surpac Concepts > Macros > SCL > SCL Graphics Drawing > SclGraphicsInsertText
GEOVIA Surpac

SclGraphicsInsertText

Overview

Insert some text into the currently open node of the graphics database at a specific XYZ location.

Synopsis

SclGraphicsInsertText $x $y $z $text

Description

This command inserts the text string at the specified XYZ location. The marker font, path, alignment and colour are determined by other SclGraphics commands.

Arguments

  • x, y, z
  • Pass by value. The XYZ coordinates of the reference point for the text string. If these values place the text outside the screen extents the text will not be visible.

  • text
  • Pass by value. The text string that is to be displayed.

Returns

The key to the text so that it can be selectively deleted using SclGraphicsDeleteByKey.

Examples

#
# 
SclGraphicsOpen mygraphicsnode
  set key [SclGraphicsInsertText 2470 6750 150 "some text in a fancy font"]
 
  # set the font
  SclGraphicsSetTextFont "name=roman,size=0.03 sru"
  # and the alignment
  SclGraphicsSetTextAlignment "<"
  # and the path x,y,z vector components
  SclGraphicsSetTextPath 1 1 1
  # and the colour
  SclGraphicsSetColour "text=pink"
SclGraphicsClose
SclGraphicsUpdateDisplay

See Also

SclGraphicsSetTextAlignment
SclGraphicsSetTextFont

SclGraphicsSetTextPath

SclGraphicsSetColour