.pcf file not loading project variables

Hey i have been trying to get v8 microstation to load my project file but if i dont drop down the menu and select it again it wont load. I have tried adding command lines into the shortcut ...-wu(ucf) -wp(pcf) and "-ws_USTN_PROJECTCFG=(location of .pcf file) but the variables still dont seem to get carried through. Is there any way around this or will i just have to reselect the project each time i open microstation. Any help would be great.

thanks in advance

Dave

Parents
  • Dave,

     Copy your shortcut and in the command line append the syntax  '-DEBUG' to the command line in the shortcut.

    Look at the Debug output file..you might find that if you're on a network that it's being overridden...?

    If you aren't sure then post the 'DEBUG.txt' file here and we can take a look...

    /Rob

    CADMinistrator ®

  • i think it may have something to do with this. Is this saying in leymans terms "if project is not selected manually it will try and run the macro _USTN_PROJECTCFG"? is there really a macro with this name or is my config written incorrectly?

    Macro _USTN_PROJECTCFG not found, "undef" skipped.

     

     

    -MSDEBUG

    #----------------------------------------------------------------------
    #
    # Include the project configuration file if _USTN_PROJECTNAME defined.
    #
    # _USTN_PROJECTNAME can be set by (in order of priority):
    # 1) -wp command line option.
    # 2) operating system environment variable.
    # 3) configuration variable.
    #
    #----------------------------------------------------------------------
    %undef _USTN_PROJECTCFG
    %level 4
    %ifdef _USTN_PROJECTNAME
    % if exists ($(_USTN_PROJECT)$(_USTN_PROJECTNAME).pcf)
    _USTN_PROJECTCFG = ${_USTN_PROJECT}$(_USTN_PROJECTNAME).pcf
    % include $(_USTN_PROJECTCFG) level 3
    % endif
    %endif

  • Configuration Files & Variables

    Dave:
    Is this saying in leymans terms "if project is not selected manually it will try and run the macro _USTN_PROJECTCFG"? Is there really a macro with this name or is my config written incorrectly? Macro _USTN_PROJECTCFG not found, "undef" skipped.

    You're getting too involved in the depths of configuration variable (CfgVar) definition. It will be more helpful if you tell us exactly what you are doing, and how you have MicroStation configured.

     

    1. Have you installed MicroStation to a default location?
    2. What is the exact command line in your shortcut that you are using to start MicroStation?

     

    If MicroStation is in a default location, then project directories are under the C:\Program Files\Bentley\Workspace\Projects folder. During installation, CfgVar _USTN_PROJECT was set to point to that location. You should not change _USTN_PROJECT unless you are absolutely sure that it was set incorrectly on installation. Given the large number of successfull MicroStation installations around the world, it would seem very suspicious if yours is incorrect.

    Too Much Information

    That location is also where you will find project configuration files (*.pcfs). When you start MicroStation with the -wpDave, MicroStation searches in the folder specified by _USTN_PROJECT for a PCF file of that name (i.e. Dave.pcf). It sets CfgVar _USTN_PROJECTNAME to that value, so that if Dave.pcf really exists, then _USTN_PROJECTCFG is set to the full path to that file:
    C:\Program Files\Bentley\Workspace\Projects\Dave.pcf.

    I've made the same mistake as you: I'm giving you too much information. What you need to know is:

    • Project configuration files are in C:\Program Files\Bentley\Workspace\Projects
    • Invoke a particular project configuration file with the command-line switch -wpDave
    • Using that switch presupposes that file Dave.pcf exists in that Projects folder

    Debugging Configuration Variables

    If this isn't working, then use the available tools to debug your configuration. There is some information about debugging CfgVars here.

    Regards, Jon Summers
    LA Solutions

     
    Regards, Jon Summers
    LA Solutions

  • Thanks for the responses guys. Im setting up a build for the company i work for and all variables i have are pointing to drive j: that contains all of the files under C:\Program Files\Bentley\Workspace. my _USTN_PROJECT variable is looking into the correct directory.

    this is my shortcut command line is as follows:

    "C:\Program Files\Bentley\2004\Program\MicroStation\ustation.exe" -wp3065 -wuMatrix_V8

    the user and interface come through but the i have to reselect my project(3065.pfc)

    Im trying to set up my system so that users only have to select an icon to open up microstation in the correct user/project/interface

     

    this is what im trying to achieve.

     

    1. click icon

    microstation loads up

    2. all of my user/project/interface are filled in to suit the command lines in the shortcut.

    3. double click a drawing and start from there.

    I  am fairly certain is has to to with the commands in the msconfig.cfg file

    if i follow those steps it doesn't load my .pcf variables into microstation(undefined)

    i have to manually reselect the project (even if it is already shown as the correct project) for the variables to come through.

    Im sorry if im not making this clear, im very new to all of this so any help is greatly appreciated.

    Cheers

    Dave

  • Dave,

    I have also had problems specifiying cfgs @ MS startup. My approach was to use the -wc and specify a workspace cfg and use the -wp with the project specified. I wrote a few scripts which allow a user to specify the project before opening MicroStation Manager posted in this thread: http://communities.bentley.com/Products/MicroStation/MicroStation_V8_XM_Edition/MicroStation_V8_XM_Edition_VBA/f/159/t/15075.aspx . One problem I have found is that once MS is started with the -wp parameter that pcf is evauated and upon subsequent changes to the Projects dropdown no further pcf files will be read. I know this problem is different than your (nearly opposite). When you say you have to reselect the project, what happens when you choose different projects and are they processed as well?

    Roy

  • Roy Gallier:

    Dave,

    I have also had problems specifiying cfgs @ MS startup. My approach was to use the -wc and specify a workspace cfg and use the -wp with the project specified. I wrote a few scripts which allow a user to specify the project before opening MicroStation Manager posted in this thread: http://communities.bentley.com/Products/MicroStation/MicroStation_V8_XM_Edition/MicroStation_V8_XM_Edition_VBA/f/159/t/15075.aspx . One problem I have found is that once MS is started with the -wp parameter that pcf is evauated and upon subsequent changes to the Projects dropdown no further pcf files will be read. I know this problem is different than your (nearly opposite). When you say you have to reselect the project, what happens when you choose different projects and are they processed as well?

    Roy

     

    I get the list of all my .pcf files and if i add the -wp and the .pcf i want to use all of the variables that shoudl be brought up as "project" level it places them on undefined. i then have to close MS drop down the project menu and select the project i want(even if it is shown there i need to reselect it) . -wu works perfectly thats what has me stumped.

     

    If someone could post their project section out of msconfig.cfg that would be a big help as im not sure what i should see here.

    Cheers

  • Here is the debug for the system im on at the moment. As you can see the project is undefined as well as a fwe other things. Is this because of the MSCONFIG.cfg line strings being incorrect? Any help would be great i have been fighting with this to get it working.

    Cheers again guys

    [admin note: article edited to replace posted content with an attached file]

  • Here is the debug for the system im on at the moment. As you can see the project is undefined as well as a fwe other things. Is this because of the MSCONFIG.cfg line strings being incorrect? Any help would be great i have been fighting with this to get it working.

    Cheers again guys

    [admin note: article edited to replace posted content with an attached file]

Reply Children
No Data