'\" t
.\"     Title: DBCONCAT
.\"    Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL-NS Stylesheets v1.76.1 <http://docbook.sf.net/>
.\"      Date: 04/13/2022
.\"    Manual: BRL-CAD User Commands
.\"    Source: BRL-CAD
.\"  Language: English
.\"
.TH "DBCONCAT" "nged" "04/13/2022" "BRL\-CAD" "BRL\-CAD User Commands"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
dbconcat \- Concatenates an existing BRL\-CAD database to the database currently being edited\&.
.SH "SYNOPSIS"
.HP \w'\fBdbconcat\fR\ 'u
\fBdbconcat\fR [\fI\-t\fR] [\fI\-u\fR] [\fI\-c\fR] [\fI\-s|\-p\fR] {\fIdatabase_file\fR} [\fIaffix\fR]
.SH "DESCRIPTION"
.PP
Concatenates an existing
\fIBRL\-CAD\fR
database to the database currently being edited\&. If an
\fIaffix\fR
is supplied, then all objects from the
\fIdatabase_file\fR
will have the
\fIaffix\fR
added to their names as a suffix (if the
\fI\-s\fR
option is specified), or as a prefix (if the
\fI\-p\fR
option is specified)\&. The
\fI\-p\fR
is the default\&. Note that each
\fIBRL\-CAD\fR
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
\fBdup\fR
command may be used to check for duplicate names\&. If the
\fBdup\fR
command finds duplicate names, use the
\fIprefix\fR
option to both the
\fBdup\fR
and
\fBdbconcat\fR
commands to find a
\fIprefix\fR
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
\fIdatabase_file\fR
(but member names appearing in combinations will not be modified, so this is a dangerous practice and should be avoided)\&. The
\fI\-t\fR
option indicates that the title of the
\fIdatabase_file\fR
should become the title of the currently edited database\&. The
\fI\-u\fR
option indicates that the units of the
\fIdatabase_file\fR
should become the units of the currently edited database\&. Similarly, the
\fI\-c\fR
option indicates that the region color table of the currently edited database should be replaced with that of the
\fIdatabase_file\fR\&.
.SH "EXAMPLES"
.PP
This example shows the use of the
\fBdbconcat\fR
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\&.
.PP
\fBExample\ \&1.\ \&Copy objects in a specified database to the current one and add a prefix to all the copied objects.\fR
.PP
mged>
\fBdbconcat model_two\&.g two_\fR
.PP
Copies all the objects in
\fImodel_two\&.g\fR
to the current database, but prefixes the name of every object copied with the string
\fItwo_\fR\&.
.PP
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\&.
.PP
\fBExample\ \&2.\ \&Copy an entire database, including title, units, and color table, to the current database without any affix\fR
.PP
mged>
\fBdbconcat \-t \-u \-c model_two\&.g\fR
.PP
Copies all the objects in
\fImodel_two\&.g\fR
to the current database, including the title, units, and color table\&. No suffix or prefix is added to the object names\&.
.SH "AUTHOR"
.PP
BRL\-CAD Team
.SH "BUG REPORTS"
.PP
Reports of bugs or problems should be submitted via electronic mail to
devs@brlcad\&.org
