View section gap in segments

View section gap in segments

MiguelGT17
Advocate Advocate
765 Views
5 Replies
Message 1 of 6

View section gap in segments

MiguelGT17
Advocate
Advocate

Is there a way to gap the view section in segments and drag its gap points  through the API? So the section line do not cross the drawings for a more clear presentation.

before:

MiguelGT17_0-1650046849664.png

after:

MiguelGT17_2-1650046901147.png     MiguelGT17_3-1650046921670.png

We'd appreciate any help or workaround that give us a clue to build the macro that get this done, as we need to repeat this manual task on all the views

 

 

0 Likes
766 Views
5 Replies
Replies (5)
Message 2 of 6

danielJY6FB
Contributor
Contributor

I don't see an straight-up way to do this using the API, but I did notice two things:

1) The 'break' a section cut line button always appears in the exact center of the section cut line
2) After breaking a section, the draggable blue end dots seem to always appear at 1/3 and 2/3 of the way across the section.

So I had a crazy idea - I've never done this, but I imagine one could develop a workflow that uses .NET to simulate mouse clicks and drags to automate the clicking of the split-section thing, and the dragging of the end points, since you can always calculate where the things that need to be clicked are going to appear on screen.

Message 3 of 6

MiguelGT17
Advocate
Advocate

Thanks for replying me, so you are saying I must go for using windows API to get this done. Seems an interesting approach I've never tried it so far. Thanks again, now I know there is no way to manage those gaps through the Revit API.

Message 4 of 6

danielJY6FB
Contributor
Contributor

At least as far as I know. We've had to do some work in the past where we had to translate Revit window coordinates to screen coordinates so we could use .NET to simulate clicks or sometimes key strokes to get around things that were not yet available in the Revit API. It's a pain, but it's possible. Hopefully either they'll add this to the API, or someone else will reply with an even easier clever solution!

Message 5 of 6

jblanchardSHYLW
Observer
Observer

Hey, just wanted to add that I'm looking into this as well utilizing OkPy from Orkestra - as of the 2024 API it doesn't look like there are any methods to automate it. Did you end up finding a successful path via Windows API? Thanks in advance for any reply!

0 Likes
Message 6 of 6

danielJY6FB
Contributor
Contributor

Yeah I think the situation is still the same - not available via Revit API, it might require some hacky Windows workaround.

But no, I haven't tried to develop a workaround using simulated mouse clicks that does this.

0 Likes