Page 1 of 1

Native command: args reference workspace files

Posted: Mon Oct 19, 2015 10:31 am
by rickc
I have a project that creates an XML file in a workspace. The xml file can be referenced by variable ${xmlfile}.
I would like to add an "exec task" to call a native command(.net exe). The native command will take the xml and reformat to pdf.

The .net exe has two arguments: an input filename(xml) and an output filename(pdf).

How do I call the native command and pass the path to ${xmlfile} ?
I would also like the output(pdf) to be written to the workspace.

Here is an excerpt of the project's xml:
Code: Select all
		<exec label="Convert XML to PDF" executable="D:\Tools\myxml2pdf.exe" version="1.0" onError="continue">
			<arg value="[b]D:\Tools\source\xml.xml[/b]" />
			<arg value="[b]tempchu_output.pdf[/b]" />
		</exec>
The arguments shown here are only for test purposes. I'd like to replace them with references to files in the workspace.


RickC

Re: Native command: args reference workspace files

Posted: Mon Oct 19, 2015 11:27 am
by Support_Rick
RickC

Getting access to the FileName and/or Workspace location is easily done by addressing the System Variables / Functions.

When you get to the prompt, click on the [$ Var] button at the end. This will give you the Wizard.

You can utilize file attributes to get to the file information. (Path, FileName, Extension, Size, etc)

Also, you can select the "system.job.workSpace" variable to point to the currently defined Job Workspace.

For additional help:

This link will give you the details about File Attributes

And going into the Help | Online Help will give you access to training videos that explain attributes and variables as well.