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

Method add_topic

src/bcf/bcf/v2/bcfxml.py:231–256  ·  view source on GitHub ↗

Add a new topic to the BCF. Args: title: The title of the topic. description: The description of the topic. author: The author of the topic. topic_type: The type of the topic. topic_status: The status of the topic.

(
        self, title: str, description: str, author: str, topic_type: str = "", topic_status: str = ""
    )

Source from the content-addressed store, hash-verified

229 topic_handler.save(destination_zip)
230
231 def add_topic(
232 self, title: str, description: str, author: str, topic_type: str = "", topic_status: str = ""
233 ) -> TopicHandler:
234 """
235 Add a new topic to the BCF.
236
237 Args:
238 title: The title of the topic.
239 description: The description of the topic.
240 author: The author of the topic.
241 topic_type: The type of the topic.
242 topic_status: The status of the topic.
243
244 Returns:
245 The newly created topic wrapped inside a TopicHandler object.
246 """
247 topic_handler = TopicHandler.create_new(
248 title,
249 description,
250 author,
251 topic_type=topic_type,
252 topic_status=topic_status,
253 xml_handler=self._xml_handler,
254 )
255 self.topics[topic_handler.guid] = topic_handler
256 return topic_handler
257
258 def __eq__(self, other: object) -> bool | NoReturn:
259 return (

Callers 9

export_bcfxmlMethod · 0.45
to_fileMethod · 0.45
build_sampleFunction · 0.45
test_massive_bcfFunction · 0.45
build_sampleFunction · 0.45
test_massive_bcfFunction · 0.45
executeMethod · 0.45

Calls 1

create_newMethod · 0.45

Tested by 6

build_sampleFunction · 0.36
test_massive_bcfFunction · 0.36
build_sampleFunction · 0.36
test_massive_bcfFunction · 0.36