Undoing Section Box Changes, Without undoing Actions

Undoing Section Box Changes, Without undoing Actions

Anonymous
Not applicable
1,669 Views
2 Replies
Message 1 of 3

Undoing Section Box Changes, Without undoing Actions

Anonymous
Not applicable

Hi fellow Revit Users,

 

I work in the pre-cast industry and have very large live models I need to edit. To do this effectively, I select each element I need to edit and create a section box around it. If I need to cut through the part I am working on, I simply move the section box slider and then edit what I need to.

 

Here's the problem I hope someone can fix or educate me on: 

 

Once I am done editing the internals of my selection, instead of moving the section box back to its original state, I would like to have the ability to undo my changes to the section box, without undoing the changes (Actions) to the part I am working on. 

 

I understand the Revit architecture that "3D views" can be saved but this is a relatively inefficient process as there would literally be 1000+ 3D views that would have to be generated. 

 

Any help you could give me would be great!

Thank you

0 Likes
Accepted solutions (1)
1,670 Views
2 Replies
Replies (2)
Message 2 of 3

bhprest
Advocate
Advocate
Accepted solution

Hi there-

 

this is definitely possible via the API. Exactly how it's implemented is up to you. A rough process would be as follows:

 

  • Retrieve the BoundingBox of the SectionBox you wish to save/store.
  • Store this information. It is up to you how you wish to do this- either with the ExtensibleStorage API within revit, or exterior to revit at your own discretion. To be able to reconstruct the BoundingBox at a later time, you will need to at least store the BoundingBox.Transform BasisX, BasisY, and BasisZ values, as well as the BoundingBox.Min and Max values. 
  • When you wish to reload this information, you can construct a new BoundingBox from the data above, and use the View3D.SetSectionBox() method to revert back to your saved state. 

 

Hope this helps!

 

 

Message 3 of 3

Anonymous
Not applicable

Thanks for your help!

 

I will look into it.

 

If anyone else has other suggestions I would be interested in hearing them as well!

0 Likes