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 -O database_file affix

## DESCRIPTION

Concatenates an existing BRL-CAD database to the database currently being edited. Note that each BRL-CAD object must have a unique name, so care must be taken when using "dbconcat" to import a database that has objects with names the same as objects in the current database.

If confliting names are encountered, computer-generated prefixes will be added to the object names coming from the incoming database_file.

Another usage scenario is where the user wishes to overwrite the current objects with those being imported. The -O option supports this, but note that using this option is destructive - old geometry is NOT preserved when being overwritten.

If an affix string is supplied, then all objects from the incoming database_file will have the affix added to their names as a prefix (by default or if the -p option is specified), or as a suffix (if the -s option is specified). In either mode the affix string is added to ALL incoming object names, not just those cases where there is a conflict. Comb trees on incoming geometry are also updated to reference the names using the affix string.

Other options are used to indicate whether or not to preserve incoming metadata such as title, units and region color table.

## OPTIONS

-O

  Overwrite objects in the current .g file in cases where incoming object names conflict. (WARNING: this option is destructive - old data is replaced by new.)

-c

  Indicates that the region color table of the currently edited database should be replaced with that of database_file.

-p

  Use the supplied affix string as a prefix when reading in object names. (Default.)

-s

  Use the supplied affix string as a suffix when reading in object names.

-t

  Indicates that the title of the currently edited database should be replaced with that of database_file.

-u

  Indicates that the units of the incoming database_file should become the units of the currently edited database.

## 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.

Copy a database, overwriting objects in the current databse

mged> `dbconcat -O model_two.g`

Copies all the objects in model_two.g to the current database. No object names are changed while conflicts in the current database are overwritten with objects from model_two.g

## AUTHOR

BRL-CAD Team

## BUG REPORTS

Reports of bugs or problems should be submitted via electronic mail to devs@brlcad.org