assign a point variable to a specific point

I want to assign a point variable to a specific point - here is the point cooridinates:

The colon I am not sure what to do with it.

How do I assign this in VBA?

Dim myPoint As Point3d
myPoint.X = "120127:1.59600"
myPoint.Y = "119952:3.37943"
myPoint.Z = 0

Thanks,

Paul

Parents Reply Children
  • Hi Paul,

    ok, and where the point1 comes from?

    • If it exists in a design file, you should access it using MicroStation VBA API, so you will receive Point3d automatically. No reason for conversion.
      Because you did not write any information what your "point" in the design file is, it's hard to recommend what VBA function to use.
      This is standard and preferred way.
    • If you, from any reason, really want to access the values displayed in Element information dialog, you have to use PropertyHandler and I think you can try GetValueAsPoint3d method.
    • If you want to enter it as fixed value in your code, you have to convert feet:inches format to decimal feet value yourself.

    But I guess it doesn't work neither, because reference point has to be express, accordingly to MicroStation VBA help, in UORs, not in master units. So you have to add another conversion from (master units) Point3d to (UOR) Point3d value. There is UORsPerMasterUnit property available that makes the conversion possible.

    With regards,

      Jan