powered by CADENAS

Manual

Manual

8.4.2.3. Example

An example will explain in detail all steps that are required for displaying an alternatively shortened 2D view. In order to further clarify the effect, an easy long pipe is selected. The length ("HUB") is to be displayed alternatively shortened. To do this, a further variable ("HUB2D") is needed.

[Note] Note

The example can be found in the training catalog under "shortened view".

Do the following:

  1. As starter a pipe with the variables "HUB" for Length (Width) and "D" for diameter is used.

    Expand the table in PARTeditor:

    1. Apply the alternative variable for the shortened 2D view, which is entered as Control variable in PARTproject (in the following example "HUB2D")

    2. Apply a column with Default value for control variable (in the following example "XHUB")

    Columns for alternative measurement: "HUB2D" and "XHUB"

    Columns for alternative measurement: "HUB2D" and "XHUB"

  2. Draw a rectangle in the sketch via Rectangle (point, width and height).

    Field entry with IF condition

    Field entry with IF condition

    In the input field Width, do not use the usual entry "HUB", but the following with the condition:

    IF HUB2D = 0 THEN HUB ELSE XHUB ENDIF

    If "HUB2D" equals '0' , then the variable "HUB" is used, otherwise variable "XHUB". In the standard view "HUB2D" = '0', but if you switch to shortened view, then variable "HUB2D" is assigned the default value "XHUB", in other words it is now no longer equal to '0'. Thus, "XHUB" is now used in the input field Width.

    For the height use 'D/2'.

  3. Set the connection points. These may also be used for automatic dimensioning.

    [Note] Note

    Make sure that all features,which are related to "HUB2D", also use a corresponding IF condition. Otherwise, a connection point, which is normally located on a "Reference plane" is suddenly floating around as soon as the shortened view is turned on.

    IF HUB2D = 0 THEN HUB ELSE XHUB ENDIF

    Shortened view

    Shortened view

  4. Set the following entries for the single part or assembly projects (see Fig. „Alternative 2D size“) funder PARTproject -> Edit project -> tab page General1 -> section Alternative 2D size:

    1. Control variable

    2. Default value for control variable

    This entry causes,

    1. the option field Shortened view to be displayed in the user interface on the 2D view dialog window.

    2. that program internally, an alternative value is calculated with.

    Shortened view

    Shortened view

    Alternative 2D size

    Alternative 2D size

  5. Optionally, you may set the automatic dimensioning. The displayed measure should not change when turning on the shortened view! Therefore, no IF condition is used for "text", but "hub".

    A detailed description of automatic dimensioning can be found under ???.

    CUSTOMDIMENSIONS {
      HORIZONTAL {
        PNT1 { CONPNT { "vorne" } }
        PNT2 { CONPNT { "hinten" } }
        POSITION { BBOXOFFSET{ 15 } }
        FONTHEIGHT { 3.5 }     
        TEXT { "{HUB}" }  
      }
    }

  6. Result:

    • Shortened view turned off

      Shortened view turned off

    • Shortened view turned on

      Shortened view turned on

  7. In order to visualize the Shortened view, add a sketch with a "cosmetic drawing" on the same plane as the main sketch (in this example plane XY).

    For the curved line, use the function Arc through 3 points on circle.

    For the positioning of the points, use the variable for the shortened hub ("XHUB").

    XHUB/2

    Positioning the points along the help line

    Positioning the points along the help line

    In order for the help lines to only be visible in the Shortened view, use the function Delete element with condition with the following condition:

    HUB2D = 0

    Shortened view turned on

    Shortened view turned on

    Shortened view turned on

    Shortened view turned on