S9-1 ADM , Section 9, August 2005 Copyright 2005 MSC.Software Corporation SECTION 9 COMMAND LANGUAGE
S9-2 ADM , Section 9, August 2005 Copyright 2005 MSC.Software Corporation
S9-3 ADM , Section 9, August 2005 Copyright 2005 MSC.Software Corporation COMMAND LANGUAGE n What’s in this section: u General Structure u Getting Familiar with Commands u Types of Commands
S9-4 ADM , Section 9, August 2005 Copyright 2005 MSC.Software Corporation GENERAL STRUCTURE n Syntax rules for commands u Comment lines are allowed by placing an exclamation point (!) as the first character on the line. u Continuation of a command is denoted by an ampersand (&) at the end of a line. u Abbreviations are allowed, as long as they are unique.
S9-5 ADM , Section 9, August 2005 Copyright 2005 MSC.Software Corporation GENERAL STRUCTURE (CONT.) u Examples: l One “gotcha” when writing command files is that the last line might not get executed. Therefore, make it a habit of making the last line a comment character (!). l marker delete marker_name=.mod1.par4.mar27 l marker delete & l marker_name=.mod1.part4.mar27 l mar del mar=.mod1.par4.mar27 l mar del mar=mar27
S9-6 ADM , Section 9, August 2005 Copyright 2005 MSC.Software Corporation GENERAL STRUCTURE (CONT.) n Syntax rules for values u The rules for entering values are: l Values can contain letters, numbers, and underscore characters. l They must begin with a letter or underscore character. l Values can contain any characters that are enclosed by double quotation marks. l They must have separators (blank space or tab) between keywords and parameters. Placing separators between parameters and their values is optional. l All parameter values of type string should be enclosed in double-quotes (“). l All parameter values of type object will accept the full database name or the relative object name, provided it is unique in the database.
S9-7 ADM , Section 9, August 2005 Copyright 2005 MSC.Software Corporation GETTING FAMILIAR WITH COMMANDS n Command Navigator n Command Window n Log file
S9-8 ADM , Section 9, August 2005 Copyright 2005 MSC.Software Corporation GETTING FAMILIAR WITH COMMANDS n Command Navigator u Enables you to browse through the ADAMS/View command language and execute commands. l The entire ADAMS/View command language is accessible through the Command Navigator. l Use the Command Navigator to navigate on keywords. l Double-clicking the last keyword of a command displays a dialog box of parameter names and parameter values.
S9-9 ADM , Section 9, August 2005 Copyright 2005 MSC.Software Corporation GETTING FAMILIAR WITH COMMANDS l Example:
S9-10 ADM , Section 9, August 2005 Copyright 2005 MSC.Software Corporation GETTING FAMILIAR WITH COMMANDS n Command Window u Text-based way to enter commands. Assumes that you understand the ADAMS/View command language.
S9-11 ADM , Section 9, August 2005 Copyright 2005 MSC.Software Corporation GETTING FAMILIAR WITH COMMANDS u Command History l Use the up and down arrows on your keyboard to scroll through previously executed commands. u Command Expansion l Use a question mark (?) or the Esc key for help with completing commands: n Completes keywords or parameter names. n Prompts for keywords or parameter names. n Prompts for parameter values.
S9-12 ADM , Section 9, August 2005 Copyright 2005 MSC.Software Corporation GETTING FAMILIAR WITH COMMANDS n Log file u A file named aview.log is saved during each ADAMS/View session. In the vertical applications, it is called acar.log, aengine.log, and arail.log. u Contains commands that you entered and messages you received. u The log file for the previous session is aview.log% on UNIX and aview.log on Windows.
S9-13 ADM , Section 9, August 2005 Copyright 2005 MSC.Software Corporation TYPES OF COMMANDS ADAMS/View commands can be categorized as follows: n Model-based u Examples: l marker create marker_name=mar1 location=2,0,0 l marker modify marker=mar1 orientation=0d,90d,0d n Interface-based (GUI) u Example: interface dialog_box display & dialog_box_name =.gui.db_beam_size & parameters=”$f_beam_name”
S9-14 ADM , Section 9, August 2005 Copyright 2005 MSC.Software Corporation TYPES OF COMMANDS (CONT.) n Conditional constructs u ADAMS/View command language contains commands for creating conditional constructs and loops. l BREAK l CONTINUE l IF/ELSEIF/ELSE/END l FOR/END l RETURN l WHILE/END
S9-15 ADM , Section 9, August 2005 Copyright 2005 MSC.Software Corporation TYPES OF COMMANDS (CONT.) n file text write u This command writes information from ADAMS/View into a text file. You control the format of the output and, using database access expressions, you can write any model or simulation data from the ADAMS/View database. Note: For more information on the file text write command, see Knowledge Base Article 7017 available at: This command is also documented in the online help.
S9-16 ADM , Section 9, August 2005 Copyright 2005 MSC.Software Corporation