Exercise 01 Keymapping PCL Functions
Exercise 01 Keymapping PCL Functions
X
Z
Objectives:
■ Import an express neutral file
Model Description:
In this exercise you will import an express neutral file into
a Patran database. You will then perform a few display
changes with the model, recording these changes in a
session file. A terminal window will be opened, and (using
a text editor) the recorded session file will be converted
into a PCL function. The function will then be keymapped
to a specific function key.
Exercise Procedure:
1. In your xterm window type p3 to start MSC/PATRAN.
Then create a new database called, shield.db.
File/New ...
New Database Name: shield.db
OK
File/Import...
Object: model
Source: Parasolid xmt
Express Neutral Files: shield_v11.xmt_txt
Apply
Look at the Import Summary form. Notice the types of geometry that
were imported with this parasolid file. Click OK at the bottom of the
form.
OK
File/Session/Record ...
Recording File: keymap_sample.pcl
The next steps are going to be done in sequential order so that you
may later change the journal file into a simple PCL function.
Iso1 View
Display/Geometry ...
Geometric Shrink: .30
Point Size: 5
Colors and Labels: ■ Surface
■ Tsurf
Apply
Cancel
Smooth Shaded
File/Session/Record ...
Stop
Cancel
You will need to exit entirely out of PATRAN before you can
edit the file in Windows NT. Delete any line that starts with
a dollar sign then pound symbol ($# - these are just
comments in the PATRAN Command Language). Just
before the line:
ga_view_aa_set( 23., -34., 0. )
add the line:
FUNCTION Set_Display_Att()
After the last line:
uil_toolbar.shaded_smooth ( )
enter this line:
END FUNCTION
This session file that was just edited can now be used to as a PCL
function that can be executed in PATRAN.
File/Close
File/New ...
New Database Name: shield.db
OK
When prompted that a database already exists with the same name,
respond that you wish to overwrite the old database.
Yes
!!input keymap_sample.pcl.01
11. In the main menu of PATRAN go into Preferences/Key
Map... and set up the F6 key to utilize the recently made
PCL function.
Note: The only thing that needs to be typed into the databox is the
name of the function: “Set_Display_Att”, and this needs to
be entered inside the parentheses.
Close
File/Import...
Object: model
Source: Parasolid xmt
Express Neutral Files: shield_v11.xmt_txt
Apply
OK
16
15
17
21
19
12
11
20 10
9
22
8
7
24 251
23
14 6
13 5
18 4 32
Y
Z X
File/New ...
New Database Name: shield.db
OK
When prompted that a database already exists with the same name,
respond that you wish to overwrite the old database.
Yes
File/Import...
Object: model
Source: Parasolid xmt
Express Neutral Files: shield_v11.xmt_txt
Apply
OK