mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-20 23:36:20 +00:00
Quote {id} placeholders in examples (issue #8101)
Shell {} expressions require quoting
This commit is contained in:
@@ -189,7 +189,7 @@ each JSON object. The model is opened once and saved once regardless of how
|
|||||||
many elements are processed.
|
many elements are processed.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
ifcquery model.ifc select 'IfcWindow' | ifcedit foreach model.ifc root.remove_product --product {id}
|
ifcquery model.ifc select 'IfcWindow' | ifcedit foreach model.ifc root.remove_product --product '{id}'
|
||||||
```
|
```
|
||||||
|
|
||||||
```json
|
```json
|
||||||
@@ -201,7 +201,7 @@ Placeholder tokens match the fields emitted by `ifcquery` — typically `{id}`,
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
ifcquery model.ifc select 'IfcDoor' | ifcedit foreach model.ifc attribute.edit_attributes \
|
ifcquery model.ifc select 'IfcDoor' | ifcedit foreach model.ifc attribute.edit_attributes \
|
||||||
--product {id} --attributes '{"Name": "Door"}'
|
--product '{id}' --attributes '{"Name": "Door"}'
|
||||||
```
|
```
|
||||||
|
|
||||||
**Options:**
|
**Options:**
|
||||||
@@ -297,7 +297,7 @@ ifcedit run model.ifc spatial.unassign_container \
|
|||||||
--products "$(ifcquery model.ifc --format ids select 'IfcWall')"
|
--products "$(ifcquery model.ifc --format ids select 'IfcWall')"
|
||||||
|
|
||||||
# Fan-out — one operation per element, model opened and saved once
|
# Fan-out — one operation per element, model opened and saved once
|
||||||
ifcquery model.ifc select 'IfcWindow' | ifcedit foreach model.ifc root.remove_product --product {id}
|
ifcquery model.ifc select 'IfcWindow' | ifcedit foreach model.ifc root.remove_product --product '{id}'
|
||||||
```
|
```
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|||||||
@@ -57,13 +57,13 @@ Dry-run to validate without modifying the file::
|
|||||||
Apply an API function to each element in a JSON array from stdin (``{field}``
|
Apply an API function to each element in a JSON array from stdin (``{field}``
|
||||||
placeholders are substituted from each item; model is opened and saved once)::
|
placeholders are substituted from each item; model is opened and saved once)::
|
||||||
|
|
||||||
$ ifcquery model.ifc select 'IfcWindow' | ifcedit foreach model.ifc root.remove_product --product {id}
|
$ ifcquery model.ifc select 'IfcWindow' | ifcedit foreach model.ifc root.remove_product --product '{id}'
|
||||||
$ ifcquery model.ifc select 'IfcDoor' | ifcedit foreach model.ifc attribute.edit_attributes \
|
$ ifcquery model.ifc select 'IfcDoor' | ifcedit foreach model.ifc attribute.edit_attributes \
|
||||||
--product {id} --attributes '{"Name": "Door"}'
|
--product '{id}' --attributes '{"Name": "Door"}'
|
||||||
|
|
||||||
Write to a separate output file instead of overwriting::
|
Write to a separate output file instead of overwriting::
|
||||||
|
|
||||||
$ ifcquery model.ifc select 'IfcWall' | ifcedit foreach model.ifc root.remove_product -o output.ifc --product {id}
|
$ ifcquery model.ifc select 'IfcWall' | ifcedit foreach model.ifc root.remove_product -o output.ifc --product '{id}'
|
||||||
|
|
||||||
Quantity take-off (writes ``IfcElementQuantity`` psets back to the file; requires C++ geometry bindings)::
|
Quantity take-off (writes ``IfcElementQuantity`` psets back to the file; requires C++ geometry bindings)::
|
||||||
|
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ pass query results directly into ``ifcedit run`` parameters, or pipe JSON into
|
|||||||
--products "$(ifcquery model.ifc --format ids select 'IfcWall')"
|
--products "$(ifcquery model.ifc --format ids select 'IfcWall')"
|
||||||
|
|
||||||
# Fan-out — one operation per element, model opened and saved once
|
# Fan-out — one operation per element, model opened and saved once
|
||||||
$ ifcquery model.ifc select 'IfcWindow' | ifcedit foreach model.ifc root.remove_product --product {id}
|
$ ifcquery model.ifc select 'IfcWindow' | ifcedit foreach model.ifc root.remove_product --product '{id}'
|
||||||
|
|
||||||
# Render an element highlighted against everything related to it
|
# Render an element highlighted against everything related to it
|
||||||
$ ifcquery model.ifc render -o relations.png \
|
$ ifcquery model.ifc render -o relations.png \
|
||||||
|
|||||||
@@ -474,11 +474,11 @@ ifcedit run model.ifc spatial.unassign_container \
|
|||||||
--products "$(ifcquery model.ifc --format ids select 'IfcWall')"
|
--products "$(ifcquery model.ifc --format ids select 'IfcWall')"
|
||||||
|
|
||||||
# Delete every window (model opened and saved once)
|
# Delete every window (model opened and saved once)
|
||||||
ifcquery model.ifc select 'IfcWindow' | ifcedit foreach model.ifc root.remove_product --product {id}
|
ifcquery model.ifc select 'IfcWindow' | ifcedit foreach model.ifc root.remove_product --product '{id}'
|
||||||
|
|
||||||
# Bulk rename all doors
|
# Bulk rename all doors
|
||||||
ifcquery model.ifc select 'IfcDoor' | ifcedit foreach model.ifc attribute.edit_attributes \
|
ifcquery model.ifc select 'IfcDoor' | ifcedit foreach model.ifc attribute.edit_attributes \
|
||||||
--product {id} --attributes '{"Name": "Door"}'
|
--product '{id}' --attributes '{"Name": "Door"}'
|
||||||
|
|
||||||
# Render an element highlighted against everything related to it
|
# Render an element highlighted against everything related to it
|
||||||
ifcquery model.ifc render relations.png \
|
ifcquery model.ifc render relations.png \
|
||||||
|
|||||||
Reference in New Issue
Block a user