@@ -307,6 +307,35 @@ def test_getting_complex_properties_from_a_list_of_properties(self):
307307 }
308308 }
309309
310+ def test_getting_complex_properties_verbose (self ):
311+ element = ifcopenshell .api .root .create_entity (self .file , ifc_class = "IfcWall" )
312+ pset = ifcopenshell .api .pset .add_pset (self .file , product = element , name = "pset" )
313+ complex_property = self .file .create_entity ("IfcComplexProperty" , Name = "prop" , UsageName = "usage_name" )
314+ ifcopenshell .api .pset .edit_pset (self .file , pset = complex_property , properties = {"a" : "b" })
315+ pset .HasProperties = [complex_property ]
316+ properties = subject .get_properties (pset .HasProperties , verbose = True )
317+ prop_value = properties ["prop" ]["value" ]
318+ nested_prop = prop_value ["properties" ]["a" ]
319+ assert properties == {
320+ "prop" : {
321+ "id" : complex_property .id (),
322+ "class" : "IfcComplexProperty" ,
323+ "value" : {
324+ "UsageName" : "usage_name" ,
325+ "id" : complex_property .id (),
326+ "type" : "IfcComplexProperty" ,
327+ "properties" : {
328+ "a" : {
329+ "id" : nested_prop ["id" ],
330+ "class" : "IfcPropertySingleValue" ,
331+ "value" : "b" ,
332+ "value_type" : "IfcLabel" ,
333+ }
334+ },
335+ },
336+ }
337+ }
338+
310339
311340class TestGetElementsUsingPset (test .bootstrap .IFC4 ):
312341 def test_run (self ):
0 commit comments