Skip to content

Commit 9699cc1

Browse files
committed
Update quickstart example
1 parent 4ff4b39 commit 9699cc1

File tree

1 file changed

+26
-4
lines changed

1 file changed

+26
-4
lines changed

README.md

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,37 @@
1-
# python-mvdxml
1+
python-mvdxml
2+
23
A mvdXML checker and w3c SPARQL converter, as an IfcOpenShell submodule or stand-alone.
34

45

56
#### Quickstart
67
```python
78
import ifcopenshell
8-
from ifcopenshell.mvd import mvd
9+
from ifcopenshell.mvd import mvd
910

10-
mvd_concept = mvd.open_mvd(wall_extraction.mvdxml)
11-
file = ifcopenshell.open(your_ifc_file.ifc)
11+
mvd_concept = mvd.open_mvd("examples/wall_extraction.mvdxml")
12+
file = ifcopenshell.open("Duplex_A_20110505.ifc")
1213

1314
all_data = mvd.get_data(mvd_concept, file, spreadsheet_export=True)
15+
16+
non_respecting_entities = mvd.get_non_respecting_entities(file, all_data[1])
17+
respecting_entities = mvd.get_respecting_entities(file, all_data[1])
18+
19+
20+
```
21+
22+
```python
23+
# Create a new file
24+
new_file = ifcopenshell.file(schema=file.schema)
25+
proj= file.by_type("IfcProject")[0]
26+
new_file.add(proj)
27+
28+
for e in respecting_entities:
29+
new_file.add(e)
30+
31+
new_file.write("new_file.ifc")
1432
```
1533

34+
```python
35+
# Visualize results
36+
mvd.visualize(file, non_respecting_entities)
37+
```

0 commit comments

Comments
 (0)