How to send keyin commands at startup?

I'm using v8i select series 10 and Connect edition.

I'm setting up a workspace for various clients. I have a startup file currently set to the shortcut. however, I want to be able to do this from the pcf file would be the best way so that it can variate per project. I'm not very good at writing vba or else that would be the best way. What is the best non vba way to do this? 

I can get by using a variation or keyins and simple vba executions, but i can't get the autostart.bas to run my keyins like the existing articles say to do. Most of my customs tools, dgnlibs, etc are built, just need to run some kind of startup file. Thanks

  • This is how i am specifying my startup file currently. In the Microstation target, -S, however, that runs off the Microstation icon. I can see if theres a way to specify this target somewhere else possibly. All i usually do is right click, properties, change the target line file to

    C:\UstnV8i\MicroStation\ustation.exe -sc:\temp\auto_load.txt

    and write that text file in that location, but i need this file to be able to variate based on the project. Guess i might need to get some vba help from someone like Steve West or a programmer that i've worked with before. 

  • There may be a Windows command-line switch that specifies a script file.  A script file is a  plain text file where you can place your MicroStation key-ins.

    I have CONNECT installed, but don't have V8i installed, so can't test that version.  When I type MicroStation.exe -? at a Windows command prompt I see this...

    Command Line Arguments for MicroStation.exe:
    
    -M                        - Specifies initial model to open.
    -R                               - Opens the design file in read-only mode.
    -O                               - Does not open any references.
    -QP                    - Specifies password for protected file.
    -S                 - Puts contents of the startup file into the command queue on startup.
    -I                   - Passes through parameters to INITAPPS.
    -RestoreDefaults[Quiet]          - Restore default settings and then exit. If Quiet added, no output displayed.
    -Debug                           - Shows configuration variables and then and exits.
    -WA             - Specifies MDL application to start at MicroStation initialization
                                       (same as setting MS_INITAPP).
    -WC  - Specifies the configuration file for MicroStation startup
                                       (for example, -wcC:\Bentley\Configuration\myconfig.cfg).
    -WD                    - Specifies database configuration.
    -WK                   - Specifies initial WorkSpace.
                                       If WorkSpace is specified, a child WorkSet must also be specified (using -WW).
    -WW                     - Specifies initial WorkSet.
                                       If WorkSet is specified, its parent WorkSpace must also be specified (using -WK).
    -WS      - Specifies a configuration variable to be defined at startup.
                                       (for example, -wsMS_SECURITY_LEVEL=HIGH).
    -WR                        - Specifies _USTN_CONFIGURATION (for example, -wrC:\Bentley\Configuration\).
    
    -help or -?                      - Displays Command line arguments for MicroStation.

    Line 5 documents the -S switch, which does what you want.

     
    Regards, Jon Summers
    LA Solutions