1

Need to run this below command in the Ant exec tag.

windchill ext.cummins.securityLabel.CumminsLoadAgreement -d %WT_HOME%/loadFiles/ext/cummins/Agreements/AgreementList/Agreement_Loader.xlsx -u wcadmin -p wcadmin

Praveen
  • 11
  • 2

2 Answers2

0

You can make use of Java Task in your ant script to perform this.

Use the below script

<java classname="ext.cummins.securityLabel.CumminsLoadAgreement" fork="true">
            <arg value="${username}"/>
            <arg value="${password}"/>
            <arg value="-d"/>
            <arg path="${Your_Custom_Directory}/${Custom_file}"/>
        </java>
Vignesh Vino
  • 1,242
  • 4
  • 25
  • 50
0

In a your ant xml file, define a ant target with the tag , the path for Windchill Home is accessible with the variable ${env.WT_HOME}

<project name="YourProjectName" default="YourTargetName" basedir=".">
    <target name="YourTargetName">
        <exec executable="windchill" dir="." failonerror="true">
            <arg line="ext.cummins.securityLabel.CumminsLoadAgreement -d ${env.WT_HOME}/loadFiles/ext/cummins/Agreements/AgreementList/Agreement_Loader.xlsx -u wcadmin -p wcadmin" />
        </exec>
    </target>
</project>

From a windchill shell you can then run the target as "usual":

ant -f yourFile.xml YourTargetName

Tipp: if you name your ant file build.xml, you even do not need to specify it as parameter.

Loic Mouchard
  • 1,121
  • 7
  • 22