Skip to content

Integers in enumerations cause an error #1943

@vulevukusej

Description

@vulevukusej

So I'm not sure if this is an error in the way I'm defining the .ifc file, or if its an issue with BB. When I attempt to load this template file and then add the pset to an object, I get the following error message:
File "C:\Users\vpaji\AppData\Roaming\Blender Foundation\Blender\3.0\scripts\addons\blenderbim\bim\prop.py", line 83, in getAttributeEnumValues TypeError: EnumProperty(...): expected a tuple containing (identifier, name, description) and optionally an icon name and unique number

Here is the .ifc file I was importing:

ISO-10303-21;
HEADER;
FILE_DESCRIPTION((),'2;1');
FILE_NAME('Pset_Custom.ifc','2020-01-01T00:00:00',(),(),'Sample','Sample',$);
FILE_SCHEMA(('IFC4'));
ENDSEC;

DATA;
#1= IFCPROPERTYSETTEMPLATE('05N2Dhepb9ouTCSmWBh22D',$,'Custom_Pset','An example custom pset.',.PSET_TYPEDRIVENOVERRIDE.,'IfcObject',(#2,#3,#4));
#2= IFCSIMPLEPROPERTYTEMPLATE('37EpTDq4v96gTZh196BBXQ',$,'NumericProperty','An example numeric property',.P_SINGLEVALUE.,'IfcCountMeasure','',$,$,$,$,.READWRITE.);
#3= IFCSIMPLEPROPERTYTEMPLATE('22H7CzDvz1XfVHKkGWoYUK',$,'StringProperty','An example string property',.P_SINGLEVALUE.,'IfcLabel','',$,$,$,$,.READWRITE.);
#4= IFCSIMPLEPROPERTYTEMPLATE('0p00ORU2nCnPA8UyQg2ZY$',$,'porr_Ganzzahl_E05','Impraegnierung',.P_ENUMERATEDVALUE.,'IfcInteger',$,#5,$,$,$,.READWRITE.);
#5= IFCPROPERTYENUMERATION('Impraegnierung',(IfcInteger(1), IfcInteger(2), IfcInteger(3), IfcInteger(4), IfcInteger(5), IfcInteger(6), IfcInteger(0)),$);
ENDSEC;

END-ISO-10303-21;

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions