[CE/ORD] If I can %lock a variable, can I %unlock?

In my configuration, I need to run various client CFGs in addition to the standard files and my custom files. Some of these client files have variables defined to locations for their networks. This makes sense (most client files are provided as-is as a convenience) but it means that I need to find ways to ensure that my variable definitions are the ones actually used. Some of this I can mitigate with the order files are processed, but there are certain other considerations for our project structure that don't really work that way.

I would like to %lock certain variables, but I foresee a problem. While I don't want the client files to rewrite these variables, I DO want the ability to redefine them if I change Workspace. It's not uncommon to work on two or three projects a day (depending on stage and deadline). I know that I can always exit and restart to switch workspace, but it would be nice to be able to Close and change to the next Workspace/Workset without exiting completely.

I do not see an %unlock directive.
I do see %undef...would %undef override %lock? as in, could I take a %locked variable, %undefine it, redefine it, and re%lock it?

As an example, in my workspace file, I have:

_USTN_WORKSETSROOT = $(MY_WORKSET_LOCATION)$(PROJECT_YEAR)/
%lock _USTN_WORKSETSROOT

I lock it because I don't want anything in my client CFGs to redefine where my worksets are stored. However, if I want to change to another workspace, I DO want to be able to redefine where my worksets (for that workspace) are located. Would it be effective to add

%undef _USTN_WORKSETSROOT

prior to setting the variable for that workspace?

Thank you.

Parents
  • Here is how I get around this because I do not want to edit any client provided files if at all possible...

    1. I move the delivered client WorkSpace.cfg out of the WorkSpaces folder into a custom folder.

    2. I create a new WorkSpace.cfg the same name as the client's in the WorkSpaces folder.

    3. This new WorkSpace.cfg does a %include on the original client WorkSpace cfg
      Since the original client WorkSpace.cfg typically does a %include to the Organization-Civil .cfg those resources get loaded.

    4. After the %include I override any client variables I need to redefine. 
      _USTN_WORKSETSROOT is one that usually gets redefined.

    Rod Wing
    Senior Systems Analyst

Reply
  • Here is how I get around this because I do not want to edit any client provided files if at all possible...

    1. I move the delivered client WorkSpace.cfg out of the WorkSpaces folder into a custom folder.

    2. I create a new WorkSpace.cfg the same name as the client's in the WorkSpaces folder.

    3. This new WorkSpace.cfg does a %include on the original client WorkSpace cfg
      Since the original client WorkSpace.cfg typically does a %include to the Organization-Civil .cfg those resources get loaded.

    4. After the %include I override any client variables I need to redefine. 
      _USTN_WORKSETSROOT is one that usually gets redefined.

    Rod Wing
    Senior Systems Analyst

Children
No Data