Exercise 03 Quickpick Icon
Exercise 03 Quickpick Icon
Adding an Icon to
QuickPick
Objectives:
■ Write a PCL Class to shrink Finite Elements.
Exercise Description:
In this exercise you will first create a PCL Class which
contains a PCL Built-in function to shrink finite elements.
You will then create a icon to invoke the PCL function. By
modifying the p3quickpick.def file, you will add the icon to
the quickpick menu.
*MAXROWS = 17
*ICON = p302_shrink.icon
*CLASS = p302
*FUNCTION = shrink
*LOAD ITEM
!!library p302.plb
■ Restart PATRAN.
■ Select Quickpick
Files:
All the files used in this exercise are listed below. Each listing includes
the file, where it originated, its format (text/binary) and summary
information as to how it relates to this exercise.
File Supplied/CreatedFormatDescription
p302.pcl Created text This text file contains the PCL Class and
PCL Built-in function to shrink finite
elements. This file is created using a
text editor.
Exercise Procedure:
1. Write a new PCL class called p302 by creating a
file, p302.pcl using an on-line editor, either vi, jot, Write the
vuepad or xedit and add the following lines to it: PCL class
CLASS p302
/*
* Quickpick icon to shrink elements
* Exercise for the PAT302 class
*/
FUNCTION shrink
ga_display_shrfem_set( "general", 0.2 )
END FUNCTION
END CLASS /* p302 */
bitmap p302_shrink.icon
Using the editor, change the first line of the file to:
*MAXROWS = 17
*ICON = p302_shrink.icon
*CLASS = p302
*FUNCTION = shrink
*LOAD ITEM
The Shrink
Icon
Object: Mesh
Method: Surface
y
z x
Now press the new icon on the QuickPick bar and the
finite elements will shrink by 20% as shown belo
y
z x