mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-20 06:58:56 +00:00
Merge remote-tracking branch 'origin/v0.6.0' into v0.7.0
This commit is contained in:
@@ -48,7 +48,7 @@ class entity_instance(object):
|
|||||||
>>> #423=IfcProductDefinitionShape($,$,(#409,#421))
|
>>> #423=IfcProductDefinitionShape($,$,(#409,#421))
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, e, file):
|
def __init__(self, e, file=None):
|
||||||
if isinstance(e, tuple):
|
if isinstance(e, tuple):
|
||||||
e = ifcopenshell_wrapper.new_IfcBaseClass(*e)
|
e = ifcopenshell_wrapper.new_IfcBaseClass(*e)
|
||||||
super(entity_instance, self).__setattr__("wrapped_data", e)
|
super(entity_instance, self).__setattr__("wrapped_data", e)
|
||||||
@@ -126,7 +126,7 @@ class entity_instance(object):
|
|||||||
return entity_instance.wrap_value(self.wrapped_data.get_argument(key), self.wrapped_data.file)
|
return entity_instance.wrap_value(self.wrapped_data.get_argument(key), self.wrapped_data.file)
|
||||||
|
|
||||||
def __setitem__(self, idx, value):
|
def __setitem__(self, idx, value):
|
||||||
if self.wrapped_data.file.transaction:
|
if self.wrapped_data.file and self.wrapped_data.file.transaction:
|
||||||
self.wrapped_data.file.transaction.store_edit(self, idx, value)
|
self.wrapped_data.file.transaction.store_edit(self, idx, value)
|
||||||
|
|
||||||
attr_type = real_attr_type = self.attribute_type(idx).title().replace(" ", "")
|
attr_type = real_attr_type = self.attribute_type(idx).title().replace(" ", "")
|
||||||
|
|||||||
Reference in New Issue
Block a user