MCPcopy Create free account
hub / github.com/IfcOpenShell/IfcOpenShell / set

Method set

src/bonsai/bonsai/bim/module/bcf/bcfstore.py:49–59  ·  view source on GitHub ↗
(cls, bcfxml: Union[bcf.bcfxml.BcfXml, None], filepath: str)

Source from the content-addressed store, hash-verified

47
48 @classmethod
49 def set(cls, bcfxml: Union[bcf.bcfxml.BcfXml, None], filepath: str) -> None:
50 cls.bcfxml = bcfxml
51 props = tool.Bcf.get_bcf_props()
52 props.bcf_file = filepath
53
54 # Set bcf_version prop on load.
55 if filepath or bcfxml:
56 bcfxml = cls.get_bcfxml()
57 assert bcfxml
58 bcf_v2 = (bcfxml.version.version_id or "").startswith("2")
59 props.bcf_version = "2" if bcf_v2 else "3"
60
61 @classmethod
62 def set_by_filepath(cls, filepath: str) -> None:

Callers 15

_executeMethod · 0.45
get_gross_element_meshFunction · 0.45
create_mesh_from_shapeFunction · 0.45
executeMethod · 0.45
_executeMethod · 0.45
rollbackMethod · 0.45
commitMethod · 0.45
generate_lineworkMethod · 0.45
setup_serialiserMethod · 0.45
load_changed_elementsMethod · 0.45

Calls 2

get_bcf_propsMethod · 0.80
get_bcfxmlMethod · 0.80

Tested by

no test coverage detected