GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
ATTR(nged) BRL-CAD MGED Commands ATTR(nged)

attr - Used to create, change, retrieve, or view attributes of database objects.

attr [get] [set] [rm] [append] [list] [show] [sort] [copy] {object_name_pattern} [arguments]

Used to create, change, retrieve, or view attributes of database objects. Note that the attribute names may not contain embedded white space, and if attribute values contain embedded white space, they must be surrounded by {} or double quotes.

A newly formed region always has four attributes automatically assigned to it:

•los

•material_id

•region

•region_id

The 'region' attribute is the 'region flag' mentioned in the edcomb command.

get
Retrieve and display the specified attributes from the object or objects matched by the pattern. The arguments for the "get" sub-command are attribute names. If no arguments are provided all attributes are displayed.

set

Assigned the value provided for the specified attribute to the object or objects matched by the pattern. The arguments for "set" sub-command are attribute name/value pairs.

rm

Removes the specified attribute from the object or objects matched by the pattern. The arguments for the "rm" sub-command are attribute names.

append

Adds the attribute and value provied for the specified attribute to the object or objects matched by the pattern, or sets the value if the attribute already exists. The arguments for the "append" sub-command are attribute name/value pairs.

list

Lists the attributes assigned to the object or objects matched by the pattern. If multiple objects are matched, the list returned is a consolidated list of all attribute types present on one or more of the matched objects. This option is useful when investigating what attributes are present in objects in a database. The "list" sub-command takes no arguments.

show

Pretty print the specified attributes for the object or objects matching the pattern. If no attributes are listed, all attributes are printed for each object. The arguments for the "rm" sub-command are attribute names.

sort

Pretty prints all attributes on each object matched by the pattern. Attributes are sorted into alphabetical order before printing. The arguments for the "sort" sub-command set the sort type for the attributes: 'case' (default), 'nocase', 'value', and 'value-nocase'.

copy

Takes the value of the first attribute from the specified object and set the second attribute on the object to that value. The sequence of "attr copy" and "attr rm" can be used to rename attributes on objects.

The examples demonstrate the use of the attr command and subcommands to assign and list attributes of database objects.

Example 1. Assigns an attribute to an object.

mged> attr set region_1 material_id 10

Assigns an attribute name "material_id" to region_1. Its value is 10.

Example 2. Assigns an attribute (with embedded white space in its value) to an object.

mged> attr set region_1 comment {This is a comment for region_1}

Assigns an attribute named "comment" to region_1. Its value is "This is a comment for region_1."

Example 3. List all the attributes for an object

mged> attr show region_1 comment

Lists all the attributes for region_1.

Example 4. List all the attribute types present on one or more objects in a database

mged> attr list *

Lists all the attributes found in the database. It may be necessary to place a '\' character before the asterisk to quote it on the MGED tcl prompt so that it reaches the attr command unexpanded.

attributes(5).

BRL-CAD Team

This software is Copyright (c) 2008-2019 United States Government as represented by the U.S. Army Research Laboratory.

Reports of bugs or problems should be submitted via electronic mail to devs@brlcad.org
06/07/2022 BRL-CAD

Search for    or go to Top of page |  Section n |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.