Next Previous Contents

10. Commands and Arguments

10.1 Commands

There is a command line bar at the bottom of the screen where commands can be entered by typing them in lieu of using the pull down menus and the mouse. The command bar can be raised and lowered by using the function key F3 or from the Tools menu.

There are two keys with special functions. Hitting Return will repeat the last command entered. Hitting the Escape key will clear the text in the command bar.

The commands you type in the command bar are case insensitive. Commands currently available are:

HELP    Displays a list of available commands
VERSION Displays the program version number
MANUAL  Opens the user manual
AUDIT   Perform an audit on the drawing data base
QUIT    Quits the drawing
OPEN    Opens a file dialog
PAN     Starts the pan command.  After pan the following options are presented:
        Left
        Up
        Right
        Down
REGEN   Regenerates and redraws the drawing on the screen
ZOOM    Starts the zoom command.  After zoom the following options are presented:
        In
        Out
        Window
        Extents
        Previous
        Viewmax
        Center
REPORT  Opens the report dialog
PLOT    Will open the print dialog box for printing
PRINT   Will also open the print dialog box (another name for PLOT)
QSAVE Will perform a quick save
SAVE Will open the file Save As dialog
CLOSE Will close the drawing and reset the screen elements to their opening configuration
BCONVERT Will open the file save dialog in multi-selection mode to convert batches of files.
BPLOT Will open a file dialog in multi-selection mode to plot batches of files

10.2 Command History

All commands typed into the command bar are retained in a history stack. To view the stack use the up arrow and down arrows on your keypad. The up arrow will move up the stack, that is starting with the last command and then displaying each previous command. A down arrow will move down the stack starting with the first command typed and then displaying each subsequent command. Then either the beginning or the end of the stack is reached the program will loop around to the other end of the stack.

Commands typed and picked from the pull down menus are kept in the history. File names typed into dialogs are not kept in the history.

10.3 Command Alias

It is possible to provide an alias for commands in LX-Viewer. The alias file is modeled on an AutoCad .pgp file. Importing of aliases is not yet functional, however it should be possible to place an AutoCad pgp file into your HOME/lx-viewer directory so that it can be read. Rename the AutoCAD file to lxv.pgp and it should be read at startup.

10.4 Command Line Arguments

Viewer can be called with multiple command line arguments. For basic commands the format is:

viewer [-cmd]

Where -cmd is one of the following:

-help           displays a list of available commands

-version        displays the current program version

-manual         displays the help manual

There are also commands available which can operate on a drawing specified in the command line. The format for these is:

viewer [filename] [-cmd] [-options]

Where filename is the full path and name of the drawing you want to open and -cmd is one of the following:

-audit  runs the audit function on the drawing specifed in the first argument

-report runs the report function on the drawing specified in the first argument.

10.5 Batch Processing with Command Line Arguments

Batch Reporting

To do batch reporting use the tag "dir=" in front of the filename, and make sure that filename is a directory name. You must also provide the -report argument.

An example would be:

viewer dir=path/to/your/directory -report

This command would open all files ending in .dwg or .DWG and located in "/path/to/your/directory". If a Batch Control File exists then it will be read and the report will be seeded with the information described in that file. The batch control file allows you to customize the initial generation of the report to show only the information that interests you. The report font, delimiter type and style(plain or html) settings also set and saved using the BCF. Using the controls described in the previous section the report could be further customized.

Batch Converting

To do batch converting use the tag "dir=" in front of the filename, and make sure that filename is a directory name. You must also provide the -bconvert argument.

An example would be:

viewer dir=path/to/your/directory -bconvert

This command would open all files ending in .dwg, .DWG, .dxf, .DXF and located in "/path/to/your/directory". If a Batch Control File exists then it will be read and the conversions will take place based upon the values in this file. If the BCF does not exist than no files will be processd.

Batch Plotting

To batch plot use the tag "dir=" in front of the filename, and make sure that filename is a directory name. You must also provide the -bplot argument.

An example would be:

viewer dir=path/to/your/directory -bplot

This command would open all files ending in .dwg, .DWG, .dxf, .DXF and located in "/path/to/your/directory". If a Batch Control File exists then it will be read and the plotting will take place using the settings in this file. If the BCF does not exist than no files will be processd.


Next Previous Contents