Get void form from beam

Anonymous

Get void form from beam

Anonymous
Not applicable

 

Hi,

How to read void forms from selected element in model.

My model element is structural member beam, there in my beam applied cell hole as s void cut,

So that cut I want to remove from this beam,

For that how to access member, family symbol & how to remove void.

 

Appreciate if you help to solve above.

Thanks 

-RK

0 Likes
Reply
Accepted solutions (3)
1,434 Views
8 Replies
Replies (8)

dragos.turmac
Autodesk
Autodesk

Hi,

 

One possible option would be the following:

1. Get the Solid geometry of the FamilyInstance (your beam) and SolidUtils.Clone() it in a Solid called, say, "cutSolid";

2. Create a new (Sub)Transaction;

3. Delete the FamilyInstance that has created the void in the beam and call a Document.Regenerate();

4. Get the Solid geometry of your beam and use SolidUtils.Clone() again in a solid called, say, "fullSolid";

5. Rollback the transaction started at step 2;

6. Using BooleanOperationsUtils.ExecuteBooleanOperation, subtract "cutSolid" (step 1) from "full Solid" (step 4);

 

I used a similar code to extract the voids from a wall but I do not know if it works on beams/FamilyInstances, but it's worth a try.



Turmac Dragos
Pr. SW. Engineer
0 Likes

GeomGym
Advocate
Advocate

Did you try InstanceVoidCutUtils.GetCuttingVoidInstances(element) ?  It will work if the void is applied appropriately.

 

Cheers,

 

Jon

0 Likes

matthew_taylor
Advisor
Advisor

Hi @Anonymous,

If the void is in the family, you will probably need to open the family, delete the void, then reload the family into your project.


Cheers,

-Matt
_______________________________________________________________________________
Marking a post as a 'solution' helps the community. Giving a post 'Kudos' is as good as saying thanks. Why not do both?
0 Likes

Anonymous
Not applicable

Hi, 

Thanks for the information, i'm trying to solve.

 

-RK.

0 Likes

Anonymous
Not applicable

Hi,

How to delete void, any sample or reference if available kindly reply.

 

Thank you

-RK

0 Likes

matthew_taylor
Advisor
Advisor
Accepted solution

Hi @Anonymous,

This snippet worked okay in a family document in Revit 2017:

 Dim familyDoc As DB.Document = commandData.Application.ActiveUIDocument.Document
        Dim void As DB.GenericForm = _
            New DB.FilteredElementCollector(familyDoc).OfClass(GetType(DB.GenericForm)).Cast(Of DB.GenericForm).Where(Function(s) Not s.IsSolid).FirstOrDefault
        Using trans As New DB.Transaction(familyDoc, "Delete void")
            trans.Start()
            familyDoc.Delete(void.Id)
            trans.Commit()
        End Using

Cheers,

-Matt
_______________________________________________________________________________
Marking a post as a 'solution' helps the community. Giving a post 'Kudos' is as good as saying thanks. Why not do both?

Anonymous
Not applicable
Accepted solution

Hi,

Thank you matthew.

now i got concept & how to delete cut with help of your reply. 

 

-RK

0 Likes

matthew_taylor
Advisor
Advisor
Accepted solution
Great. Please post complete solution (favoured) or mark my solution as a solution.

Cheers,

-Matt
_______________________________________________________________________________
Marking a post as a 'solution' helps the community. Giving a post 'Kudos' is as good as saying thanks. Why not do both?
0 Likes