Export all PropertySets with all Properties
-
Hello,
Is there a way in Solibri to export all PropertySets and Properties sorted by IfcClasses? I would like to give my colleagues an overview of the existing properties.
If not, is there an alternative with other tools?
best regards
Alex -
Do you have some codesnippets? I’m working with the rules api.
-
Hi @elia
Here is a JavaScripted ITO that exports all properties of each IFC class, with each property separated by a semicolon.
All Properties.itoNote that JavaScripted ITOs in Solibri have certain limitations, such as the lack of support for enhanced for-each loops and stream operations. As a result, this script relies on iterators and while loops.
However, if you’re developing your own Solibri API extensions using Java, these limitations do not apply. This example can serve as a useful reference for accessing PropertySets and their associated Properties from Components.
importClass(java.util.HashSet); importClass(java.lang.StringBuilder); function getValue(row, components) { var componentIterator = components.iterator(); var psetSet = new HashSet(); while (componentIterator.hasNext()) { var component = componentIterator.next(); var propertySets = component.getPropertySets(); var propertySetIterator = propertySets.iterator(); while (propertySetIterator.hasNext()) { var propertySet = propertySetIterator.next(); var propertySetName = propertySet.getName(); var properties = propertySet.getProperties(); var propertyIterator = properties.iterator(); while (propertyIterator.hasNext()) { var property = propertyIterator.next(); var propertyName = property.getName(); psetSet.add(propertySetName + "." + propertyName); } } } var result = new StringBuilder(); var psetIterator = psetSet.iterator(); while (psetIterator.hasNext()) { result.append(psetIterator.next()).append(";"); } return result.toString().trim(); }
Copyright © 2025 Solibri Inc. | Powered by NodeBB
