Skip to content

Commit b32e8aa

Browse files
Adds another example.
1 parent d2ff7ae commit b32e8aa

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

dsl/cookbook/scripts/index.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,14 @@ Here are some example scripts.
2626
}
2727
```
2828

29+
### Remove orphaned elements from all views
30+
31+
```
32+
!script groovy {
33+
workspace.views.views.findAll { it instanceof com.structurizr.view.ModelView }.each { it.removeElementsWithNoRelationships() }
34+
}
35+
```
36+
2937
### Programmatically add elements to a view
3038

3139
```

0 commit comments

Comments
 (0)