Skip to main content
13-Aquamarine
June 30, 2015
Question

how to pass through the opened xml-file as parameter in ACL?

  • June 30, 2015
  • 1 reply
  • 3220 views

Hi Guys,

we need to pass through the opened xml-file in Arbortext Editor with ACL to another .exe-Tool.

We know the command sh to call an external tool. But how can we pass through the opened xml file to this external tool?


Anybody an idea?

Thank you in advance for your help.

1 reply

1-Visitor
June 30, 2015

Hi Hubert,

I haven't done this myself, but I have some initial thoughts.

Will the exe be performing any changes to the XML or just referencing? If it's making changes, you may encounter errors since Arbortext locks open files from other editors.

As far as passing it to the external exe, I can think of 2 ways...

1. Pass the XML and file path as a cmd line argument to the exe.

2. Copy the content of the XML file and pass as an input stream.

Hope that helps!

-Jeff

hbestler13-AquamarineAuthor
13-Aquamarine
June 30, 2015

Hi Jeff,

no, we do not need to change the xml. We only want to take informations about the opened file.

We thought about simlilar methods like suggested from you.

Our try was like this:

#mark the complete file
StartOfDocument;
EndOfDocExtend;
#selection into a variable
$sel = main::selection
#shell command
sh 'C:\testtool.exe $sel'

Unfortunately this try was without success. If we use following sh-command with a full path of a xml like:

sh 'C:\testtool.exe C:\testfile.xml' then its ok. But we need to pass through the opened xml file. Do you maybe know if there is a command or variable where the absolut path of the opened xml-file is included?


Thank you for your help.

1-Visitor
June 30, 2015

Have you tried the function "pwd"? This will return the current working directory.