You are here: Surpac Concepts > Macros > SCL > Graphical Selection > SclSelectPoint
GEOVIA Surpac

SclSelectPoint

Overview

Select a point displayed in a 3D Graphics window and return details of the selected point into variables.

Synopsis

SclSelectPoint PointHandle $PromptText Layer StringId SegmentNum PointNum X Y Z PointDesc

Description

You use this command to select points that are displayed in a 3D Graphics window. The details of the selected point are returned in a number of variables that are passed by reference.

The point handle that is returned may be used by other Scl commands to modify the selected point attributes.

Note: This command works when Surpac is in function-centric mode. Select the Orbit view tool to enter function-centric mode.

Arguments

  • PointHandle
  • Passed by reference. The unique identifier of the selected point is returned in this variable. The point handle can be used by other Scl commands to manipulate the point attributes.

  • PromptText
  • Passed by value. The value of this argument is displayed in the graphics prompting region to instruct the user to perform the point selection action.

  • Layer
  • Passed by reference. The name of the 3D graphics layer that contains the point.

  • StringId
  • Passed by reference. The string number of the selected point.

  • SegmentNum
  • Passed by reference. The segment number of the selected point. Note that segment numbers start at 0 for the first segment in a string. They are in fact offsets in an array and this is why they start at 0.

  • Pointnum
  • Passed by reference. The point number of the selected point in the segment that contains the point. Note that point numbers start at 0 for the first point in a segment. They are in fact offsets in an array and this is why they start at 0.

  • X, Y, Z
  • Passed by reference. The X, Y and Z coordinates of the selected point.

  • PointDesc
  • Passed by reference. The contents of the point description of the selected point.

Returns

The SclSelectPoint command returns $SCL_OK if successful and $SCL_ERROR if escape is pressed.

Examples

# Select a point and print its values
set status [SclSelectPoint point "Select the point of interest" layer stringid \
segmentnum pointnum xp yp zp pointdesc]
if {$status == $SCL_OK} {
  puts "Point selected OK"
  puts "Layer=$layer, string=$stringid, segment=$segmentnum, pointnum=$pointnum, \
X=$xp, Y=$yp, z=$zp"
} else {
  puts "Error selecting a point - probably cancelled by the user"
}

See Also

SclSelectTriangle