Hey Everyone,
I'm developing a plug-in for Microstation that inserts several text elements in the Active Model. It seems that everything I insert, the units (such as Point3dOrigin(71,44,0))
end up being multiplied by 39.73 even though the Master and Subunits in the design file settings are both set to "inch". Anyone have any idea what I'm doing wrong?
Here is a sample of code
Dim rotmatrix As B_Interop_UstnDGN.Matrix3d Dim pt3dOffSet As B_Interop_UstnDGN.Point3d Dim pt3dOrigin As B_Interop_UstnDGN.Point3d Dim el As B_Interop_UstnDGN.TextElement rotmatrix = ActiveUstn.Matrix3dIdentity pt3dOrigin.X = 71 pt3dOrigin.Y = 44 pt3dOrigin.Z = 0 pt3dOffSet.X = 0 pt3dOffSet.Y = -0.5 pt3dOffSet.Z = 0 'start in upper left corner For Each row_Tags As DataRow In datatbl_Tags.Rows el = ActiveUstn.CreateTextElement1(Nothing, row_Tags.Item("name").ToString, pt3dOrigin, rotmatrix) el.Redraw() ActiveUstn.ActiveModelReference.AddElement(el) pt3dOrigin = ActiveUstn.Point3dAdd(pt3dOrigin, pt3dOffSet) Next
Thanks
Dave
Please reveal the version of MicroStation!
Unknown said: The units end up being multiplied by 39.73
The units end up being multiplied by 39.73
If that number were 39.37 I'd postulate a metres-to-inches conversion.
Regards, Jon Summers LA Solutions
Microstation V8i(Select Series 4). Yes I believe it is 39.37.
Hi Dave,
Unknown said:Anyone have any idea what I'm doing wrong?
In my opinion there is nothing wrong with your code and because master units are used in VBA COM API, it should work as you described.
Some questions to better understand your configuration and environment and also ideas what you can try:
Unknown said:Here is a sample of code
A few notes about the code, a bit more in a subjective way "how the code is written":
With regards,
Jan
Bentley Accredited Developer: iTwin Platform - AssociateLabyrinth Technology | dev.notes() | cad.point