Is there any way to select and attach a Geographical Coordinate System using VBA in Microstation. I would like to create a macro that can be used in batch processing to apply the Geographical Coordinate system to DGN's
The GeographicCoordinateSystem Object was added to the latest SelectSeries 3. Check the help file to make sure that this is available to your version. I would then use the ActiveModelReference.GetGCS method to get the current system and WriteGCS to add a system.
HTH,
mark anderson [Bentley]
Visit me at https://communities.bentley.com/communities/other_communities/bentley_innovation/default.aspx
OK I do have the latest release. I will take a look at this more. At first glance it appeart to get the GCS that is already applied model. I was hoping to go to the GSC library and assign a GCS to the model.
Mike LongstreetVermont Agency of TransportationCivil Engineering Technical SupportVTCAD Help
You may want this method on the Application Object CreateGCSFromKeyName Then you use the WriteGCS method on the ActiveModelReference.
Answer Verified By: Mike Longstreet
Sample VBA example, which Mark.Anderson is referring to.
Sub SetGCS() Dim newGCS As GeographicCoordinateSystem Set newGCS = Application.CreateGCSFromKeyName("UTM83-12") ActiveModelReference.WriteGCS newGCS, True, False End Sub
Regards,Leonard Jones.