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

Method get_bcfxml

src/bonsai/bonsai/bim/module/bcf/bcfstore.py:32–46  ·  view source on GitHub ↗
(cls)

Source from the content-addressed store, hash-verified

30
31 @classmethod
32 def get_bcfxml(cls) -> Union[bcf.bcfxml.BcfXml, None]:
33 if not cls.bcfxml:
34 props = tool.Bcf.get_bcf_props()
35 bcf_filepath = props.bcf_file
36 if not os.path.isabs(bcf_filepath):
37 bcf_filepath = os.path.abspath(os.path.join(bpy.path.abspath("//"), bcf_filepath))
38 if bcf_filepath:
39 try:
40 cls.bcfxml = bcf.bcfxml.load(bcf_filepath)
41 except:
42 # there will be a plenty of "Permission denied" errors
43 # as many poll() methods will try to access the bcfxml simultaneously
44 # the first time it's loaded
45 pass
46 return cls.bcfxml
47
48 @classmethod
49 def set(cls, bcfxml: Union[bcf.bcfxml.BcfXml, None], filepath: str) -> None:

Callers 15

updateBcfReferenceLinkFunction · 0.80
updateBcfLabelFunction · 0.80
updateBcfProjectNameFunction · 0.80
updateBcfTopicNameFunction · 0.80
updateBcfTopicIsEditableFunction · 0.80
getBcfViewpointsFunction · 0.80
get_extensions_itemsFunction · 0.80
setMethod · 0.80
drawMethod · 0.80
drawMethod · 0.80
executeMethod · 0.80

Calls 3

get_bcf_propsMethod · 0.80
joinMethod · 0.45
loadMethod · 0.45

Tested by

no test coverage detected