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

Method parse_activity_xml

src/ifc4d/ifc4d/p62ifc.py:166–186  ·  view source on GitHub ↗
(self, project)

Source from the content-addressed store, hash-verified

164 }
165
166 def parse_activity_xml(self, project):
167 for activity in project.findall("pr:Activity", self.ns):
168 activity_type = activity.find("pr:Type", self.ns).text
169 if activity_type == "Level of Effort":
170 continue
171 activity_id = activity.find("pr:ObjectId", self.ns).text
172 wbs_id = activity.find("pr:WBSObjectId", self.ns).text
173 if wbs_id:
174 self.wbs[wbs_id]["activities"].append(activity_id)
175 else:
176 self.root_activites.append(activity_id)
177 self.activities[activity_id] = {
178 "Name": activity.find("pr:Name", self.ns).text,
179 "Identification": activity.find("pr:Id", self.ns).text,
180 "StartDate": datetime.datetime.fromisoformat(activity.find("pr:StartDate", self.ns).text),
181 "FinishDate": datetime.datetime.fromisoformat(activity.find("pr:FinishDate", self.ns).text),
182 "PlannedDuration": activity.find("pr:PlannedDuration", self.ns).text,
183 "Status": activity.find("pr:Status", self.ns).text,
184 "CalendarObjectId": activity.find("pr:CalendarObjectId", self.ns).text,
185 "ifc": None,
186 }
187
188 def parse_relationship_xml(self, project):
189 for relationship in project.findall("pr:Relationship", self.ns):

Callers 1

parse_xmlMethod · 0.95

Calls 2

findMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected