Patran二次开发工具PCL系列教程之8
更新时间:2023-06-02 07:04:01 阅读量: 实用文档 文档下载
- patran二次开发语言推荐度:
- 相关推荐
经典的MSC.Patran/Nastran二次开发工具PCL入门教程,PPT课件
Lecture 8 Customizing: Toolbar, p3printers.def, Keymapping, Creating an Analysis Preference
PAT304 Course Notes – Release 9.5 Copyright 2001 MSC.Software Corporation
8-1
经典的MSC.Patran/Nastran二次开发工具PCL入门教程,PPT课件
PAT304 Course Notes – Release 9.5 Copyright 2001 MSC.Software Corporation
8-2
经典的MSC.Patran/Nastran二次开发工具PCL入门教程,PPT课件
Display - Toolbar
The Toolbar provides quick access to frequently used functions Additional functions may be added to the toolbar 32 Toolbar functions are supplied with MSC.Patran The default UNIX toolbar contains 30 icons
The default NT toolbars contain 32 icons
PAT304 Course Notes – Release 9.5 Copyright 2001 MSC.Software Corporation
8-3
经典的MSC.Patran/Nastran二次开发工具PCL入门教程,PPT课件
PATRAN Default Toolbar Icons
PAT304 Course Notes – Release 9.5 Copyright 2001 MSC.Software Corporation
8-4
经典的MSC.Patran/Nastran二次开发工具PCL入门教程,PPT课件
PATRAN Default Toolbar Icons (cont.)
PAT304 Course Notes – Release 9.5 Copyright 2001 MSC.Software Corporation
8-5
经典的MSC.Patran/Nastran二次开发工具PCL入门教程,PPT课件
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
p3toolbar.def file example: Start Toolbar = Transform *ICON= tbrotatexy.bmp *CLASS= uil_toolbar *FUNCTION= rotate_xy *HELP= Mouse Rotate XY *LOAD ITEM
End Toolbar
PAT304 Course Notes – Release 9.5 Copyright 2001 MSC.Software Corporation
8-6
经典的MSC.Patran/Nastran二次开发工具PCL入门教程,PPT课件
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.
The Start/End Toolbar Lines (NT only) define the boundaries of the dockable toolbars
PAT304 Course Notes – Release 9.5 Copyright 2001 MSC.Software Corporation
8-7
经典的MSC.Patran/Nastran二次开发工具PCL入门教程,PPT课件
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
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
PAT304 Course Notes – Release 9.5 Copyright 2001 MSC.Software Corporation
8-8
经典的MSC.Patran/Nastran二次开发工具PCL入门教程,PPT课件
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.
!! PATH UNIX_path_to_library or sys_path(“ADD”,...) !! LIBRARY class.plb or sys_path(“ADD”,...)
PAT304 Course Notes – Release 9.5 Copyright 2001 MSC.Software Corporation
8-9
经典的MSC.Patran/Nastran二次开发工具PCL入门教程,PPT课件
p3printers.def (UNIX only)
The p3printers.def file is located in the Patran_install_dir.
The file allows you to configure the printers that will appear in the “Available Printers” listbox on the Print form.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 PrinterDevice 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
= Postscript Default
Print Orientation = Portrait, Landscape; Landscape $ Note use of default
PAT304 Course Notes – Release 9.5 Copyright 2001 MSC.Software Corporation
8-10
经典的MSC.Patran/Nastran二次开发工具PCL入门教程,PPT课件
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” =
$
= 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, NoQuality = 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
经典的MSC.Patran/Nastran二次开发工具PCL入门教程,PPT课件
Keymapping (UNIX only)
Hot Keys Touch a key to execute an option, such as: rotate, zoom, labels on/off Functions on the quickpick/toolbar can be executed from the keyboard
Provided by X-lib (UNIX only) Defined in a file called .Patran.EventMaps Default is in Patran_install_dir, and is searched for through the PCL Path Most recent keymap has priority If the key is defined twice the last definition takes precedence.
PAT304 Course Notes – Release 9.5 Copyright 2001 MSC.Software Corporation
8-12
经典的MSC.Patran/Nastran二次开发工具PCL入门教程,PPT课件
Keymapping (cont.)
PAT304 Course Notes – Release 9.5 Copyright 2001 MSC.Software Corporation
8-13
经典的MSC.Patran/Nastran二次开发工具PCL入门教程,PPT课件
Keymapping Syntax
Modifier <Event>: Function Modifiers: None Ctrl Meta Alt Shift Lock
Event: Btn 3 Down Btn 2 Down Btn 1 Down
Btn 3 Up
Btn 2 Up
Btn 1 Up
Key If
you want to specify a certain key <Key> Keyname Keyname = a, F1, KP_1
Note: None<Key>: do_this(), makes any key you hit execute do_this()
PAT304 Course Notes – Release 9.5 Copyright 2001 MSC.Software Corporation
8-14
经典的MSC.Patran/Nastran二次开发工具PCL入门教程,PPT课件
Keymapping Example:
For example,you may have the following mappings:
None<Key>1: LabelsOn() Shift<Key>1: LabelsOff() Alt<Btn1Down>: LabelsOn() Alt<Btn1Up>: LabelsOff() Ctrl Alt<Btn1Up>: ZoomOut() Ctrl Alt<Btn1Down>: ZoomIn() Ctrl <Key>s: SpectrumOnOff() <Key>osfUp:PanUp() <Key>osfDown:PanDown() None<Key>KP_1: RearView() None<Key>KP_2: BottomView() Ctrl <Btn3Down>: PopupGMenu(*selectMenu) Ctrl <Btn2Down>: PopupGMenu(*appsPopMenu) None <Key>c:CallPCL(test_event)
Where test_event is:
Function test_event()ui_exec_function(“my_class”,”display”) End Function /* test_event */PAT304 Course Notes – Release 9.5 Copyright 2001 MSC.Software Corporation
8-15
经典的MSC.Patran/Nastran二次开发工具PCL入门教程,PPT课件
Steps to Incorporate your own preference into MSC.Patran
Load the template database with application specific attributes (PCL) Add user interface for the Analysis form (PCL) Translate the analysis model (PCL, Fortran, C) Read analysis results into patran database (PCL, Fortran, C)
PAT304 Course Notes – Release 9.5 Copyright 2001 MSC.Software Corporation
8-16
经典的MSC.Patran/Nastran二次开发工具PCL入门教程,PPT课件
Steps to Incorporate your own preference into MSC.Patran (cont.)
PAT304 Course Notes – Release 9.5 Copyright 2001 MSC.Software Corporation
8-17
经典的MSC.Patran/Nastran二次开发工具PCL入门教程,PPT课件
PAT304 Course Notes – Release 9.5 Copyright 2001 MSC.Software Corporation
8-18
正在阅读:
《好雨时节》02-07
高一地理第二次月考试卷02-26
国内主题地图研究综述06-19
中华全国工商业联合会科学技术奖05-18
赛联高性能双WAN口宽带路由器08-07
?产房工作总结03-27
- 教学能力大赛决赛获奖-教学实施报告-(完整图文版)
- 互联网+数据中心行业分析报告
- 2017上海杨浦区高三一模数学试题及答案
- 招商部差旅接待管理制度(4-25)
- 学生游玩安全注意事项
- 学生信息管理系统(文档模板供参考)
- 叉车门架有限元分析及系统设计
- 2014帮助残疾人志愿者服务情况记录
- 叶绿体中色素的提取和分离实验
- 中国食物成分表2020年最新权威完整改进版
- 推动国土资源领域生态文明建设
- 给水管道冲洗和消毒记录
- 计算机软件专业自我评价
- 高中数学必修1-5知识点归纳
- 2018-2022年中国第五代移动通信技术(5G)产业深度分析及发展前景研究报告发展趋势(目录)
- 生产车间巡查制度
- 2018版中国光热发电行业深度研究报告目录
- (通用)2019年中考数学总复习 第一章 第四节 数的开方与二次根式课件
- 2017_2018学年高中语文第二单元第4课说数课件粤教版
- 上市新药Lumateperone(卢美哌隆)合成检索总结报告
- 开发工具
- 教程
- 系列
- Patran
- PCL
- 收集市场信息的方法
- 学钢琴即兴伴奏和弦公式简单整理
- 江南大学专升本计算机应用基础阶段3
- 10.老年人养生保健
- 21.7(5)列方程解应用题
- 2019年安全专业知识应知应会题库
- AGA8—92DC计算方法天然气压缩因子计算
- 高三化学8+4专题训练01
- 上海理工大学科技成果——数控装备技术
- 《大学英语(1)期末考试卷A答案
- 府河滩上的金土地(合作社)-李畈蔬菜专业合作社推动农业产业化发展纪实
- 影响短跑起跑的因素
- 优秀童谣传唱活动方案
- 中石化茂名石化乙烯厂实习报告
- 黎诣远《宏观经济学》(第3版)笔记(1.1第1章 市场与政府)
- 2010年精神文明建设自查总结
- 商业银行第7,8章作业
- eres2010_130_Henneberry_MODELLING_THE_RELATI
- 二语习得英文论文
- 学士论文-品牌延伸战略研