Maptitude GISDK Help

SampleLine()

Summary

Creates a sample line object for use in a menu or dialog box.

Syntax

sample_line = SampleLine(real width, linestyle line_style, color clr, array options)

Argument Contents
width The width in points
line_style The style of the sample
clr The color of the sample

Option Type Contents
Size 2 reals The width and height (in points) of a rectangle in which the sample can be displayed
Shape String "Straight" (the default) to create a straight line sample; "Zigzag" to create a zig-zag line sample
Arrowhead Boolean "True" to display the line with an arrowhead on its center; "False" (the default) to display the line without an arrowhead
From Arrow Boolean "True" to display the line with an arrowhead pointing to the left, out of its left endpoint
To Arrow Boolean "True" to display the line with an arrowhead pointing to the right, out of its right endpoint

Returns

A sample line object.

Notes

Example

// Define an array of sample lines of varying width

solid_line = LineStyle({{{0, -1, 0}}})

dim samples[10]

for i = 1 to 10 do

     samples[i] = SampleLine(i - 1, solid_line, ColorRGB(0, 0, 0), )

     end

// In some dialog box, use the array in a scrolling list...

popdown menu 12, 2, 24, 8 list: samples variable: idx

Error Codes

Error Type Meaning
Error One of the options is not valid

See Also

Function Summary
GetSample() Gets a sample object indicating how features in a layer or selection set display on a map
GetThemeSamples() Gets sample objects indicating how features in a theme display on a map.
SampleArea() Creates a sample area object for use in a menu or dialog box
SamplePoint() Creates a sample point object for use in a menu or dialog box
SampleText() Creates a sample text object for use in a menu or dialog box
SaveSampleToImage() Saves a sample object to an image file
SetSampleText() Creates a sample object based on an input sample with the specified text for use in a menu or dialog box

 

 

©2025 Caliper Corporation www.caliper.com