当前位置:文档之家› Patran二次开发工具PCL系列教程之8

Patran二次开发工具PCL系列教程之8



The default NT toolbars contain 32 icons
PAT304 Course Notes – Release 9.5 Copyright 2001 MSC.Software Corporation
8-3
PATRAN Default Toolbar Icons
PAT304 Course Notes – Release 9.5 Copyright 2001 MSC.Software Corporation

PAT304 Course Notes – Release 9.5 Copyright 2001 MSC.Software Corporation
8-8
PATRAN Toolbar Functions

*CLASS and *FUNCTION specify the function that is to be used by the Icon in the Toolbar. CLASS and FUNCTION definitions can be specified by creating relatively simple PCL functions. PCL functions that reside within a user defined class are made available by referencing the library in the user’s p3epilog.pcl file.
Lecture 8 Customizing: Toolbar, p3printers.def, Keymapping, Creating an Analysis Preference
PAT304 Course Notes – Release 9.5 Copyright 2001 MSC.Software Corporation

$
= 100 %
Image Size = Fit on Page, As Is Scale Factor = No Show; 1.0 Center = No Show; Yes Draw Borders $ Note use of “No Show” and a default
= Yes, No
8-10
p3printers.def (cont.)

The driver is also displayed in the p3printers.def file An example is shown below:
..........Driver Specific Options.................. Format Black to White, White to Black, Color Background White, Black, Actual Lines & Text = White, Black, Actual; Black Line Weight = 0.5 pts Text Scale $ Note use of default = $ another option is “Grayscale” =
The printers available on NT need to be set up through starndard Windows configuration. An example of the format is shown below: $This is the Default Postscript Printer Printer
End Toolbar
PAT304 Course Notes – Release 9.5 Copyright 2001 MSC.Software Corporation
8-6
PATRAN Toolbar Control File (cont.)

The icons can be found in Patran_install_dir/icons directory. • • *CLASS indicates where to find the function for the icon. *FUNCTION indicates which function will be executed when the icon is selected. *HELP indicates the help bubble that will be displayed when the mouse moves over the icon.


There is also an option for whether or not to load the icon into the toolbar when PATRAN is executed. – In order for the icon to load into MSC.Patran, – *LOAD ITEM must be added after the *HELP call.
8-7
PATRAN Toolbar Icons

*ICON specifies the icon that is to be used in the Toolbar form.
The icons are restricted to a 40x40 bitmap format (typically 28x28 for UNIX or 16x16 for NT). Icons can be created using various UNIX bitmap utilities or Paint for NT. A toolbar icon template (UNIX) is supplied with MSC.Patran and can be used to create user-defined icons. • tbblank.28.icon
8-4
PATRAN Default Toolbar Icons (cont.)
PAT304 Course Notes – Release 9.5 Copyright 2001 MSC.Software Corporation
8-5
PATRAN Toolbar Control File

The Toolbar on the main form is configured by the p3toolbar.def file. p3toolbar.def is located in the MSC.Patran installation directory. The file is read in sequential order when the p3toolbar is displayed. • i.e., top to bottom in the file refers to the icons left to right on the toolbar




The user defined icons must be referenced in the p3toolbar.def file and must be in MSC.Patran’s path p3toolbar.def must be in either the Patran_install_dir or the users home directory

= Postscript Default
Print Orientation = Portrait, Landscape; Landscape $ Note use of default
PAT304 Course Notes – Release 9.5 Copyright 2001 MSC.Software Corporation



p3toolbar.def file example: Start Toolbar = Transform *ICON= tbrotatexy.bmp *CLASS= uil_toolbar *FUNCTION= rotate_xy *HELP= Mouse Rotate XY *LOAD ITEM
Quality = No Show; Normal Color Model = No Show; RGB GCR = No Show; 75 %
PAT304 Course Notes – Release 9.5 Copyright 2001 MSC.Software Corporation
8-11
Device Driver Destination Paper Size Width Height Left Margin Right Margin Top Margin Bottom Margin Default Units Number of Copies = Unknown = Postscript = Unknown = Letter, Custom = 0.0 = 0.0 = 0.5 in = 0.5 in = 0.5 in = 0.5 in = Inches, Points, cm = 1 $ Other units are Picas and mm $ See the documentation for additional sizes $ Default width for Custom paper size $ Default height for Custom paper size

The Start/End Toolbar Lines (NT only) define the boundaries of the dockable toolbars
PAT304 Course Notes – Release 9.5 Copyright 2001 MSC.Software Corporf (UNIX only)
相关主题