How to use MicroStationDeveloperShell.bat in MicroStation CONNECT Edition 12 SDK?

Hello,

how to use MicroStationDeveloperShell.bat? I already read the readme file and watched the bentley youtube tutorial but i have no clue how to get it working. Maybe i missed something.

  1.  The first thing i tried was running the "MicroStation CONNECT Edition SDK" shortcut from the windows start menu as administrator. After some seconds the cmd windows completed with scanning the drives of the pc. As mentioned in the tutorial video i tried to start visual studio with the devenv command. But no luck only the following error message: The command "devenv" is either misspelled or
    could not be found.

   

2. The second thing i tried was using the MicroStationDeveloperShell.bat directly with the following command: MicroStationDeveloperShell.bat "E:\Program Files\Bentley\MicroStation CONNECT Edition\MicroStation\", "E:\Program Files\Bentley\MicroStationCONNECTSDK\"

The only result i get is a repeating error message: The command "E: \ Program" is either misspelled or
could not be found.

Any suggestions what i'm missing?

Thanks 

Christian

Parents
  • The only result i get is a repeating error message: The command "E:\Program" is either misspelled or
    could not be found

    That's a Windows message.  You passed something like E:\Program Files\folder name\etc to a Windows app. such as Dir.  Windows interprets the first space as a delimiter.  You have to wrap paths or file names that contain spaces in double-quotes...

    E:\>Dir "E:\Program Files\folder name\etc"

     
    Regards, Jon Summers
    LA Solutions

  • Thank you for your reply. What i passed to the batch file is "E:\Program Files\Bentley\MicroStation CONNECT Edition\MicroStation\" and "E:\Program Files\Bentley\MicroStationCONNECTSDK\" so its wrapped with double-quotes. 

    If i call the MicroStationDeveloperShell.bat without any parameters the error "The command "E:\Program" is either misspelled or
    could not be found" is raised too.

  • Thanks for you reply. The blank in the path is the problem, i reinstalled microstation and the sdk to a path without blanks. Wondering why the Bentley standard path contains blanks.

    Thanks for your hint.

  • What i passed to the batch file is "E:\Program Files\Bentley\MicroStation CONNECT Edition\MicroStation\"

    One ugly way to avoid the problem is to use DOS-style mangled names.  This article tells you more.

    there exist some "mangle.bat" from thats really helpful

    My article tells you how to create mangled path names manually and about mangle.bat.

    Wondering why the Bentley standard path contains blanks.

    Because, as a Microsoft partner, they must conform to Windows standards.  MicroStation itself is no problem; it's the SDK that remains sensitive to paths-with-spaces. Spaces have been permitted in Windows paths since Windows NT was introduced in 1993.

     
    Regards, Jon Summers
    LA Solutions

  • Wondering why the Bentley standard path contains blanks.

    Bentley is Gold / Platin / Iron or what ever partner of Microsoft. So they need to support the standards of Microsoft Windows. 

    BTW there exist some "mangle.bat" from  thats really helpful. 

    Mit freundlichen Grüßen / Best regards
    Volker Hüfner

    |  AB_DATE Engineering  Software   |  ab-date.de  |

  • Wondering why the Bentley standard path contains blanks.

    Because paths with spaces are standard Windows feature. The problems discussed here are not Bentley or MicroStation problem, but in my opinion more a heritage and consequence of using batch scripts in Windows shell. Compilers, Visual Studio and other tools have no problems with the spaces.

    I use standard MicroStation location and have not any problem with spaces (ok, at some places I use old 8.3 syntax, but not everywhere), so it's often a coincidence of more settings and issues.

    With regards,

      Jan

  • Hi Christian,

    I presume the issue you are seeing is due to not having Microsoft 8DOT3 enabled for the file system drives your MicroStation product and MicroStation SDK directories are installed under.  Most existing make files and build tools (not passed properly quoted paths with spaces) to date otherwise rely on this (legacy) behavior at this time.

    As a test/confirmation, can you provide the output from this command?  I will likely add a similar test as part of future SDK validation step.

    for %a in ("%SDK%" "%MS%" C: D: E:) do @fsutil 8dot3name query %~da >nul && echo Location: %a (8dot3name: ENABLED) || echo Location: %a (8dot3name: N/A)

    I would suggest to enable Microsoft 8DOT3 file system support for both the MicroStation and MicroStation SDK product directories then run the MicroStation Developer Shell as administrator again and try to recompile the delivered examples (buildallexamples.bat) once enabled.

    To enable Microsoft 8DOT3 file system (drive) behavior and to create 8DOT3 file system entries in the FAT please refer to the Microsoft FSUTIL.exe online help topic.

    HTH,
    Bob



  • Thanks for your reply. The result is the following:

    Location: "%SDK%" (8DOT is DISABLED)
    Location: C: (8DOT is DISABLED)
    Location: D: (8DOT is DISABLED)

  • But a hint somewhere in the SDK readme would be really nice.

  • Take care, the script from will not work on a German Windows ;-)
    Just try: fsutil 8dot3name query c: with every Drive Letter you use, You will get some German notation like:

    fsutil 8dot3name query c:
    Der Volumestatus ist 0 (8dot3-Namenerstellung ist aktiviert).
    Der Registrierungsstatus ist "2" (Standardeinstellung "Pro Volume").
    
    Aufgrund der oben angegebenen Einstellungen ist die Erstellung von 8dot3-Namen auf "c:" aktiviert.
    

    Mit freundlichen Grüßen / Best regards
    Volker Hüfner

    |  AB_DATE Engineering  Software   |  ab-date.de  |

  • Hi ,

    Thank you for your feedback. The original snip/test above as you can imagine was a quick pass/test.  With your feedback I have updated it above hopefully to be slightly more useful/effective.  If you like to test and let me know if the modified version works on your localized OS, I would appreciate the feedback too.

    for %a in ("%SDK%" "%MS%" C: D: E:) do @fsutil 8dot3name query %~da >nul && echo Location: %a (8dot3name: ENABLED) || echo Location: %a (8dot3name: N/A)

    Thank you again,
    Bob



  • Hi

    I guess there is still a little bug. 

    for %a in ("%SDK%" "%MS%" C: D: E:) do @fsutil 8dot3name query %~da >nul && echo Location: %a (8dot3name: ENABLED) || echo Location: %a (8dot3name: N/A)
    Location: "%SDK%" (8dot3name: ENABLED)
    Location: "%MS%" (8dot3name: ENABLED)
    Location: C: (8dot3name: ENABLED)
    Location: D: (8dot3name: ENABLED)
    Location: E: (8dot3name: N/A)
    seems good on the first view, But drive 'D:' says 'deaktiviert'  == 'disababled'.

    C:\tmp>for %a in ("%SDK%" "%MS%" C: D: E:) do @echo %~da %a & @fsutil 8dot3name query %~da
    C: "%SDK%"
    Der Volumestatus ist 0 (8dot3-Namenerstellung ist aktiviert).
    Der Registrierungsstatus ist "2" (Standardeinstellung "Pro Volume").
    
    Aufgrund der oben angegebenen Einstellungen ist die Erstellung von 8dot3-Namen auf "C:" aktiviert.
    C: "%MS%"
    Der Volumestatus ist 0 (8dot3-Namenerstellung ist aktiviert).
    Der Registrierungsstatus ist "2" (Standardeinstellung "Pro Volume").
    
    Aufgrund der oben angegebenen Einstellungen ist die Erstellung von 8dot3-Namen auf "C:" aktiviert.
    C: C:
    Der Volumestatus ist 0 (8dot3-Namenerstellung ist aktiviert).
    Der Registrierungsstatus ist "2" (Standardeinstellung "Pro Volume").
    
    Aufgrund der oben angegebenen Einstellungen ist die Erstellung von 8dot3-Namen auf "C:" aktiviert.
    D: D:
    Der Volumestatus ist "1" (Erstellung von 8dot3-Namen ist deaktiviert).
    Der Registrierungsstatus ist "2" (Standardeinstellung "Pro Volume").
    
    Aufgrund der oben angegebenen Einstellungen ist die Erstellung von 8dot3-Namen auf "D:" deaktiviert.
    E: E:
    Fehler:  Das System kann die angegebene Datei nicht finden.

    I guess fsutil sets errorlevel only if the drive does not exist.

    Mit freundlichen Grüßen / Best regards
    Volker Hüfner

    |  AB_DATE Engineering  Software   |  ab-date.de  |

