'\" t
.\"     Title: OPENDB
.\"    Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL-NS Stylesheets v1.76.1 <http://docbook.sf.net/>
.\"      Date: 08/28/2023
.\"    Manual: BRL-CAD User Commands
.\"    Source: BRL-CAD
.\"  Language: English
.\"
.TH "OPENDB" "nged" "08/28/2023" "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"
opendb \- Closes the current database file and opens \fIdatabase\&.g\fR\&.
.SH "SYNOPSIS"
.HP \w'\fBopendb\fR\ 'u
\fBopendb\fR [\-f] [\fIdatabase\&.g\fR]
.SH "DESCRIPTION"
.PP
Closes the current database file and opens
\fIdatabase\&.g\fR\&. If
\fIdatabase\&.g\fR
is not found, the current database is left open\&. If
\fI database\&.g\fR
is not specified on the command line, the name of the current database file is returned\&.
.PP
If the \-f option is specified and the database\&.g is a v4 geometry database, the file will be read with a flipped binary endianness encoding\&. This is useful for binary\-incompatible v4 geometry files that were created on a different platform type\&.
.PP
Binary\-incompatible v4 geometry database files that can be auto\-detected will be automatically converted if all resulting matrices are valid\&.
.SH "EXAMPLES"
.PP
The first example shows the use of the
\fBopendb\fR
command to close the current database file and open the one specified\&. The second example shows the use of the command with no database name, which returns the name of the current database file\&.
.PP
\fBExample\ \&1.\ \&Close the current database and open another one.\fR
.PP

mged>\fBopendb model\&.g\fR
.PP
Closes the current database file and opens
\fImodel\&.g\fR\&.
.PP
\fBExample\ \&2.\ \&Return the name of the current database file.\fR
.PP

mged>\fBopendb\fR
.PP
Returns the name of the current database file\&.
.PP
\fBExample\ \&3.\ \&Open and upgrade a binary-incompatible v4 file.\fR
.PP

mged>\fBopendb \-f model\&.g\fR
mged>\fBdbupgrade\fR
.PP
Closes any currently open database and opens
\fImodel\&.g\fR
as a binary\-incompatible v4 geometry database\&.
.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
