I'm coding a tool to drill holes to beams (structural framing). Each beam will host 2 drills, one to each end of it.
To create my void extrusion that will cut the host I create an Arc at the coordinate (0, 0, 0) and extrude it in my "Metric Generic Model.rtf" located at "C:\ProgramData\Autodesk\RVT 2020\Family Templates\English" directory. Then I load the family into the document with the beams to be drilled and get the FamilySymbol like this:
Family family = familyTemplateDoc.LoadFamily(doc);
FamilySymbol familySymbol = family.GetFamilySymbolIds()
.Select(x => doc.GetElement(x) as FamilySymbol)
.FirstOrDefault();
In my document I insert the family instance using "doc.Create.NewFamilyInstance" ate the desired coordinate and finally AddInstanceVoidCut the beams.
I'm facing the following issue (I moved the voids up so we can see it easily):
Apparently each time I extrude a new Arc I am stacking it (the thicker cylinder is above for visualisation, it would overwrite the thinner one).
The next beam to be drilled will keep stacking the void forms. So if I select 4 beams, the 8th hole will be done by the 8 void forms stacked.
What could I be doing wrong? The extrusion needs to be created at the (0, 0, 0) coordinate so it can be easily modified at the .rfa file, beeing easily found throughout the .rfa file.
Solved! Go to Solution.
Solved by RPTHOMAS108. Go to Solution.
Sounds like a case of wrong type of family template and wrong NewFamilyInstance overload, there are easier ways to create holes in beams:
Use "Metric Generic Model face based.rft" cut the host with the void in the family.
Load the family into the project
Host the family on the beam web:
NewFamilyInstance(Face, XYZ, XYZ, FamilySymbol) or
NewFamilyInstance(Reference, XYZ, XYZ, FamilySymbol)
Note also there is no need to even create a family for this, you can create an opening by face:
Document.NewOpening
Thank you for the confirmation and many thanks to Richard for the good suggestion! Preserved for posterity:
https://thebuildingcoder.typepad.com/blog/2022/03/drilling-holes-in-beams-and-other-projects.html#4