How to configure 2 views to show an element in same size?

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?

Parents
  • Hi,

    I guess it would be (depending on specific conditions) not very complicated: Take an element (even a virtual), using both views parameters calculate how such element is displayed in the views (depending on rotation the size is different) and set parameters of the second view accordingly to this calculation.

    Some (pre)conditions exist

    • Only non-perspective view can be used.
    • The size is easy, the same position inside views as displayed in you example is completely different story, because insuch case you have to interact with window manage.
    • The view will be on the same monitor. To set the same element size on two different monitors (possibly different resolution, DPI etc.) is substantially more complex and not sure if even possible.

    I am not sure if VBA is enough, but as usually C/C++ APIs are much better to work with view parameters.

    Regards,

      Jan

  • Hi Jan,

    thanks for your response & your time!

    I could create a LineElement (from the beginning of first element on the left side to the end of the last element on the right side) like this:


    The length of this line is 3161.

    When I now measure the gaps on each side I get the following:

    View1:

    View2:

    The gap on each side in View1 is approx. 1637 while in View2 it is approx. 63


    How can I calculate the gaps? I thought that Line.Startpoint.X - View1.Origin.X should be the gap but it isn't ...

    I think I am a real dummy ...

  • Hi,

    in my opinion what you describe it's not the right approach, but please be aware it's based on off-hand thinking only.

    My idea how to implement the discussed functionality is:

    • (Imagine) There is a virtual element with length 100 (from 0,0,0 to 100,0,0)
    • View 1 rotation defines how this element will be displayed and it can be anything from 0% (point) to 100% (full length).

    It gives you a coefficient how elements are shortened because of a view rotation.

    • As Jon wrote, you also have to work with view sizes in master units and in pixels.

    The ratio between view size in units and pixels gives you another coefficient.

    Using these numbers you have to create a formula, which will tells you how many pixels long is this virtual element,

    For the second view you need similar formula, where the only variable is the view size in units. If you put both formulas equal (which is what happen if an element is displayed in the same size), the result will be size in units for the second view.

    With regards,

     Jan

    Answer Verified By: quasi_modo 

Reply
  • Hi,

    in my opinion what you describe it's not the right approach, but please be aware it's based on off-hand thinking only.

    My idea how to implement the discussed functionality is:

    • (Imagine) There is a virtual element with length 100 (from 0,0,0 to 100,0,0)
    • View 1 rotation defines how this element will be displayed and it can be anything from 0% (point) to 100% (full length).

    It gives you a coefficient how elements are shortened because of a view rotation.

    • As Jon wrote, you also have to work with view sizes in master units and in pixels.

    The ratio between view size in units and pixels gives you another coefficient.

    Using these numbers you have to create a formula, which will tells you how many pixels long is this virtual element,

    For the second view you need similar formula, where the only variable is the view size in units. If you put both formulas equal (which is what happen if an element is displayed in the same size), the result will be size in units for the second view.

    With regards,

     Jan

    Answer Verified By: quasi_modo 

Children
No Data