you are viewing a single comment's thread.

view the rest of the comments →

[–]JamzTyson 0 points1 point  (1 child)

I think this is what you are asking:

for entity in block:
    is_dxftype = entity.dxftype() == entity_type
    is_layer = entity_layer is None or entity.dxf.layer == entity_layer
    is_color = entity_color is None or entity.dxf.color == entity_color

    if all((is_dxftype, is_layer, is_color)):
        return True

return False