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

RE: [V8i vba] how to tell if your cursor is to the left or right of a point in a rotated view

$
0
0

good morning
I had the same problem long ago
solved with help here
I enclose part of a macro
where you see how to fix it

Dim oView As view
Dim mat As Matrix3d
Dim rotation As Matrix3d
Dim transform As Transform3d

' find the rotation of the view

 rotation = Matrix3dTranspose(ActiveDesignFile.Views(1).rotation)

' calculating the transformation

transform = Transform3dFromMatrix3dAndFixedPoint3d(rotation, p(0))   ' p(0)  point on which to rotate




 Set Line1 = CreateLineElement1(Nothing, p())
        Line1.transform transform                                    ' after entering the elements apply the transformation
        Line1.Color = 7
        Line1.Redraw DrawMode
        
        Pa(0) = p(0)
        Pa(1) = p(1)
        Pa(2) = p(2)
        
        
        
        
        
        rot = Matrix3dFromAxisAndRotationAngle(2, 0)
       
        origine.X = Pa(1).X
        origine.Y = Pa(1).Y + 0.015 * fsx / 100
        
        Set testo = CreateTextElement1(Nothing, Format(distmincalc, "0.00"), origine, rot)
        testo.transform transform
        testo.Color = 6
        testo.Redraw DrawMode

I hope can help

Ciao


Viewing all articles
Browse latest Browse all 7260

Trending Articles



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