Section View Grid Extents depending on cropbox


I want to set the grid extents in a section view depending on the cropbox.

I found a few scripts on this topic and tried them but they all are only working in floorplans and not in section views. The Reason is that I´m not getting the vertical 2D-grids from the sectionview, i can only get the horizontal 3D-grids. I don´t want to “propagate extents” to a parallel view, this should work on any section view.
Here you can see the cropbox and the grids from the view above.

I really don´t know how to start solving this problem.

I would be really happy for any advice.

Why a cropbox?
Scopeboxes are better at this.

Hello Marcel, thanks for your reply.
I have never used scope boxes before, i´m going to read up on that!
But doesn`t that mean i would have to create scopeboxes for all 500-1000 section views in my projekt? For every single wall etc.

I don’t know if the is a ScopeBox.ByBoundingbox node, i think Scope boxes are not in the API
If you want me to explain, feel free

Hi @gerhard.p,

Have you seen the topic below?

Hello MJB,

Yes i have. As i tried to explain in my first post, this only works for floorplans.
I can´t select, get parameters or set parameters of a vertical grid. I would like to know if this is even possible.
Maybe the link between a scopebox and the grids is the only way of adjusting a vertical grid?!

I´m still trying to change the grid, making it shorter or longer on one end like this:

As @Marcel_Rijsmus suggested i tried using a scopebox but i dont know how that should help me with my problem.

The scopebox is exactly behaving like the cropbox, when i move the box down the grid will follow:

But i wanted to only move the grid. Am i doing anything wrong? Maybe i misunderstood.

So i would really appreciate any advice for moving the grid end in a section view.

Thanks in advance!

Kind regards