DBCONCAT
nged
BRL-CAD
BRL-CAD User Commands

# dbconcat

Concatenates an existing BRL-CAD database to the database currently being edited.

          dbconcat
          -t
          -u
          -c
          -s|-p
          database_file
          affix

## DESCRIPTION

Concatenates an existing BRL-CAD database to the database currently being edited. If an affix is supplied, then all objects from the database_file will have the affix added to their names as a suffix (if the -s option is specified), or as a prefix (if the -p option is specified). The -p is the default. Note that each BRL-CAD object must have a unique name, so care must be taken not to "dbconcat" a database that has objects with names the same as objects in the current database. The `dup` command may be used to check for duplicate names. If the `dup` command finds duplicate names, use the prefix option to both the `dup` and `dbconcat` commands to find a prefix that produces no duplicates. If duplicate names are encountered during the "dbconcat" process, computer-generated prefixes will be added to the object names coming from the database_file (but member names appearing in combinations will not be modified, so this is a dangerous practice and should be avoided). The -t option indicates that the title of the database_file should become the title of the currently edited database. The -u option indicates that the units of the database_file should become the units of the currently edited database. Similarly, the -c option indicates that the region color table of the currently edited database should be replaced with that of the database_file.

## EXAMPLES

This example shows the use of the `dbconcat` command to copy all objects in a particular database to the current database. It also shows how to add a particular prefix to every object copied.

### Copy objects in a specified database to the current one and add a prefix to all the copied objects.

mged> `dbconcat model_two.g two_`

Copies all the objects in model_two.g to the current database, but prefixes the name of every object copied with the string two_.

Another example shows a usage to import the title, units, color table, and all the objects of a database file into the current database. This is particularly useful if the current database is empty or just created by mged.

### Copy an entire database, including title, units, and color table, to the current database without any affix

mged> `dbconcat -t -u -c model_two.g`

Copies all the objects in model_two.g to the current database, including the title, units, and color table. No suffix or prefix is added to the object names.

## AUTHOR

BRL-CAD Team

## BUG REPORTS

Reports of bugs or problems should be submitted via electronic mail to <devs@brlcad.org>, or via the "cadbug.sh" script.