4.13.11 Tutorial: Define Calculated Codes

<< Click to Display Table of Contents >>

Navigation:  4. Additional Features > 4.13 The Code Definition Window >

4.13.11 Tutorial: Define Calculated Codes

Additional Features > The Code Definition Window

In this tutorial we will define two calculated codes: ‘Vert. Mom.’ and ‘Weight with Margin’. This tutorial builds on Chapter Tutorial: Add Custom Codes.

Open the Items window and load the setting New setting.

Next, open the Code Definition window by selecting Code Definition… on the View menu.

Add code C03 with these values:

Field

Value

CodeType

C03

Title

Vert. Mom.

Description

Vertical moment

FieldSize

20

Calculate

[Weight]*[VCG]

Tab

Right

Format

%.3f

FieldType

ReadOnly

Next, add code C04:

Field

Value

CodeType

C04

Title

Weight with Margin

Description

Weight multiplied with margin based on Weight Status code

FieldSize

20

Calculate

[Weight]*[C02].[Factor]

Tab

Right

Format

%.3f

FieldType

ReadOnly

CodeDefinitionWnd6

Click the Close button. Back in the Items window, select Items settings on the Settings menu.

In the Item setting window, expand the New setting, Single view branch and the Hidden group. Move the codes C03 and C04 from the Hidden group to the Codes group. Also, expand the Table view branch and move the codes C03 and C04 from Hidden to Codes.

ItemSettingWnd9

 

Close the Item setting window.

Back in the Items window; add a weight item with these values:

 

Field

Value

UnitWeight

1000

VCG

10

C02 – Weight Status

E

Now, the calculated codes should be:

Field

Value

C03 – Vert. Mom.

10000

C04 – Weight with Margin

1100

ItemWnd2