Working with ifc-attributes

Working with ifc-attributes

Postby artmusicstudio » Sat Jun 11, 2022 9:11 pm

hello,
i have to dive ibnto bim and ifc-parameters.

i must confess, that i cnnot find the correct parameters in the compo-instance oder definitions in the ruby-api.

so for the start

if i iterate thru comp.-instances in the model,

is there a way for examlple to

-read out a table of all existing assigned (manually in the components in sketchup or imported)

-edit them (for example changing some letters)

- and write them again back into attributes?

- and eventually generate a new attribute with a new value ?

thanx for helping in advance.

stan


edit:
i found out, that the ifc-attributes are similar like other attributes dictionaries, so i could read them out by

dictionaries = mycompo.attribute_dictionaries
# Iterates through all dictionaries and prints to screen.
dictionaries.each { |dictionary| puts dictionary.name }
puts ""
attrdict = mycompo.attribute_dictionaries['dynamic_attributes']
attrdict.each_pair { | key, value |
puts "#{key} = #{value}"
}
0
User avatar
artmusicstudio 
PluginStore Author
PluginStore Author
 

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago



Ad Machine 
Robot
 


 

Return to Developers' Forum

Who is online

Users browsing this forum: No registered users and 12 guests