Reply
  • Hi

    I guess there is still a little bug. 

    for %a in ("%SDK%" "%MS%" C: D: E:) do @fsutil 8dot3name query %~da >nul && echo Location: %a (8dot3name: ENABLED) || echo Location: %a (8dot3name: N/A)
    Location: "%SDK%" (8dot3name: ENABLED)
    Location: "%MS%" (8dot3name: ENABLED)
    Location: C: (8dot3name: ENABLED)
    Location: D: (8dot3name: ENABLED)
    Location: E: (8dot3name: N/A)
    seems good on the first view, But drive 'D:' says 'deaktiviert'  == 'disababled'.

    C:\tmp>for %a in ("%SDK%" "%MS%" C: D: E:) do @echo %~da %a & @fsutil 8dot3name query %~da
    C: "%SDK%"
    Der Volumestatus ist 0 (8dot3-Namenerstellung ist aktiviert).
    Der Registrierungsstatus ist "2" (Standardeinstellung "Pro Volume").
    
    Aufgrund der oben angegebenen Einstellungen ist die Erstellung von 8dot3-Namen auf "C:" aktiviert.
    C: "%MS%"
    Der Volumestatus ist 0 (8dot3-Namenerstellung ist aktiviert).
    Der Registrierungsstatus ist "2" (Standardeinstellung "Pro Volume").
    
    Aufgrund der oben angegebenen Einstellungen ist die Erstellung von 8dot3-Namen auf "C:" aktiviert.
    C: C:
    Der Volumestatus ist 0 (8dot3-Namenerstellung ist aktiviert).
    Der Registrierungsstatus ist "2" (Standardeinstellung "Pro Volume").
    
    Aufgrund der oben angegebenen Einstellungen ist die Erstellung von 8dot3-Namen auf "C:" aktiviert.
    D: D:
    Der Volumestatus ist "1" (Erstellung von 8dot3-Namen ist deaktiviert).
    Der Registrierungsstatus ist "2" (Standardeinstellung "Pro Volume").
    
    Aufgrund der oben angegebenen Einstellungen ist die Erstellung von 8dot3-Namen auf "D:" deaktiviert.
    E: E:
    Fehler:  Das System kann die angegebene Datei nicht finden.

    I guess fsutil sets errorlevel only if the drive does not exist.

    Mit freundlichen Grüßen / Best regards
    Volker Hüfner

    |  AB_DATE Engineering  Software   |  ab-date.de  |

Children