I´m looking for a way to manipulate the grid lines in section views for about a year now.
I´m afraid there is no way to do that But i still have hope that someone will come up with a solution sometimes.
No luck for us, it seems that “reset to crop” or “3d extents” also doesnt work
Maybe someone has news on this?
But in PlanViews this works good, can you show more of your graph and lists?
I just don’t know enough about what’s under the hood for grids. They are curve based as I can extract the curve but cannot modify the curve with the set location node. The fact that C. poupin did it for plan leans my thinking towards it is possible and he mentions something about needing the cut plane for the plan script. I think its this part cutOffset = viewRange.GetOffset(PlanViewPlane.CutPlane)
All I want to do is control the 2D extents because the 3d extents are controlled by Scope Boxes. Having sections controlled by scope boxes does not work in my mechanical world or at least I don’t see any benefit for the added work.
I attached all my graphs on the topic You can just download and use.
I hate pinging people but maybe @c.poupin can find time one day to explain the process and let us know if our task is impossible or not. Nothing worse then spending hours trying something only to find out its a limitation of the API
I keep getting the python engine error. Something to do with that I bet. I think with the help of the custom nodes in the link above I might get this to work. I will post if I do.
Something going on with my script where it takes the crop box draws it, take the grid curve and draws it but they never intersect. Its like the grid and the crop region are at different scales or something. I can get the grid curve to extend but they just never meet. Any ideas? Even the original script has the same problem…maybe something changed in 2022 vs 2020 revit in which the script was made for grids.dyn (111.8 KB)
I bet its something to do with the fact that sections have a thickness ie an extent. My crop region and my grids are probably not on the same plane per se. Idk going to break and think some more lol
After a few tests i now added some nodes and code because i want to only show the upper bubbles in sectionviews:
Can you please tell me why your code only shows the bottom bubble in section views, so i can try to change this in your code?
But my most important request would be to add an additional input to your python code for an offset, so that the grids will not be directly on the cropbox. May you give me some information on how to achieve that?
try to transform the start point lstPtToLine[0] and the end point lstPtToLine[1] with your offset and the gridLine Direction, then re-make an BoundLine