Quantcast
Channel: MicroStation Programming Forum - Recent Threads
Viewing all articles
Browse latest Browse all 7260

RE: [Connect VBA] Problem with rotation matrix3d

$
0
0
Hi,

I have tried to understand what exactly happens, but a couple of variables are not defined within the code snipped, so it´s a lot of assuming.
So I tried to reduce the problem and created my own code example using your approach trying to simulate the situation:

    Dim hoek As Double
    Dim Rotatie As Matrix3d
    Dim Axis As Point3d
    Dim oText As TextElement
        Axis.X = 0
        Axis.Y = 0
        Axis.Z = 1
        hoek = Atn(0.5)  ' arbitrary angle: 26.565051177078° rotation
        Rotatie = Matrix3dFromVectorAndRotationAngle(Axis, hoek)
        Set oText = CreateTextElement1(Nothing, "hello", Point3dZero, Rotatie)
        ActiveModelReference.AddElement oText

And tested this in both V8i SS4 and Connect Upd2. The result was in both releases the same and correct. The text is rotated around the origin of the text.
Do you get different results with this code example?

If this doesn´t help to explain the issue, could you please upload a complete example to allow us to reproduce this issue?

Thanks
Artur


Viewing all articles
Browse latest Browse all 7260

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>