FCC InputItemArray
res.fit.InputItemArray describes an array of objects stored in PVC. Unlike scalar input items, it defines the schema of one array element without knowing the runtime item count.
The item count comes from PVC data at runtime. If the count must follow another parameter, use AssumptionParameters and AssumptionCondition; do not build the input page by iterating over runtime data such as garages.SelectIterate(...).
Basic Shape
myArray = res.fit.InputItemArray{
HumanName = "Transport types",
Identifier = "transportSelection.inTransportTypes",
EditableCount = False,
EditDisableDelete = True,
InputTypes = [ transportTypeInputItem ],
}
| Property | Purpose |
|---|---|
HumanName |
UI label |
Identifier |
Absolute PVC path to the array |
EditableCount |
Allows the user to add or remove elements |
EditInPlace |
Allows direct inline editing |
EditDisableDelete |
Prevents deleting array rows |
InputTypes |
Element schema, usually one InputItemClass or exported inputItem |
AssumptionParameters |
PVC identifiers that drive automatic count changes |
AssumptionCondition |
Predicate deciding whether assumptions should apply |
VisibilityCondition |
UI visibility predicate |
Actions |
Header actions/buttons |
CssStylePropValue |
Optional styling |
Count Assumptions
Use a hidden scalar count item when an array length should follow a computed or selected count.
eleCablesCount = res.fit.InputItemInteger{
HumanName = "CablesCount",
Identifier = "geometry.electricityMain.cablesGenerator.inCablesCount",
VisibilityCondition = "False",
}
eleCables = res.fit.InputItemArray{
HumanName = "Cables",
Identifier = "geometry.electricityMain.cablesGenerator.inCables",
VisibilityCondition = "False",
EditableCount = False,
EditDisableDelete = True,
AssumptionParameters = [
"geometry.electricityMain.cablesGenerator.inCablesCount"
],
AssumptionCondition = "o,n => o[0]<=n[0]",
InputTypes = [ inputs.actShared.cableInputType.inputItem ],
}
Register the count item before the array item:
ParameterItemClasses = [
eleCablesCount.ParameterItem,
eleCables.ParameterItem
]
o contains old assumption values from PVC, and n contains the new values. The condition o[0]<=n[0] grows the array when the new count is larger, but does not delete existing rows automatically.
Element Schema
For a strongly typed element, reference an exported inputItem from a gclass:
gclass {myInputType} filename "MyInputType.fcs"
myArray = res.fit.InputItemArray{
Identifier = "path.to.inMyArray",
InputTypes = [ myInputType.inputItem ],
}
For a small anonymous schema, define the element inline:
myItemInputItem = res.fit.InputItemClass{
HumanName = "Transport type",
ClassItems = [
res.fit.InputItemString{
HumanName = "Value",
Identifier = "inTransportType",
}
]
}
Inside the element class, identifiers are relative to one array element. The array's own Identifier remains the absolute PVC path.
PVC Shape
For an array identifier transportSelection.inTransportTypes and element field inTransportType, PVC paths look like this:
transportSelection.inTransportTypes[0].inTransportType = "EG-RL 215"
transportSelection.inTransportTypes[1].inTransportType = "Humbaur HUK 126020"
A constraint or trigger can write to a concrete row by composing the path:
comcon.constraintFn(
"transportSelection.inTransportTypes[" + garageIdx + "].inTransportType",
transportTypeName
)
Defaults in FCS
Because the input page definition does not know the runtime count, initialize both the array and a count scalar in the model or gclass:
inTransportTypes := garages.Count * [ { inTransportType := "" } ]
inTransportTypesCount := garages.Count
The repeated literal creates the default array. The scalar drives AssumptionParameters.
Common Mistakes
- Do not use runtime data iteration such as
garages.SelectIterate(...)to defineInputItemArrayrows. Input pages define schemas; navigation/runtime logic creates data-specific behavior. - Register the count scalar before the array item in
ParameterItemClasses. - Use relative identifiers inside the element
InputItemClass, such as"inTransportType". - Use an absolute identifier on the
InputItemArrayitself, such as"transportSelection.inTransportTypes". - Decide deletion behavior explicitly. The common assumption condition grows arrays but does not shrink them.
Known Source Examples
| Source | Array identifier | Count identifier |
|---|---|---|
GarageConfigurator/General/InputPageElectricity.fcs |
cablesGenerator.inCables |
cablesGenerator.inCablesCount |
GarageConfigurator/FemAnalysis/Analysis/InputPageFemAnalysis.fcs |
inFemBeamsColumns |
Editable count |
GarageConfigurator/Quote/TransportSelection.fcs |
transportSelection.inTransportTypes |
transportSelection.inTransportTypesCount |
CashBox.fcc/BuildingsComponentMain_updated.fcs |
inUserSettings |
Not count-driven |
See also 22-FCC-PLATFORM-INTEGRATION.md for the broader PVC and input-page lifecycle.