opendb
opendb [-c] [-f] [-h] [-o] filename
opendb [--create] [--flip-endian] [--help] [--open] filename
OPENDB(nged)
NAME
opendb - Open a BRL-CAD database and make it current.
On this page
SYNOPSIS
DESCRIPTION
With no filename argument, opendb reports the currently open database path. If no database is open, it reports that state instead.
When a filename is supplied, opendb closes any currently open database and opens the requested database file.
By default, opendb is willing to create a new database if the requested file does not already exist. Use -o or --open to require that the file already exist.
If -f or --flip-endian is supplied and the target file is a v4 database, the file is treated as a binary-incompatible database and opened with flipped endianness. This is useful for legacy v4 databases created on incompatible platforms. When such flipping is applied, the database is made read-only.
OPTIONS
- -c, --create
-
Allow creation of a new database if filename does not already exist. This is the default behavior and overrides -o.
- -f, --flip-endian
-
Treat a v4 database as a binary-incompatible file and flip its endianness on open. Ignored for non-v4 databases.
- -h, --help
-
Print command help.
- -o, --open
-
Require that filename already exist and open only that file.
EXAMPLES
mged> opendb -o model.g
Closes the current database, if any, and opens the existing model.g file.
mged> opendb
Returns the name of the current database file.
mged> opendb -f legacy_v4.g
Opens legacy_v4.g as a binary-incompatible v4 database. If flipping is applied, the database is opened read-only.
SEE ALSO
open(nged), closedb(nged), reopen(nged), dbupgrade(nged)
AUTHOR
BRL-CAD Team
BUG REPORTS
Reports of bugs or problems should be submitted via electronic mail to devs@brlcad.org