I know you can’t create a new scope box… So I’m copying an existing one.
I can move it to a new location.
However, i’m stuck trying to work out a workaround for scaling it/ resizing it.
i encountered similar issues. The point is when you run a dynamo script, it is a one way ticket. It stores the data from the first run. I recomment to open/close dynamo and run it again.
The one way I’ve “created” a scope box from “scratch” was by putting the scope box in a model group, placing the model group where I needed it to be, and then ungrouping the model group. When I was tasked with building it, there were three different bay sizes for a structural model and grid naming to determine what scope box size would be used.
I asked Copilot if there’s a way to resize a scope box, and there really isn’t, but it said that you could position and scale a new scope box from the original using the element transform utils copy element method. It’s worth looking into, but it could be a dead end.
I believe there’s no method for creating or modifying scope boxes (unless it was a recent add to the API that I’ve missed). Whether it’s on the API “roadmap” or not would be a question for the Revit team.