Chapter 2 recap
Automating your own work
The key takeaways from this chapter’s 3 lessons.
Your first script
- Good first tasks are frequent, rule-based and easy to check: numbering, renaming, filling parameters, simple checks.
- Write the steps in plain language first, including the edge cases.
- Visual (Dynamo, Grasshopper) is a fine start; move to Python when the task becomes a team tool.
- Test on a copy, check a sample, then run it for real, and keep a readme.
Reading IFC with Python
- IfcOpenShell opens IFC files from any software; scripts work across vendors.
- Find elements by class (IfcDoor, IfcSpace), then read property sets and the containing storey.
- Expect properties in custom sets as well as standard ones; check both.
- Skip geometry when you only need data: it's much faster.
APIs and the cloud
- A cloud API answers requests over the internet: list projects, read issues, get model properties, run jobs.
- Every integration needs credentials; keep them out of scripts and give apps the least access they need.
- Ask for only the data the question needs, and respect rate limits and usage costs.
- Check whether an API is in beta or general release before building on it.