




已阅读5页,还剩116页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
精品搭建Windchill环境l 开发工具设置在Eclipse中选择: Window - Preferences - java - Compiler - Building 去掉:的选中注意:一定要取消选中,否则在清工作区时将删除windchill codebase下的文件5此时会在Eclipse的工作空间里面生成一个 HelloWindchill的文件,此文件很小只有几KBl 创建Java项目 第一种创建方式:1在Eclipse中选择: File - New - Java Project 创建一个Test 的Java项目2在当前创建的java项目Test:在Eclipse中选择: 当前项目上(Test) - New - Properties - Java Build Path- Add Class Folder - Create New Folder 单击 ok 完成 codebase 文件夹的创建和指定(由于Windchill的codebase文件夹很大,所以这一步骤需要等待片刻)成功之后,将会看到: 第二种创建方式:1 在Eclipse中选择: File - New - Java Project 创建一个TestWindchill 的Java项目 Link additional source - Browse - Finish2 Browse 选择codebase 3添加自定义的library库3指定codebase 的映射:3指定codebase文件夹编译之后的.class 文件 和 工程下面的 java源文件的映射关系在Eclipse中选择: 当前项目上(HelloWindchill) - New - Properties - Java Build Path - Browse -单击 OK 之后,你可能会发现 Java 项目 Referenced Libraries里面有个 codebase 文件夹了4添加Windchill环境所需的jar包(推荐使用1)D:ptcWindchill_9.1Windchill里面需要的被导入的jar文件按有:lib、srclib、installlib、WHCWEB-INFlib、antlib、codebaseWEB-INFlib、codebaselib 7个文件夹下的所有jar文件 1.可用自定义一个类库,然后把Windchill 7个lib下面的jar都添加到该库中,以后就可以在开发中直接引用该类库(注意:最好不要覆盖相同名字的jar包,因为他们的jar的文件大小不同,所以作用也不同,避免在开发中因jar的冲突和版本问题而引起些莫名奇妙的错误)在Eclipse中选择: 当前项目上(HelloWindchill) - New - Properties - Java Build Path - Libraries 选项卡 2.直接引用,7个lib下面的所有jar包第一个Hello Worldl 创建HelloWorld.java在Eclipse中选择: 当前项目上(HelloWindchill) src - New - Package创建一个 TestWindchill.java 的类内容为:package ;public class TestWindchill /* * param args */public static void main(String args) / TODO Auto-generated method stubSystem.out.println( Hello World.);l 启动Windchill 服务1. 启动 Oracle10g 监听服务:OracleOraDb10g_home1TNSListener2. 启动 Oracle10g 主数据库服务:OracleServiceWIND3. 启动 Apache 服务4. 启动 Tomcat 服务成功标志:5. 启动control-panel.bat 服务D:ptcWindchill_9.1WindchillDSserverbat6. 启动 Windchill Shell 服务,输入 windchill start 目标:D:ptcWindchill_9.1Windchillbinwindchill.exe shell起始位置:D:ptcWindchill_9.1Windchillbin7. 观察Windchill 的两个窗口:ServerManager :MethodServer8. Windchill 启动成功的标志:在MethodServer窗口出现如下标志,表明Windchill 服务启动成功l 运行HelloWorld.java1 Eclipse控制台会打印:Hello World2 此时会在Windchill系统的安装目录(D:ptcWindchill_9.1Windchillcodebase)生成如下目录:angus - com 里面会生成TestWindchill.java源文件的编译后的文件:TestWindchill.class此时表明第一个Hello World 程序运行成功3第一个JSP与 Hello Wordl 创建index.jsp在Windchill的安装目录(D:ptcWindchill_9.1Windchillcodebasenetmarketsjsp)下面新建一个文件夹angus,在里面新建一个index.jsp页面页面内容为: My JSP index.jsp starting page ddd l 创建TestWindchill.javaTestWindchill.java里面的内容package ;public class TestWindchill /* * param args */public static void main(String args) / TODO Auto-generated method stubSystem.out.println(第一个Windchill程序);public String helloWindchill()return this is the Hello World Windchill.;编译后的TestWindchill.class文件会自动映射,放到D:ptcWindchill_9.1Windchillcodebaseanguscom 目录下注意:该目录下的TestWindchill.class 的更新时间l 访问:在浏览器地址栏输入:http:/localhost/Windchill/netmarkets/jsp/angus/index.jsp就可以在Windchill目录使用jsp页面调用Windchill目录 java 类的方法。l 注意:如果你在TestWindchill.java里面添加了一个方法,然后在 index.jsp 中调用,注意一定要删除:D:ptcWindchill_9.1Windchillcodebaseanguscom 目录下 的TestWindchill.class文件然后在Windchill Shell 中输入重启Windchill 然后重启 Tomcat ,再在浏览器地址栏输入:http:/localhost/Windchill/netmarkets/jsp/angus/index.jsp访问jsp页面,不然就会报错Windchill菜单定制l 顶级菜单定制1. 在安装的Windchill 系统的Windchill Shell 中运行命令:ant f binswmaint.xml createSafeArea会在Windchill的安装D:ptcWindchill_9.1WindchillwtSafeArea 目录出现3个文件夹:ptcCurrent、ptcOrig、siteMod2. 在文件夹siteMod下创建codebase config actions三个文件夹(内嵌结构)3. 在 WC_Home安装目录的actions文件夹下面添加如下两个xml文件把custom-actionModels.xml、custom-actions.xml 两个xml文件添加到.wtSafeAreasiteModcodebaseconfigactions 目录下文件一定要是UTF-8编码格式的4. 在custom-actionModels.xml文件里面需要配置如下代码:Example: custom-actionsModel.xml (模型文件) Main navigation (tabs)5. 在custom-actions.xml文件里面需要配置如下代码:Example: custom-actions.xml (动作文件) 6. Windchill英文资源文件 里面的代码navigationRB.rbInfo(navigationRB_en_US.rbInfo) 存放的位置:D:ptcWindchill_9.1Windchillsrcextresource (resource目录是自己建的,名字可以取) Example: navigationRB.rbInfo (英文资源文件) ResourceInfo.class=wt.tools.resource.StringResourceInfoResourceInfo.customizable=trueResourceInfo.deprecated=falsenavigation.fiberhomereport.description.value=testreportnavigation.fiberhomereport.activetooltip.value=testreport navigation.fiberhomereport.tooltip.value=testreport 7. Windchill中文资源文件里面的代码navigationRB_zh_CN.rbInfo 存放的位置:D:ptcWindchill_9.1Windchillsrcextresource (resource目录是自己建的,名字可以取) Example: navigationRB_zh_CN.rbInfo (中文资源文件)ResourceInfo.class=wt.tools.resource.StringResourceInfoResourceInfo.customizable=trueResourceInfo.deprecated=falsenavigation.fiberhomereport.tooltip.value=u62a5u8868navigation.fiberhomereport.description.value=u62a5u8868navigation.fiberhomereport.activetooltip.value=u62a5u8868 8. 在Windchill Shell 下面运行:Resourcebuild ext.resource.navigationRB 或Resourcebuild ext.resource.navigationRB_zh_CNant -f binswmaint.xml installSiteChanges 1.清除Tomcat下面的缓存:D:ptcWindchill_9.1Tomcatwork 2.清除资源文件编译后目录:D:ptcWindchill_9.1Windchillcodebaseextresource 3.清除IE缓存、历史记录、cookies: 4.清除xml文件的编译目录:D:ptcWindchill_9.1Windchillcodebaseconfigactions 5.查看Windchill的日子记录:D:ptcWindchill_9.1WindchilllogsWindchill重新启动成功的标志(3min左右):INFO : wt.method.server.startup - MethodServer ready (in 42.063 secs).9. 显示效果如图:l 二级菜单定制1 二级菜单的定制,跟上面顶级菜单的定制差不多,主要涉及的文件也是4个(2个xml、2个资源文件),为了测试二级菜单是否成功,我们需要在Windchill中访问Jsp页面change_record.jsp 、show_Archive_record.jsp只是里面的代码有所不同,添加代码之后再 Windchill Shell 里面运行的命令也是一样的注意:文件一定要是UTF-8编码格式的2 配置2级菜单在 .wtSafeAreasiteModcodebaseconfigactions 目录下custom-actionModels.xml文件里面添加的代码为:Example: custom-actionsModel.xml (模型文件)3 配置2级菜单在 .wtSafeAreasiteModcodebaseconfigactions 目录下custom-actions.xml文件里面添加的代码为:Example: custom-actions.xml (动作文件) 4 配置2级菜单在 D:ptcWindchill_9.1Windchillsrcextresource 目录下navigationRB.rbInfo(navigationRB_en_US.rbInfo)英文资源文件里面添加的代码为:Example: navigationRB.rbInfo (英文资源文件) ResourceInfo.class=wt.tools.resource.StringResourceInfoResourceInfo.customizable=trueResourceInfo.deprecated=falsefiberhomereport.ChangeReports.description.value=Global Change statisticsfiberhomereport.ChangeReports.tooltip.value=Global Change statisticsfiberhomereport.ArchiveReports.description.value=Archive Drawing statisticsfiberhomereport.ArchiveReports.tooltip.value=Archive Drawing statistics 5 配置2级菜单在 D:ptcWindchill_9.1Windchillsrcextresource 目录下navigationRB_zh_CN.rbInfo中文资源文件里面添加的代码为:Example: navigationRB_zh_CN.rbInfo (中文资源文件)ResourceInfo.class=wt.tools.resource.StringResourceInfoResourceInfo.customizable=trueResourceInfo.deprecated=falsefiberhomereport.ChangeReports.description.value=u5168u5c40u53d8u66f4u7edfu8ba1u62a5u8868fiberhomereport.ChangeReports.tooltip.value=u5168u5c40u53d8u66f4u7edfu8ba1u62a5u8868fiberhomereport.ArchiveReports.description.value=u5f52u6863u5de5u7a0bu56feu7edfu8ba1u62a5u8868fiberhomereport.ArchiveReports.tooltip.value=u5f52u6863u5de5u7a0bu56feu7edfu8ba1u62a5u8868 6 为了测试二级菜单是否新建成功,我们需要在Windchill安装系统. codebasenetmarketsjsp目录新建几个Jsp文件,如下在D:ptcWindchill_9.1Windchillcodebasenetmarketsjspangusreport 目录下面新建:change_record.jsp 、show_Archive_record.jsp 两个Jsp页面jsp页面的内容为:Windchill test 7 在Windchill Shell 下面运行:Resourcebuild ext.resource.navigationRB 或Resourcebuild ext.resource.navigationRB_zh_CNant -f binswmaint.xml installSiteChanges 1.清除Tomcat下面的缓存:D:ptcWindchill_9.1Tomcatwork 2.清除资源文件编译后目录:D:ptcWindchill_9.1Windchillcodebaseextresource 3.清除IE缓存、历史记录、cookies: 4.查看Windchill的日子记录:D:ptcWindchill_9.1WindchilllogsWindchill重新启动成功的标志(3min左右):INFO : wt.method.server.startup - MethodServer ready (in 42.063 secs).8 显示效果如图:l Action 下拉菜单1 Action下拉菜单的定制,跟上面二级菜单的定制差不多,主要涉及的文件也是4个(2个xml、2个资源文件),添加代码之后再 Windchill Shell 里面运行的命令也是一样的注意:文件一定要是UTF-8编码格式的2 定制Action下拉菜单在 .wtSafeAreasiteModcodebaseconfigactions 目录下custom-actionModels.xml文件里面添加的代码为:Example: custom-actionsModel.xml (模型文件) 3 定制Action下拉菜单在.wtSafeAreasiteModcodebaseconfigactions 目录下 custom-actions.xml文件里面添加的代码为:Example: custom-actions.xml (动作文件) 4 定制Action下拉菜单在 D:ptcWindchill_9.1Windchillsrcextresource 目录下navigationRB.rbInfo(navigationRB_en_US.rbInfo)英文资源文件里面添加的代码为:Example: navigationRB.rbInfo (英文资源文件)ResourceInfo.class=wt.tools.resource.StringResourceInfoResourceInfo.customizable=trueResourceInfo.deprecated=falsepart.ExportBom.description.value=ExportBompart.ExportBom.tooltip.value=ExportBompart.ExportData.description.value=ExportDatapart.ExportData.tooltip.value=ExportData5 定制Action下拉菜单在 D:ptcWindchill_9.1Windchillsrcextresource 目录下navigationRB_zh_CN.rbInfo中文资源文件里面添加的代码为:Example: navigationRB_zh_CN.rbInfo (中文资源文件)ResourceInfo.class=wt.tools.resource.StringResourceInfoResourceInfo.customizable=trueResourceInfo.deprecated=falsepart.ExportBom.description.value=u5bfcu51fau7269u6599part.ExportBom.tooltip.value=u5bfcu51fau7269u6599part.ExportData.description.value=u5bfcu51fau6570u636epart.ExportData.tooltip.value=u5bfcu51fau6570u636e 6 在Windchill Shell 下面运行:Resourcebuild ext.resource.navigationRB 或Resourcebuild ext.resource.navigationRB_zh_CNant -f binswmaint.xml installSiteChangeswindchill stop & windchill start 1.清除Tomcat下面的缓存:D:ptcWindchill_9.1Tomcatwork 2.清除资源文件编译后目录:D:ptcWindchill_9.1Windchillcodebaseextresource 3.清除IE缓存、历史记录、cookies: 4.查看Windchill的日子记录:D:ptcWindchill_9.1WindchilllogsWindchill重新启动成功的标志(3min左右):INFO : wt.method.server.startup - MethodServer ready (in 42.063 secs).7 显示效果如图:l 文件夹工具栏菜单定制1. 文件夹工具栏菜单定制,跟上面二级菜单的定制差不多,主要涉及的文件也是4个(2个xml、2个资源文件),添加代码之后再 Windchill Shell 里面运行的命令也是一样的注意:文件一定要是UTF-8编码格式的2. 配置文件夹工具栏菜单定制在 .wtSafeAreasiteModcodebaseconfigactions 目录下,custom-actionModels.xml文件里面添加的代码为:Example: custom-actionsModel.xml (模型文件) 3. 文件夹工具栏菜单定制.wtSafeAreasiteModcodebaseconfigactions 目录下custom-actions.xml文件里面添加的代码为:Example: custom-actions.xml (动作文件) 4. 文件夹工具栏菜单定制在 D:ptcWindchill_9.1Windchillsrcextresource 目录下navigationRB.rbInfo(navigationRB_en_US.rbInfo)英文资源文件里面添加的代码为:Example: navigationRB.rbInfo (英文资源文件)ResourceInfo.class=wt.tools.resource.StringResourceInfoResourceInfo.customizable=trueResourceInfo.deprecated=falseobject.list6.description=CreateWSobject.list6.icon=/netmarkets/images/demodata/Modem.jpgobject.list6.tooltip=ToolTip65. 文件夹工具栏菜单定制在 D:ptcWindchill_9.1Windchillsrcextresource 目录下navigationRB_zh_CN.rbInfo中文资源文件里面添加的代码为: Example: navigationRB_zh_CN.rbInfo (中文资源文件)ResourceInfo.class=wt.tools.resource.StringResourceInfoResourceInfo.customizable=trueResour
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2025年新能源行业绿色制造工艺与智能制造融合报告
- 2025年金融行业数据治理与隐私保护技术实施案例与最佳实践分享报告
- 科学物质科学前沿初赛试题及参考答案
- 世界文化遗产知识竞赛活动试题
- 2025年青少年“学宪法、讲宪法”知识竞赛题库及参考答案
- 2025年集体林地流转协议
- 蒸馏炉工节假日后复工安全考核试卷含答案
- 2025年国家保安员资格证考试题库含答案
- 瓶装气客服员节假日后复工安全考核试卷含答案
- 玉器抛光工节假日后复工安全考核试卷含答案
- 新疆维吾尔自治区成立70周年心得体会二
- 公路养护技术管理与实施细则
- 2023-2025年中考物理试题分类汇编内能及内能和利用(有解析)
- GB/T 46023.2-2025汽车用智能变色玻璃第2部分:聚合物分散液晶调光玻璃
- 2025-2026学年北师大版数学小学三年级上册(全册)教案设计及教学计划
- GB/T 45932-2025高压直流开关设备和控制设备标准的共用技术要求
- GB/T 21220-2024软磁金属材料
- (2024年)面神经炎课件完整版
- 智慧教育云平台建设解决方案
- 统编版《始终坚持以人民为中心》ppt精品课件1(共19张PPT)
- 2022年国家公务员考试申论真题及答案(地市级)
评论
0/150
提交评论