Mechanical APDL files are organized into header records and simple records. The header records are used to store single values and addresses in the file to find other records. The content of Mechanical APDL files is described in Format of Binary Data Files in the Programmer's Reference.
Not all records can be addressed by the *XPL command. You can only
access those records listed by the Action
= LIST
option.
Following is a simple representation of a file’s hierarchy of records.
The input listing in Example 1 demonstrates use of the *XPL command. A detailed explanation of each command is given.
Example 1: Using *XPL to Open and Scan a Results File
*XPL,OPEN,file.rst *XPL,LIST *XPL,STEP,GEO *XPL,LIST *XPL,WHERE *XPL,READ,ETY,MyVec *PRINT,MyVec
The action performed by each command in this example is explained next.
You must open a file (Action
= OPEN) in order to scan
it. For example, you can open an .RST file and list the records
(Action
= LIST).
*XPL,OPEN,file.rst
=============================================== ===== Ansys File Xplorer ====== =============================================== Opening the file.rst Ansys File BEGIN:
*XPL,LIST
===== Ansys File Xplorer : List Blocks in File file.rst ::RST::HEADER Size = 0.324 KB Total Size = 319.598 KB ::RST::DOF Size = 0.035 KB ::RST::NOD Size = 0.078 KB ::RST::ELM Size = 0.020 KB ::RST::DSI::HEADER Size = 78.137 KB Total Size = 120.234 KB ::RST::TIM Size = 78.137 KB ::RST::LSP Size = 117.199 KB ::RST::GEO::HEADER Size = 0.324 KB Total Size = 3.570 KB
A record name ending in "::HEADER" indicates a header. The record sizes are listed for each record. The "Total Size" value is the sum of the sizes of all the records addressed (recursively) by the corresponding header.
In this example the STEP option is used to go down one level under the GEO header:
*XPL,STEP,GEO
===== Ansys File Xplorer : Step into Block GEO BEGIN:
*XPL,LIST
===== Ansys File Xplorer : List Blocks in File apdl-196s.rst ::GEO::HEADER Size = 0.324 KB Total Size = 3.570 KB ::GEO::ETY Size = 0.809 KB ::GEO::LOC Size = 1.129 KB ::GEO::EID Size = 0.285 KB ::GEO::CENT Size = 0.926 KB ::GEO::NOD Size = 0.078 KB ::GEO::ELM Size = 0.020 KB
The WHERE option displays the current location in the tree of records:
*XPL,WHERE
===== Ansys File Xplorer : Display Current Location Current Location : RST::GEO File Location : 280916
The READ option reads a record and fills an APDL Math vector:
*XPL,READ,ETY,MyVec
===== Ansys File Xplorer : Read Block ETY into the Vector MYVEC
The APDL Math command *PRINT prints matrix values:
*PRINT,MyVec
MYVEC : Size : 7 10 213 416 619 822 1025 1228
Example 2 demonstrates use of the MARK, COPY, and SAVE actions of the *XPL command.
Example 2: Using Action
= MARK, COPY, and SAVE
This command marks an entire solution set in an .RST file:
*XPL,MARK,RST::DSI::SET1
This command marks all the element results of all solution sets in an .RST file:
*XPL,MARK,RST::DSI::*::ESL
Following a *XPL,MARK command, use the *XPL,SAVE command to update the existing file:
*XPL,SAVE
In this case, the marked records are deleted.
Or you can use the *XPL,COPY command to save a new file:
*XPL,COPY,NewFileName
The marked records are not included in the new file.