Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Undoing Section Box Changes, Without undoing Actions

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
Anonymous
625 Views, 2 Replies

Undoing Section Box Changes, Without undoing Actions

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

Tags (2)
2 REPLIES 2
Message 2 of 3
bhprest
in reply to: Anonymous

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
in reply to: bhprest

Thanks for your help!

 

I will look into it.

 

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

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Forma Design Contest


Rail Community