Geopak VBA for COGOProfilePort

I am trying to pick a Geopak Profile Cell and get the Station and Elevation of that cell. The description of the DesignOrigin property seems to describe this but it is confusing. According to the help the Point3d returned,

Gets the point in the design coordinates system which corresponds to the Origin of the~tDrawingPort in the MicroStation model.
In case of a CogoProfilePort for example, the Origin property corresponds to the origin of the cell in the MicroStation model, and the DesignOrigin correponds to the corresponding point in the CogoChain profile, with:
- X = absolute station (DistanceAlong) along the chain
- Y = elevation 

So how is the station and elevation returned? By the X and Y? What would the example be?

Station = profilePort.DesignOrigin.x?

Also, how much of this will change with Open Roads?

Parents
  • You are correct, the DesignOrigin.X is the 'DistanceAlong', or you could use profilePort.StationRegion to get the actual station and region values. The DesignOrigin.Y is the elevation of the profile cell origin. So, if I want to show the formatted station value I would use profilePort.StationRegion.GetFormattedString. The elevation (Y value) can be formatted however you like, but I typically use the built-in function: FormatDistance(profilePort.DesignOrigin.Y).
Reply
  • You are correct, the DesignOrigin.X is the 'DistanceAlong', or you could use profilePort.StationRegion to get the actual station and region values. The DesignOrigin.Y is the elevation of the profile cell origin. So, if I want to show the formatted station value I would use profilePort.StationRegion.GetFormattedString. The elevation (Y value) can be formatted however you like, but I typically use the built-in function: FormatDistance(profilePort.DesignOrigin.Y).
Children