[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
  • Hi Mary,

    There is no %unlock.

    I recall a conversation about this some time ago but TBH I'm not sure where it took place...

    Anyway, I think the upshot was if we did have a %unlock, the gotcha's were: what value would it unlock to, how would that value be defined? The immediate answer would be "to its previous or default value" but arriving at the correct value cannot be guaranteed. 

    Without knowing more about the configs and structure involved it's hard to suggest useful alternative approaches.

    Regards

    Marc

Reply
  • Hi Mary,

    There is no %unlock.

    I recall a conversation about this some time ago but TBH I'm not sure where it took place...

    Anyway, I think the upshot was if we did have a %unlock, the gotcha's were: what value would it unlock to, how would that value be defined? The immediate answer would be "to its previous or default value" but arriving at the correct value cannot be guaranteed. 

    Without knowing more about the configs and structure involved it's hard to suggest useful alternative approaches.

    Regards

    Marc

Children
No Data