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.
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.