# RE: Choosing a primary input doc by selecting a file from a dir?

From: Bruce Chapman <bruce.chapman@nec.co.nz>
Date: Tue, 01 Mar 2011 17:04:41 +1300
To: 'Manfred Staudinger' <manfred.staudinger@gmail.com>
Cc: 'XProc Dev' <xproc-dev@w3.org>
Message-id: <075533B84F9D4EEEB0087C9E52697D4A@necwlgxpwapp210>
Manfred,

We have a GUI based pipeline runner which we use internally but that is
neither a product, nor open-sourced - so it isn't an option for you.

So here's a trick I have used which might get you mostly there.

1: make the pipeline have an option where you can pass the dwfx file. (you

2: Create a batch file which calls calabash with your pipeline, and the
batch file uses one argument (%1) as the .dwfx file and passes it as the
option value to the pipeline via calabash options.

3: In windows you can associate this batch file as the thing to do whenever
a user double clicks on a .dwfx file thus:

assoc .dwfx=RevitXprocProcessor
ftype RevitXprocProcessor="c:\path\to\your\batch\file.bat" "%1"

RevitXprocProcessor can be any name you like that isn't already used

4: done

Once you have done step 3: once (as admin) on each machine (& probably for
each user), you can then double click any *.dwfx file and the batch file
will run, be passed the dwfx file, which will fire up calabash and set the
option to the dwfx file and run the pipeline against that file.

An alternative is to add the batch file (step 2: above) to the desktop, and
then you can drag a file from the windows explorer and drop it on the batch
file on the desktop, and the batch file will be executed with the dropped
file as the argument. This would allow you to set up different batch files
for different pipelines. The first method above allows only one batch file
to be run, but is more convenient for the users (double click vs drag and
drop).

This all works on XP, haven't confirmed it on later windows, but I can't see
why it wouldn't work.

Have fun.

Bruce

-----Original Message-----
From: xproc-dev-request@w3.org [mailto:xproc-dev-request@w3.org] On Behalf
Of Manfred Staudinger
Sent: Sunday, 27 February 2011 11:56 a.m.
To: XProc Dev
Subject: Choosing a primary input doc by selecting a file from a dir?

I'm using Calabash plus Saxon to analyse and evaluate dwfx (zipped
autocad/revit) files. The result doc is for example a svg floor plan,
or a pie-chart with some statistic of how many doors or how much
concrete and steel will be used for the building.

I would like to let the user choose between different docs (created
with revit) which represent different options for the building and
lead to different costs. This in turn will induce new ideas how the
model could be changed or improved ... In short, I would like to have
the different dwfx in one directory, but let the user choose one by
selecting any one file from there.

It is all on the windows file system, and as the users are not very
experienced, it would be ideal if I could use the windows "open file"
dialogue for this.

Is this even possible ??? If not, I would be grateful for any suggestion!

Regards,
Manfred

Received on Tuesday, 1 March 2011 04:05:24 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 1 March 2011 04:05:25 GMT