selectseries3 variable problem

hi ,

i am trying to link the workspace/users to folders inside of users forlder. eg  workspace/users/bob..... workspace/users/bill ect.

does anyone know the variable to set so it picks up the current logged on users name? so on microstation start up it doesnt have a list of all the different users but just one (that logged on user) 

_USTN_USER = $(_USTN_WORKSPACEROOT)users/ .....

is the varibale (_ENGINENAME)?

thanks in advance

Parents
  • It should be enough to set

    _USTN_USERNAME = username

    (username comes from the environment) to set the logged in user. you might even set

    _USTN_USER = $(_USTN_WORKSPACEROOT) $(_USTN_USERNAME)/

    to use a subdir for each user (results in using <workspaceroot>users\bob\bob.cfg if the logged in user is bob)

    _ENGINENAME is to differ between MicroStation and Powerdraft (i.e.) currently used for interfaces (afaik) in mixed environments

    HTH Michael



    Answer Verified By: manerva 

  • thanks for quick respose

    so with $(_USTN_WORKSPACEROOT) looking in /WorkSpace/ and _USTN_USERNAME = username

    _USTN_USER = $(_USTN_WORKSPACEROOT) $(_USTN_USERNAME)/ will look into workspaces and find the logged on user specific folder?

    so anytime i use _USTN_USERNAME = username it will know to look for the current user named file?

  • _USTN_USERNAME  = username will make the internal microStation username the logged on user

    This would normally result in finding a cfg file under <workspaceroot>users/username.ucf (the later is automatically done by the standard configuration in msconfig. cfg).

    Setting _USTN_USER = $(_USTN_WORKSPACEROOT) $(_USTN_USERNAME)/ will result loading a file <workspaceroot>users/username/username.ucf as the configfile is always named automatically without changing msconfig.cfg or setting _USTN_USERCFG to a totally other location.

    Have a look at msconfig.cfg right after the %level4 entry. it sets the load order to include whatever via _USTN_USERCFG is defined, or search for _USTN_USER/username.ucf, or search for _USTN_USER/untitled.ucf or throw an error.

    This is all done for the userconfiguration file (ucf) only. If you like to set the homeroot or something like this, that's another cup of tea.



  • Unknown said:

    so with $(_USTN_WORKSPACEROOT) looking in /WorkSpace/ and _USTN_USERNAME = username

    _USTN_USER = $(_USTN_WORKSPACEROOT) $(_USTN_USERNAME)/ will look into workspaces and find the logged on user specific folder?

    so anytime i use _USTN_USERNAME = username it will know to look for the current user named file?

    PMFJI, my apologies if I am missing something obvious, _USTN_USERNAME and USERNAME are similar, but are not the same thing. The former is specific to MicroStation while the latter is specific to Windows. If you are looking for the Windows log in name, you should use USERNAME, like this:

    $(_USTN_WORKSPACEROOT)$(USERNAME)/

    BTW, you can "evaluate" variable definitions to experiment and verify them using the EXPAND ECHO statement, like this:



      

  • Nice hint Phil ! I always forget about this keyin :-)

    But I prefer setting the _USTN_USERNAME = USERNAME  to asure that other possible includes (cfg) that build on this variable are working as expected, no matter if the username comes from the environment, MicroStation manager or commandline.

    if you only set _USTN_USER, than the line  _USTN_USERCFG = $(_USTN_USER)$(_USTN_USERNAME).ucf (from standard msconfig.cfg) might not work as expected. Except you want different users but stored under a directory for the currently logged in user (so having MicroStation user bob_a and bob_b under a \bob dir and henry_a ... under a henry dir). Both is possible, manerva has to define his final goal !



Reply
  • Nice hint Phil ! I always forget about this keyin :-)

    But I prefer setting the _USTN_USERNAME = USERNAME  to asure that other possible includes (cfg) that build on this variable are working as expected, no matter if the username comes from the environment, MicroStation manager or commandline.

    if you only set _USTN_USER, than the line  _USTN_USERCFG = $(_USTN_USER)$(_USTN_USERNAME).ucf (from standard msconfig.cfg) might not work as expected. Except you want different users but stored under a directory for the currently logged in user (so having MicroStation user bob_a and bob_b under a \bob dir and henry_a ... under a henry dir). Both is possible, manerva has to define his final goal !



Children
No Data