Command Line Interface

Home » Knowledge Base » LS-Prepost » Other » Command Line Interface

command line interface

Command line input(left side)

Commands can be directly entered here.

In the Linux version of LS-PrePost, help comments are displayed here when the mouse cursor is placed over controls and other areas of the user interface.

In the Windows version, help comments are displayed below the Command Line Interface in the Status Bar

Last Command Field (right side)

The last command issued is displayed here.

When the user right-clicks in this area it expands upwards to display a list of previously issued commands. Right-clicking a second time shrinks the menu down to its original size.

Also, if a command is issued with missing criteria, an error message may be displayed here.

Almost all graphical user interface (GUI) interaction generates commands, and these commands are written to a file called lspost.cfile. Upon exiting LS-PrePost, this file can be renamed to replay the previous session using one of the following methods:

  • 1. LS-PrePost c=commandfile
  • This method launches the LS-PrePost GUI and executes the commands from the command file.
  • 2. LS-PrePost c=commandfile -nographics
  • This method does not launch the LS-PrePost GUI but still executes the commands in batch mode.
  • 3. File -> Open -> Command File
  • This method will open a command file selection dialog. Upon opening a command file, LS-PrePost will display the CFile Dialog.

Command Files can be a powerful tool and have many potential uses such as performing repetitive tasks and presenting a pre-recorded set of actions to an audience. The following commands can be inserted into a command file to provide additional control when composing a presentation:

  • interactive – switch the control from command file to interactive
  • resume/r/esc – any of these 3 will switch control back to command file
  • skip – skip commands that follow until an “endskip” is met
  • endskip – resume command execution
  • cfile pausetime 0.1 – set pausetime to 0.1 seconds

Below is a list of commands that can be entered on the Command Line in LS-PrePost. The list is only a subset of some of the more basic commands. For additional commands, please refer to the contents of lspost.cfile saved at the end of each LS-PrePost session. To see commands generated while interacting with the graphical user interface, watch the message window output.
Note: By default, orientation commands (such as those generated when the model is rotated) are written to the command file (lspost.cfile). These can be filtered out by setting “Record Orient off” in the Toggle Menu.

ac                       - center displayed parts fit to graphics area
anim backward            - animate backwards
anim cycle               - cycle animation forward and backward
anim first n             - set starting state for animation to state n
anim forward             - animate forward
anim incr n              - set animation increment by n states
anim last n              - set ending state for animation to state n
anim start               - start animation
anim stop                - stop animation
back                     - display back view
background R G B         - change background color (R,G,B values range from 0.0-1.0)
background 1 1 1         - change background color to white
background 0 0 0         - change background color to black
beamprism 0              - draw beams as lines, 1 to draw beams as prisms
bottom                   - display bottom view
c                        - comment line marker (like using $ in a keyword input file)
edge                     - display model in edge mode
edgelwidth i             - change edge line width (i value ranges from 1-5)
endfull                  - restore GUI and graphics (see "full" command)
exit                     - exit LS-PrePost
feat                     - display model in feature mode
featang d                - change feature angle to "d" degrees
front                    - display front view
full                     - change graphics area to full screen (Esc to restore)
grid                     - display model in grid mode
hide                     - display model in hide mode
home                     - reset display to default (top) view
import keyword model.k   - import file "model.k" and add it to the current model
labelcolor R G B         - change label color (see "background" command)
left                     - display left view
m i,j,k...               - display part i,j,k where i,j,k are part IDs
m i:j                    - display part IDs from PIDi to PIDj
mesh                     - turn mesh on
meshcolor R G B          - change mesh color (see "background" command)
meshlwidth i             - change mesh line width (i value ranges from 1-5)
new                      - close all open models
open command cfile       - load command file named cfile
open d3plot d3plot       - load d3plot file named d3plot
open d3thdt d3thdt       - load d3thdt file named d3thdt
open keyword model.k     - load file model.k
outline R G B            - change outline color (see "background" command)
outlining 1              - draw outlines on free edges
outlining 2              - draw outlines on free edges and feature lines
pall                     - display all parts
panel panel_name         - go to "panel_name" (ex: panel measur)
parallel                 - change display to parallel projection mode
perspective              - change display to perspective projection mode
pixtol i                 - change pick search tolerance to "i" pixels (default=100)
raoff                    - remove all reflections
raxy                     - reflect model about xy-plane
raxz                     - reflect model about xz plane
razy                     - reflect model about yz-plane
redraw                   - redraw model with current settings
restore                  - restore display to original position and remove all settings
right                    - display right view
rotang d                 - set rotation angle increment to "d" degrees
rstpart                  - restore last part that was turned off
rx                       - rotate model about global x axis (see "rotang" command)
ry                       - rotate model about global y axis
rz                       - rotate model about global z axis
shad                     - display modle in shaded mode
shademode 0              - change display to flat shading, 1 uses smooth shading
showlegend 0             - turn legend off, 1 turns it on
showtriad 0              - turn triad off, 1 turns it on
shrink                   - toggle shrink mode on/off
state +n                 - advance display by n states
state -n                 - rewind display by n states
system "command"         - issue a unix system command (ex: system "xterm&")
t                        - exit LS-PrePost
texon 0                  - turn textured fringing off, 1 turns it on
textcolor R G B          - change text color (see "background" command)
timestamp 0              - turn timestamp off, 1 turns it on
title "xxxxxx"           - change title to xxxxxx
title 0                  - turn title off, 1 turns it on
top                      - display top view
userfringefontsize i     - set graphics area font size
                          (i value ranges from 0-6, 0 restores default)
view                     - display model in view mode (flat shaded mode)
wire                     - display model in wire mode
zin xmn ymn xmx ymx      - zoom in where x and y values range from 0.0 to 1.0
                          (0.0,0.0 is top left, 1.0,1.0 is bottom right)
zout                     - zoom out (undo the last zin)
+m i                     - add part i to display
+m i:j                   - add part from PIDi to PIDj to display
-m i                     - remove part i from display
-m i:j                   - remove parts from PIDi to PIDj from display

LS-PrePost accepts the following command line arguments:

-usage                   - prints this help information
-nographics              - processes data without graphics window
d3plot                   - loads d3plot file
d3plot k=keyword_file    - loads both d3plot and keyword input files
d3thdt                   - loads d3thdt file
cdb=cdb/help             - writes template create_postdb.inp file and exits
cdb=create_postdb.inp    - writes database from d3plot files
c=command_file           - runs command file session
d=database_file          - loads database file
f=interface_force_file   - loads interface force file
h=time_history_file      - loads time history file
i=iges_file              - loads IGES file
k=keyword_file           - loads LS-DYNA keyword file
l=plot_labels            - loads annotation labels file
m=macro_file             - loads command file to be used in macro
n=nastran_bulk_data      - converts nastran data to keyword
q=d3crack_file           - loads d3crack file
s=d3plot                 - loads d3plot, writes summary lspost.msg
v=vda_file               - loads VDA file
w=xsizeXysize            - sets graphics window size