On the forums I found some python code node for setting Datums and cropping them by Cropview.
(Set Grid Extents and Bubbles - #32 by RevitRobot)
I don’t know any Python and I was wondering if someone could help me rewrite the code so it cuts by a list of Curves rather than the Cropview. This is because the Grid bubbles need to be just inside the Cropview, but I also want to use the node to set Levels and Grids to the left and bottom of the drawing:
For vertical details: cropped within the cropbox, and the bubble side an extra 7mm
Same with horizontal details (so mini floorplans basically) but those usually have grid bubbles also on the sides, not just the bottom
Is it possible someone here can help me rewrite the code for this so I can feed the node a list of curves? I can then preset the curve calculation rather than setting the crop view to those curves, using the current node and resetting the Crop View back. (Which is also very error sensitive)
I’m aware, in the listed forum link I can actually set all levels and grids to the cropbox. (As long as the grids are intersecting the cropbox). The node even has a built in offset, so I can set it to -7.
However this offsets the entire cropbox. Not merely the sides with grid bubbles
So I made a script that sets Cropboxes, then use the Python Node, then resetting the Cropbox. This works but is error sensitive and needs a double transaction. Not ideal and not clean.
This is why I want help with the Python code that sets all intersecting Datums (yes even levels) to the provided Curves. I tried ChatGPT but it only gives me errors