Info block Generation

Moderators: Andreas Mohr, rah

Post Reply
JConley
Posts: 9
Joined: Thu Feb 11, 2016 4:59 pm

Info block Generation

Post by JConley » Thu Apr 14, 2016 9:44 pm

Hello again, JConley here.

I am still working on the averaging macro mentioned in another thread (took a hiatus from the project for a month or so) so I am more or less in the same stage in developing.

My macro will take a number of sample measurements, average them, add an info block, save the file in a "standards" directory, and add the file (with info block) to an in-house spectrum library. I am still working out the kinks for the info block.

I just got the info block to add to the averaged spectrum correctly, but when I save the avg file as a different file name in an organized location, the info block does not save with it. The avg file is dumped in my default directory prior to adding the info block. The info block is added, but only as a temporary manipulation - a red page sits above the blue page icon to the left of the filename. If i unload the avg file and reload, the info block is gone. As I save the file under a new name, the info block is lost.

To save, I am using the SaveAs command: SaveAs([<$ResultFile 2>: Spec, Info], ...
Is there an intermediate step that should be taken to finalize the info block? or perhaps a different save command?

In the InfoInput command parameters, there are two, INM and IFN, that are both defined as "Info Definition Filename" in Section 11 of the programming manual. In my macro, the INM is defined as the file path to the info mask I am using. IFN is set to default. What is the difference between these parameters?

Also, what file extensions besides .jpg are allowed on this forum? I try to post the macro text, but .mtx, .txt, and .pdf are all blocked.

Thanks in advance for any responses.

JConley
Fourier Transformer

JConley
Posts: 9
Joined: Thu Feb 11, 2016 4:59 pm

Re: Info block Generation

Post by JConley » Fri Apr 15, 2016 3:27 pm

UpDATE:

Got the file to save with an intact data block!

Set all variable indexes to [0] in user dialogue windows
and used the following as a save command
<$ResultFile 3> = SaveAs ([<$ResultFile 2>:Spec],[<$ResultFile 2>:Info], {DAP='Q:\FTIR - LUMOS Data Drop and Library\Library\Standards', SAN='<Substance>[0]-<Part Number>[0]-Standard'});
Broke the file into two data block callouts instead of trying to do both Spec, Info in one: [<$ResultFile 2>:Spec, Info].

Now trying to get the file to load properly into our in-house library.

Andreas Mohr
Posts: 29
Joined: Mon Jun 30, 2008 4:50 pm

Re: Info block Generation

Post by Andreas Mohr » Mon Apr 18, 2016 9:43 am

JConley wrote:UpDATE:
<$ResultFile 3> = SaveAs ([<$ResultFile 2>:Spec],[<$ResultFile 2>:Info], {DAP='Q:\FTIR - LUMOS Data Drop and Library\Library\Standards', SAN='<Substance>[0]-<Part Number>[0]-Standard'});
Broke the file into two data block callouts instead of trying to do both Spec, Info in one: [<$ResultFile 2>:Spec, Info].
So I guess that the previous list of block ID elements was invalid (since incomplete) syntax, and that the new command line now requests both Spec and Info blocks to be saved to the file, which is successful
(BTW did you try specifying "0, " as simple file lists defaults part instead? That might happen to deliver a useful result...).

Hmm, on further thought I'm not sure whether even your current syntax is sufficiently officially correct:
since Programming.pdf is talking about multiple file lists at this functionality, this means we have a concatenation of multiple file lists ("[...]"?), with multiple block ID elements then contained within each list,
so perhaps in your use case you should simply have used
SaveAs([<$ResultFile 2>:Spec <$ResultFile 2>:Info], {DAP=

Programming.pdf 10.9.5 SaveAs() appears to be quite non-verbose in this regard (about hinting at multiple block ID elements, which BTW is described in 10.1 Command Syntax), thus I took a documented note to have this section improved accordingly, and to possibly have a helpful syntax sample added to 10.1 (together with clarifications of file lists vs. inner list of block IDs).

Thank you!

Post Reply