Applicability for all Elements

Hi, I am currently writing IDS file for our BuildIM format which we use for evaluating IFC models. We are setting unique parameters to ech element inside Autodesk Revit and we need to later check with IDS that all Elements do have those. I tried to use this:

        <applicability minOccurs="1" maxOccurs="1">
            <entity>
                <name>
                    <simpleValue>IFCELEMENT</simpleValue>
                </name>
            </entity>
        </applicability>

But Bonsai IFC/IDS verification is unsuccesful. Is there anybody who knows how to setup the applicability?

Hi @CipZip, that’s because such IDS is not possible to pass. Not sure what IFC version you specified, but in the latest (4x3) IfcElement is an abstract definition that can’t be instantiated. That means no model will contain IfcElement. Instead, it can contain more specialised elements such as IfcWall or IfcDoor. In IDS you need to list explicitly what entities you want to scan. The IDS does not consider inheritance, so when you say IfcElement it only looks for IfcElement, not it’s subentities.

Since this is a recurring topic we added this documentation page explaining this and there you can also find a copy-paste list of IfcElement subentities: IDS/Documentation/UserManual/entity-facet.md at 9cadc7208e42ef987107d62be0dd8b8eb18ed498 · buildingSMART/IDS · GitHub

2 Likes

When I’ve been there I’ve used the “tag” attribute as workaround since it’s the common attribute to all IfcElement descendants. If tag exists, you’re sure it’s an IfcElement.

2 Likes

Very interesting workaround! I have tried it and get false results since all the IDS checkers checked also Type Elements (so not only IfcSlab but also IfcSlabType). So not an option for me :frowning: , but thanks.

Well… you need to add something, but I think the workaround is still valid. It just need to be tuned to avoid Type Elements (their name always finishes with type…)

      <ids:applicability minOccurs="1" maxOccurs="unbounded">
        <ids:entity>
          <ids:name>
            <xs:restriction base="xs:string">
              <xs:pattern value=".*(?<!TYPE)" />
            </xs:restriction>
          </ids:name>
        </ids:entity>
        <ids:attribute>
          <ids:name>
            <ids:simpleValue>Tag</ids:simpleValue>
          </ids:name>
        </ids:attribute>
      </ids:applicability>

The key point in there is the regular expression “.*(?<!TYPE)” which filters all the occurrences that don’t finish with “TYPE”.

Hope it works!

3 Likes

Thank you so VERY much! I had to rewrite it a little bit, but it worked :slight_smile:

<xs:restriction base="xs:string">
    <xs:pattern value=".*[^T][^Y][^P][^E]" />
</xs:restriction>
2 Likes