Add a new menu option using Ant

本文介绍如何使用Ant脚本自动更新Windchill PDMLink或ProjectLink的菜单系统,包括安装和卸载新的菜单选项。主要内容涵盖脚本创建过程、所需技术组件及XML文件的自动化更新。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Introduction

This tutorial show how to use Ant to update the Windchill PDMLink or ProjectLink menu system. It will include a script that will install and uninstall a new menu option to the WTPart actions menu.

Getting started

We have some requirements

  • Fully automated script
  • Will work on any 9.x Windchill version
  • Will both install and uninstall the option
  • No manual editing

First you need to be familiar with how to create a Ant script for Windchill. We will use the same techniques here, but the primary difference is that will need to automatically update XML, this is not a feature available with ootb Ant

For us to update the XML we will use .an ant extension from the OOPS Consultancy Ltd called XML Task that can be downloaded here . It uses a query language called XPath with is very powerful way of specifying locations in an XML document.. You should be familiar with XPath syntax if you do any XML coding, a good starting point is the wiki page

Technical Objectives

To add the menu we will need to do the following

  • Update the actions xmls
  • Add a new resource bundle

Add the new XML task to the script

We need to copy the new task jar to our ant lib directory

The we start the script, add the new task

<target name="setup">
...
  <taskdef name="xmltask classname="com.oopsconsultancy.xmltask.ant.XmlTask" />
...
</target>

Add the new XML task to the script

To be continued… please add a comment if you want us to finish this article sooner rather than later

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值