I have a script which is doing the following.
- Open project in background.
- Delete all sheets not on sheet lists.
- Delete all views not on sheets.
- Save as new central file.
The script is working perfectly fine when I run it in the active document, however when I choose an existing document to open and run the script on, the part of my script highlighted in pink fails.
This part of the script uses the Views.IsOnSheet node by Archilab to create two lists of views: IN) Views on Sheets & OUT) Views not on sheets. When run in the active document this works perfectly fine, however when run in a background document the Views.IsOnSheet node is returning all false values, even though many of the views are placed on sheets (see image 1).
I’ve been troubleshooting this for a while and can’t seem to figure out why it works in an active document but not in a background document. All other parts of the script function as desired with either approach.
It’s not the end of the world because I could open the desired project and run the script like that but it would be nice to have it run in the background as I’d originally planned…
Any thoughts on the topic would be greatly appreciated.
I’ve attached the script and an image of it below. If anyone requires any additional information just let me know.
Thanks in advance.
Additional Packages Required: Archilab, GeniusLoci, Rhythm, Orchid, Clockwork.
Milestone Supersede Wizard_X1.dyn (78.1 KB)