5.10.1.2. Example

All the steps required to display an alternative abbreviated 2D view will be explained in detail using an example. To illustrate the effect, a greatly simplified block cylinder has been selected. The cylinder length ('HUB') is to be displayed in a shortened alternative. This requires two additional variables as control variables [Control variable] (here in the example 'HUB2D') and as default values for control variables [Default value for control variable] (here in the example 'XHUB'). After activating the Optimize drawing view on sheet [Optimize drawing view on paper size] option, the value of the XHUB variable is used to calculate the cylinder length in the 2D view.

[Note]Note

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

At first a part is designed, then this is used in an assembly.

Proceed as follows:

  1. As starter a cylinder with the variables 'HUB' for length and 'D' for diameter is used.

    Expand the table in PARTdesigner:

    1. Create the alternative variable for the shortened 2D view, which is entered in PARTproject as a control variable [Control variable] (in the following example 'HUB2D')

      [Important]Important

      Always create the variable with the status [Status] "Value range variable [Value range variable] ".

      The activation changes the value of 'HUB2D'. So it may not be set to a fixed value.

    2. Create a variable as the default value for the control variable [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. Adjust the length of the cylinder.

    For the length 'HUB' had been used by default.

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

    IF HUB2D = 0 THEN HUB ELSE XHUB ENDIF

    Field entry with IF condition

    Field entry with IF condition

    If 'HUB2D' equals '0' (this is the default state), then the variable 'HUB' is used.

    By activating the option Optimize drawing view on sheet [Optimize drawing view on paper size], HUB2D is set to a value not equal to '0'. This is the reason why the variable must not have a fixed value, but must be declared as a value range variable.

    However, if HUB2D is not equal to '0', then 'XHUB' is used to calculate the width [Width].

    For height [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 cylinder project under PARTproject -> Edit project -> General tab -> Alternative 2D size section:

    1. Control variable: Here in the example 'HUB2D'

    2. Default value for control variable: Here in the example 'XHUB'

      Depending on the requirements also a fixed value can be set for the project's default value.

    Alternative 2D size

    Alternative 2D size

    This entry effects,

    1. that in PARTdataManager, in the 2D view, the option field Optimize drawing view on sheet [Optimize drawing view on paper size] (Shortened view [Shortened view] ) is not grayed out but can be activated

      Optimize drawing view on sheet [Optimize drawing view on paper size] (shortened view [Shortened view] )

      Optimize drawing view on sheet [Optimize drawing view on paper size] (shortened view [Shortened view] )

      and

    2. that the alternative variable (control variable [Control variable] ) is calculated internally in the program.

  5. Optionally, you can set automatic dimensioning. The displayed dimension should not change when the shortened view is switched on! For this reason, no IF condition is used for text [Text], not even {AUTOMATIC}, but '{HUB}'.

    A detailed description of automatic dimensioning can be found under Section 7.16, “ Docking window "Dimensions " ”.

  6. To visualize the abbreviated view [Shortened view], insert a sketch with a "cosmetic drawing" on the same layer as the one used for the main sketch (here in the example Plane XY ).

    Use the function Arc over 3 points on perimeter [Arc through 3 points on circle] for an arc line.

    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

    To ensure that the guidelines are only visible when the Optimize drawing view on sheet [Optimize drawing view on paper size] option is activated, use the Conditionally delete element [Delete element with condition] function with the following condition:

    HUB2D = 0

    'HUB2D=0' is according to the default setting. In this case it shall be deleted. Only if the value of variable 'HUB2D' is unequal to '0', the sketch shall not be deleted, meaning the cosmetic drawing shall be visible.

    Condition for cosmetic drawing

    Condition for cosmetic drawing

  7. Result:

    [Note]Note

    Testing the Optimize drawing view on sheet [Optimize drawing view on paper size] function (Shortened view [Shortened view] ) only works in the PARTdataManager, not in the PARTdesigner.

    • Optimize drawing view on sheet [Optimize drawing view on paper size] (shortened view [Shortened view] ) switched off

      Optimize drawing view on sheet [Optimize drawing view on paper size] (shortened view [Shortened view] ) switched off

    • Optimize drawing view on sheet [Optimize drawing view on paper size] (shortened view [Shortened view] ) switched on

      Optimize drawing view on sheet [Optimize drawing view on paper size] (shortened view [Shortened view] ) switched on

  8. Now the cylinder is used in an assembly. In this example a vastly simplified configuration consisting of one cylinder and two blocks is used.

    Block cylinder configuration

    Block cylinder configuration

    1. As the cylinder contains value ranges (HUB and HUB2D), please remember to make the value range assignments [Value range assignments].

    2. Create the dimensioning, this time for the assembly.

    3. This time, enter the alternative 2D size [Alternative 2D size] for the assembly.

    4. Test the alternative 2D size for the assembly.

      "Optimize drawing view on sheet [Optimize drawing view on paper size] " ( "Shortened view [Shortened view] ") deactivated

      "Optimize drawing view on sheet [Optimize drawing view on paper size] " ( "Shortened view [Shortened view] ") deactivated

      "Optimize drawing view on sheet [Optimize drawing view on paper size] " ( "Shortened view [Shortened view] ") activated

      "Optimize drawing view on sheet [Optimize drawing view on paper size] " ( "Shortened view [Shortened view] ") activated