IFC 4.4.0.0 build 20261005 (IFC4X4_DEV_20260525) ⚠ buildingSMART Working Draft. All content is under development.

  • Help suggest improvements
  • Get user or developer support

8.11.6.2 IfcCorrectUnitAssignment

8.11.6.2.1 Semantic definition

The function returns true, if the set of Units within an IfcUnitAssignment only include units with different UnitType's (for IfcNamedUnit and IfcDerivedUnit), and a maximum of one IfcMonetaryUnit.

Argument definitions: Units : (input) the set of IfcUnit's.

8.11.6.2.2 Formal representation

FUNCTION IfcCorrectUnitAssignment
(Units : SET [1:?] OF IfcUnit)
: LOGICAL;
LOCAL
NamedUnitNumber : INTEGER := 0;
DerivedUnitNumber : INTEGER := 0;
MonetaryUnitNumber : INTEGER := 0;
NamedUnitNames : SET OF IfcUnitEnum := [];
DerivedUnitNames : SET OF IfcDerivedUnitEnum := [];
END_LOCAL;
NamedUnitNumber := SIZEOF(QUERY(temp <* Units | ('IFC4X4_DEV_20260525.IFCNAMEDUNIT' IN TYPEOF(temp)) AND NOT(temp\IfcNamedUnit.UnitType = IfcUnitEnum.USERDEFINED)));
DerivedUnitNumber := SIZEOF(QUERY(temp <* Units | ('IFC4X4_DEV_20260525.IFCDERIVEDUNIT' IN TYPEOF(temp)) AND NOT(temp\IfcDerivedUnit.UnitType = IfcDerivedUnitEnum.USERDEFINED)));
MonetaryUnitNumber := SIZEOF(QUERY(temp <* Units | 'IFC4X4_DEV_20260525.IFCMONETARYUNIT' IN TYPEOF(temp)));
REPEAT i := 1 TO SIZEOF(Units);
IF (('IFC4X4_DEV_20260525.IFCNAMEDUNIT' IN TYPEOF(Units[i])) AND NOT(Units[i]\IfcNamedUnit.UnitType = IfcUnitEnum.USERDEFINED)) THEN
NamedUnitNames := NamedUnitNames + Units[i]\IfcNamedUnit.UnitType;
END_IF;
IF (('IFC4X4_DEV_20260525.IFCDERIVEDUNIT' IN TYPEOF(Units[i])) AND NOT(Units[i]\IfcDerivedUnit.UnitType = IfcDerivedUnitEnum.USERDEFINED)) THEN
DerivedUnitNames := DerivedUnitNames + Units[i]\IfcDerivedUnit.UnitType;
END_IF;
END_REPEAT;
RETURN((SIZEOF(NamedUnitNames) = NamedUnitNumber) AND (SIZEOF(DerivedUnitNames) = DerivedUnitNumber) AND (MonetaryUnitNumber <= 1));
END_FUNCTION;

8.11.6.2.3 References

Edit on Github

3 contributor(s): ArturTomczakbSI-BotDion Moult
Last change: Improve definition split (#876) * bring back headers headers were previously removed by mistake, now bringing them back * add new lines and rename the tag add the word 'short' in it * unify newlines make exactly one newline before and two after the tag * resolving typos Because bringing back headers required to go back in time to previous version, I'm now re-resolving the issues: #861, #860, #856 by ArturTomczak on 2024-07-16T16:07:28+02:00

Is this page difficult to understand? Let us know!