Retrieves the attribute value(s) of the line.
get_line()
get_line(id [,attribute])
-
id - an optional ChipsId structure containing values to
modify the currency state for the command or a string id to
specify a line within the current frame.
-
attribute - a string containing the name of the attribute to
retrieve
The get_line command returns a structure containing all the
attribute values of the
line. To retrieve the value of a specific attribute, provide
the attribute name and the id or ChipsId of the object.
Some values are set to "None" in the returned structure.
These entries generally correspond to attributes which may
only be modified at creation time, such as the object id.
The attributes associated with lines are:
| color |
Color of the line |
| depth |
Integer value indicating line depth |
| extend |
Should the line extend to infinity (segment vs ray) |
| style |
Stipple pattern used to draw the line segment |
| thickness |
Thickness of the line |
To see if a line is hidden or visible, use the
get_line_visible command.
The module of advanced ChIPS functions contains other commands
for retrieving attribute values (refer to "ahelp chips" for
information on loading the module):
get_line_color
get_line_depth
get_line_extend
get_line_stipple
get_line_style
get_line_thickness
chips> add_line(.1,.1,.9,.9,"thickness=9 id=line1")
chips> print(get_line())
chips> print(get_line("line1","style"))
A line is created and becomes current. Calling get_line with no argument returns all the attributes of the object. get_line is called a second time to return just the "style" attribute.
chips> add_line(.1,.1,.9,.9,"thickness=9 id=line1")
chips> add_line(.6,.1,.6,.9,"thickness=9 color=lime")
chips> print(get_line("line1"))
Two lines are created. get_line is called with the id of the first line, returning all attributes.
chips> id=ChipsId()
chips> id.line="line1"
chips> print(get_line(id))
A ChipsId structure is created and the id.line field is set to "line1".
get_line is called with the ChipsId.
chips> lineatt = get_line()
chips> print(lineatt)
Retrieve a structure containing the attribute values of the current
line and store the results in "lineatt". Print the contents of "lineatt".
- py.chips
-
add_hline,
add_line,
add_vline,
current_line,
delete_line,
display_line,
hide_line,
move_line,
set_current,
set_line,
setget,
shuffle_line
|