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

Function parse_element_id

src/ifcquery/ifcquery/__main__.py:51–54  ·  view source on GitHub ↗

Parse an element ID from '#123' or '123' format.

(raw: str)

Source from the content-addressed store, hash-verified

49
50
51def parse_element_id(raw: str) -> int:
52 """Parse an element ID from '#123' or '123' format."""
53 raw = raw.strip().lstrip("#")
54 return int(raw)
55
56
57def format_output(data, fmt: str) -> str:

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected