IFC-Dictionary

@ams Please post correctly formatted and colorized code, [How to] Post correctly formatted and colorized code on the forum?

You are skipping quite a few steps to insert values in your instances.

This is the attribute dictionary: (IFC 4 in this case)

ifcDict = ent.definition.attribute_dictionary("IFC 4")

This is your Pset name, it’s important to start with “Pset_”

ifcYourPsetName = ifcDict.attribute_dictionary("Pset_YourPsetName", true)

This is your parameter name

ifcYourPsetNameParameterName =ifcYourPsetName.attribute_dictionary(defDic, true)

And finally this is your parameter value name:

ifcYourPsetNameParameterName.set_attribute "IfcLabel", "value", val.to_s
ifcYourPsetNameParameterName.set_attribute "IfcLabel", "is_hidden", false
ifcYourPsetNameParameterName.set_attribute "IfcLabel", "attribute_type", String

You must take into account that for the parameter to appear you must set the is_hidden value to false and set the attribute_type you are going to insert.

Finally, I strongly recommend you to export with Ifc Manager in order to export your “Pset” correctly.

I hope it helps you. And please modify your post in order to have a clean post easy to search and read in the future.

1 Like