Chris Morley wrote:

> Greetings
>
> After doing work with Stepconf I has come to my attention that having
> multiple hal files can sometimes be messy.

Yep.  They're useful sometimes, cumbersome other times.

> I was thinking a hal comand that searches a file for user defined headers
> with syntax like the INI file, such as:
>
> [ FIRST_SECTION ]
>
> Then runs all the commands till it reaches the next header.

This idea has come up before.  The idea is to make it possible to use 
just an ini-style file to contain all HAL setup and normal ini 
contents.  Of course you'd also have to add the same capability to pyvcp 
if you really want to be able to use one file for all settings.  There's 
no particular reason why tool tables and var files couldn't be read from 
a section of an ini file either.  (I'm not sure that the var file should 
be in there, since it gets written automatically, but it could be included)

> This would allow one to put all Hal commands in one file and call
> different sections at different times.

This is only helpful in that the text is all in one file - ie fewer 
editor windows open and fewer files in the config directory.  The 
underlying problem is that there is no way to add functions that have 
already been loaded, for isntance adding an "or2" instance for 
something, when "or2" has already been loaded.  This will still be a 
problem, but it is easier to find an instance of "or2" in one file 
versus searching all the files in a  directory.  (yes, I know that (a) 
grep and (b) skilled users with advanced editors can easily search a 
directory, but that's not the user we have in mind here)

> for instance the POST_GUI.hal file could just have a different
> header name.
>
> And if it makes sense you can still have separate hal files using the
> regular hal comand.
>
> maybe
>  halcmd -f myhalfile.hal [FIRST_SECTION]

[ is a program, so you'd need quotes :)

> or
>  halcmd -f myhalfile.hal --FIRST_SECTION

Better to use another option letter, like -g "GROUP"  (-s is already 
used for script mode).

The issue with the hal file itself is that [] are used to expand ini 
file variables at the moment, and a line like so:
[a_word]
is an error because there's no variable name listed.  So halcmd would 
need to be changed in a few ways to make this work.

> Opinions?

I think something like this would be a good thing.  I'm not sure exactly 
how it should work though.

- Steve


------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Emc-developers mailing list
Emc-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-developers

Reply via email to