#2482 entity_instance.to_string()

This commit is contained in:
Thomas Krijnen
2022-10-08 17:18:47 +02:00
parent 94ba1a121d
commit cd27d48701
2 changed files with 15 additions and 0 deletions
@@ -232,6 +232,17 @@ class entity_instance(object):
def __repr__(self):
return repr(self.wrapped_data)
def to_string(self, valid_spf=True):
"""Returns a string representation of the current entity instance.
Equal to str(self) when valid_spf=False. When valid_spf is True
returns a representation of the string that conforms to valid Step
Physical File notation. The difference being entity names in upper
case and string attribute values with unicode values encoded per
the specific control directives.
"""
return self.wrapped_data.to_string(valid_spf)
def is_a(self, *args):
"""Return the IFC class name of an instance, or checks if an instance belongs to a class.