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 Point3dmyPoint.X = "120127:1.59600"myPoint.Y = "119952:3.37943"myPoint.Z = 0
Thanks,
Paul
Hi,
why do you need to work with coordinates displayed in Element Information dialog? As Maury wrote, can you explaing what do you want to achieve?
All coordinates are stored as decimal numbers in MicroStation. If you need to work with cultural-specific formating (like English feet:inches style), I guess you have to write own conversion function.
With regards,
Jan
Bentley Accredited Developer: iTwin Platform - AssociateLabyrinth Technology | dev.notes() | cad.point
Hi Paul,
Unknown said:I am testing self referencing
I have to say I still don't understand completely how self referencing testing depends on what is displayed in Element Information dialog.
When working with VBA, all coordinates are expressed as Point3D and decimal numbers, independently if they are displayed in feet and inches or meters. And I guess all possible information about coordinates are accessible using VBA API. Or does the point belongs to element that is not accessible by a standard way?
Can you access the element e.g. using selection set? It's easy to work with selected elements from VBA and you don't have to take care about formating.
Another question is how do you access the information displayed in Element Information dialog? Using Property Handler? If yes (I guess there is no other way how to do it), what will happen if you will try to use GetValueAsPoint3d method? I have never used it, but it looks like what you need.
ok, and where the point1 comes from?
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.