InputItemArray with False EditableCount - HiStructClient/femcad-doc GitHub Wiki

InputItemArray

There are two types of InputItemArray: with EditableCount True and False.

The InputItemArray with False EditableCount displays mulitple rows of InputItems - rows are defined in ClassItems property of InputItemClass. Definition of the InputItemClass could look like this:

InputItemClassType_PeakLoadOther := res.fit.InputItemClass{
   ClassTypeName  := "ClassType_PeakLoadOtherPrototype",
   HumanName      := "Peak load other",
   ClassItems     := [ 
      res.fit.InputItemDouble{
        HumanName := "Major dead load Fz",
        DefaultUnitString := "kN",
        Value     := 0,
        Identifier := "inMajorDeadLoadFz",
        },
      res.fit.InputItemDouble{
        HumanName := "Minor dead load Fz",
        DefaultUnitString := "kN",
        Value     := 0,
        Identifier := "inMinorDeadLoadFz",
        },
      res.fit.InputItemDouble{
        HumanName := "Major live load Fz",
        DefaultUnitString := "kN",
        Value     := 0,
        Identifier := "inMajorLiveLoadFz",
        },
   ] }

The values of row input items are stored in ClassTypePrototype variable: ClassType_PeakLoadOtherPrototype := { ClassTypeName := "ClassType_PeakLoadOtherPrototype", inMajorDeadLoadFz := 0, inMinorDeadLoadFz := 0, inMajorLiveLoadFz := 0, }

And final InputItemArray with EditableCount := False looks like this:

InputClass_PeakLoadOther := res.fit.InputItemArray{
   NameSpace         := NameSpace + "InputClass_PeakLoadOther.",
   HumanName         := "Peak load other",
   Identifier        := NameSpace + "inPeakLoadOthersValues",
   EditableCount     := True,
   EditDisableDelete := True,
   ElementPrototype  := InputItemClassType_PeakLoadOther.ParameterItem,
   ElementPrototypes := [InputItemClassType_PeakLoadOther].Select(item => item.ParameterItem),
   VisibilityCondition := inPeakLoadUsed == 10,
   #Actions           := Actions
   } 

The CtArray with stored values is then obtained with variable:

storedCtArray := [ClassType_PeakLoadOtherPrototype]