Last week I provided an updated version of the CmdSlabBoundary external command to determine a floor slab boundary.
Here is a follow-up to that issue:
Question: The solution provided to retrieve the slab boundary works fine for me if no openings are cut out.
I have a situation where my slabs are cut by openings, however, and I need to retrieve the original uncut gross slab boundary.
Here is an example with two slabs A and B and an opening cutting out part of both of them:
The solution provided retrieves the cut out net slab boundary:
How can I obtain the following original gross uncut slab boundary?
Answer: One way to obtain the unmodified geometry of the slab is to use the temporary transaction trick to temporarily eliminate all openings and other elements affecting its shape.
This technique was used to determine gross material quantities of floors, walls and roofs in the material quantities sample from Scott Conover's Autodesk University 2009 class on analysing building geometry, which was later add to the Revit SDK as the MaterialQuantities sample.
It shows how the transaction handling for the temporary operation can be simply and cleanly encapsulated.
It analyses the material quantities of walls, floors, and roofs, and outputs the result to Excel by implementing the following steps:
To determine the boundary lines of the floor slab with all opening removed, you could proceed in the same fashion as described in step 6 for obtaining the gross material quantities.
Temporarily delete then openings in a separate transaction, retrieve the original slab geometry, and abort the transaction to restore the original state.
This technique is easy to implement. We reused this method for many different purposes a number of times, e.g.
Addendum: Arnošt Löbel pointed out that this will not always work. Some modifications require the transaction to be committed before they take full effect. The workaround for that is to enclose it within a transaction group and roll back the group at the end.
Do you have an interesting AutoCAD app you would like to publish?
Will you attend Autodesk University 2012 and would you like to win an attractive prize?
If so, take a look at the APPHACK @ AU Hackathon:
The official rules list some great prizes. Unfortunately, they also restrict the participation to AutoCAD apps, so Revit add-ins are not permissible.
Kean Walmsley provides a a few more details.