Shell Material Issue #372
Unanswered
CyanModular
asked this question in
General
Replies: 1 comment 2 replies
-
|
Hi @CyanModular Are those objects "simple shell elements" or multi-layer elements ? import cadwork as cw
import element_controller as ec
import attribute_controller as ac
import material_controller as mc
import visualization_controller as vc
is_shell_obj = lambda eid: ac.is_wall(eid) or ac.is_floor(eid) or ac.is_roof(eid)
cover_elements = [eid for eid in ec.get_all_identifiable_element_ids() if is_shell_obj(eid)]
# Either material is relative to a Color Nr
vc.set_color(cover_elements, 90)
# Or set a specific material
material_id = mc.create_material("Your New Material")
ac.set_element_material(cover_elements, material_id)
# or for MLC
import multi_layer_cover_controller as mlcc
multi_layer_set_id = mlcc.create_multi_layer_by_cover_type("Your Cover Type", cw.multi_layer_cover_type.framedWall)
layer_thickness = 240.0
mlcc.add_layer(multi_layer_set_id, cw.multi_layer_type.structure, "Layer XYZ", material_id, layer_thickness)
mlcc.set_cover_material(multi_layer_set_id, material_id) # Set the cover material to the multi-layer set |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I’m having issues finding the correct reference for shell materials. I’m trying to automatically get and set shell material for elements via a script that imports a CSV containing material, name, group, color, and subgroup. I’ve successfully mapped the CSV data into CADwork, but I’m not sure how to correctly apply the material to elements.
Beta Was this translation helpful? Give feedback.
All reactions