I have got another one for the experts ... :-)
Here's my situation:
The screenshot shows view1 and view2 - both show the same elements (a number of SmartSolid-Elements). View1 is a front view while view2 is top view.
I am looking for a way to zoom view2 so that the element appears in the same size ratio:
How can this be achieved?
Unknown said:How can this be achieved?
Think in terms of pixels. In view 1, find how many pixels correspond to your line of length 1234. Adjust view 2's zoom factor to achieve the same number of pixels for length 1234.
Regards, Jon Summers LA Solutions
Answer Verified By: quasi_modo
Unknown said: quasi_modo How can this be achieved? Think in terms of pixels. In view 1, find how many pixels correspond to your line of length 1234. Adjust view 2's zoom factor to achieve the same number of pixels for length 1234.
quasi_modo How can this be achieved?
Thanks Jon - this was the point for me!!!
Now I do the following:
Dim vw1pt As Point2d Dim vw2pt As Point2d Dim vw1pt_end As Point2d Dim vw2pt_end As Point2dDim Dist1 as DoubleDim Dist2 as Double vw1pt = ActiveDesignFile.Views(1).GetPixelPosition(Mittelachse.StartPoint, True) vw2pt = ActiveDesignFile.Views(2).GetPixelPosition(Mittelachse.StartPoint, True) vw1pt_end = ActiveDesignFile.Views(1).GetPixelPosition(Mittelachse.EndPoint, True) vw2pt_end = ActiveDesignFile.Views(2).GetPixelPosition(Mittelachse.EndPoint, True)Dim Dist1 As DoubleDim Dist2 As Double Dist1 = Point2dDistance(vw1pt, vw1pt_end)Dist2 = Point2dDistance(vw2pt, vw2pt_end)ActiveDesignFile.Views(2).Zoom (Dist2 / Dist1)ActiveDesignFile.Views(2).Redraw
This is the result:
Great!!!
Thanks a lot Jan & Jon!