Edit section view cut line

Edit section view cut line

kirill78zah
Contributor Contributor
2,732 Views
3 Replies
Message 1 of 4

Edit section view cut line

kirill78zah
Contributor
Contributor

Hello.

In Revit I can manually change length of section view cut line dragging by its grips.

Below are two pictures illustrating such manipulation.

 

Is it possible to do it programmatically?

1.PNG2.PNG

0 Likes
2,733 Views
3 Replies
Replies (3)
Message 2 of 4

aignatovich
Advisor
Advisor

Hi!

 

Yes, you can do it. Look at this topic: https://forums.autodesk.com/t5/revit-api-forum/center-of-a-section-view/m-p/7878460#M29735

 

In my comment there is a code, that should be executed directly from section view. If your active view is not document active view you should retrieve your view section first.

Message 3 of 4

kirill78zah
Contributor
Contributor

Thanks, Alexander.

Later I will test  this code you posted.

But can you clarify: is this code changes CropBox of ViewSection and it causes changing cut lines in other views?

if I understand correctly, when I drag grips of cut line manually it doesnt changes CropBox.

I mean there are two kind of grips in cut line:

 - triangular to change CropBox;

 - circular to change length of cut line in active view.

Look at the picture below:

3.PNG

I need to change only length of cut line.

0 Likes
Message 4 of 4

aignatovich
Advisor
Advisor

Yep, when it is changed manually it changes the Origin of view section. In the API this does not work (there is no setter of Origin property)

 

The code changes crop box (as triangular grips do). To change the "length" just set VIEWER_BOUND_OFFSET_FAR parameter value

0 Likes