Keyin for attaching a geographic coordinate system from a file

According to the Help, the geographic coordinate system can be assigned from an existing file by using the keyin "GEOCOORDINATE SELECT FILE". Can the name of the file be specified in the keyin? When I try adding the file name to the end of the keyin, I am still prompted to select a file. I would like to set the GCS from a file without the user needing to select the file.

  • Change the syntax to:

    GEOCOORDINATE ASSIGN EPSG:102676

     

    substituting your GCS Name for the bold text in the example.



  • Specifying the GCS name does not allow me the option to select the Vertical Datum. By selecting the GCS from a file, we can pre-define the properties which cannot be set from a key-in.
  • Unknown said:
    Specifying the GCS name does not allow me the option to select the Vertical Datum. By selecting the GCS from a file, we can pre-define the properties which cannot be set from a key-in.

    I assume you want this so you can batch process a number of files... why not try and build a vba macro from the macro recorder recording you doing all the steps manually then run the macro over a different file to test it works  if it works you can now either  examine inside the macro and work out the  keyins required  or  just let the batch processor  run and rerun the macro for you over your selected files...may not be elegant  programing but it works most of the time... if not then some tweaks may still be needed  like mdl silent  so the dialogs dont pop and wait for  data points.. etc.... if you still cant get it to work then repost your  macro on the programing forum and ask for advice... lots of good  help there...

    Lorys

    Started msnt work 1990 - Retired  Nov 2022 ( oh boy am I old )

    But was long time user V8iss10 (8.11.09.919) dabbler CE  update 16 (10.16.00.80) 

    MicroStation user since 1990 Melbourne Australia.
    click link to PM me 

  • VerticalDatumName is a read only property. You will not be able to set/assign a new value through VBA.
    myGCS.VerticalDatumName

          

  • I started here trying to find a keyin for selecting the desired vertical datum so I could avoid the need for a macro to accomplish the task.
    Over the years our survey crews have used two different horizontal and two different vertical datums. This leaves us with four possible settings for the drawing's GCS. We created a variable in the project's PCF to indicate the correct setting for that project. When the user opens the drawing, we want the macro to check the current settings against the variable definition and correct the GCS if necessary. This would be simple if there was a way to specify which vertical datum was to be applied. Unfortunately, it appears that the only way to control that setting is by using the option to select the GCS from an existing file. Now the trick is finding the way to have a program select that file so the user doesn't have to click the OK button on the file selection box.
    Doing this with the old BASIC macro language works fine. However, we want the flexibility to perform other checks and handle different types of drawings differently. To do this we are trying to make it work with VBA. I recorded the macro in VBA and expected the same results. I cannot get it to choose the file to be used for the GCS without the user being prompted to make the file selection.