Hi lars,
For each sequencefile you will need to create a reference to it by use of the Engine.GetSequenceFile() method.
Next create a new context by using the SequenceFile.CreateNewContext(), use the SequenceFileObj reference returned by the GetSequenceFile() method.
Once you have the SeqenceContext reference, use this as the parameter to the second step which calls a dll in docgen.seq, (sorry can not remember what is called at the moment). The at the moment this parameter is ThisContext reference. Probably best to make a copy of this sequencefile (docgen.seq) and make the modification to the copy.
On the second step, open up the specify module dialog and change the ThisContext to your new variable holding your new SequenceContext. Close the sepecify dialog.
Some where in your cleanups you will need to set the New Sequence Context to Nothing and call the ReleaseSequenceFile() method passing it the sequencefile reference. Releasing the reference to the sequence file maybe a bit tricky because if the engine is still using the reference, then it will not be released.
I have tried this and it did generate a document of a sequencefile not previously loaded. My only problem was releasing the sequencefile.
I am not suggesting that this is a usable solution, because you wouldn't want the dialog window opening up for each sequence file. This maybe a starting point for you.
Regards
Ray Farmer
Regards
Ray Farmer
