Home
|
Extensions
|
Scripts index
|
#Query the instances of certain class and show their properties #script parameters: # $bim: the name of the BIM model file # $cls: the class name of the element which we are intersted in 123321 puts $jquery $bim = "02.ifc" $cls=IFCELEMENT use $bim res={} IFCRELDEFINESBYPROPERTIES.where("o.relatedObjects.to_obj.is_a?(#$cls)","[o.relatedObjects.to_obj,o.relatingPropertyDefinition.to_obj]").each { |arr| res[arr[0].class.to_s + ":" +arr[0].globalId] =[] if res[arr[0].class.to_s + ":" + arr[0].globalId] ==nil res[arr[0].class.to_s + ":" +arr[0].globalId] << arr[1] } i=0 res.each { |k,v| i +=1 HTML.h5 k.gsub("'","") puts "
" v.each { |pset| HTML.h3 pset.name.gsub("'","") puts "
" + pset.property_details + "
"} puts "
" puts "" }
Script Name(optional):