Solid Form to Void Form

Solid Form to Void Form

Anonymous
Not applicable
624 Views
0 Replies
Message 1 of 1

Solid Form to Void Form

Anonymous
Not applicable

Hi!

 

I've created a form, by Loft, via Revit API: "  loftform = doc.FamilyCreate.NewLoftForm(true, ref_ar_ar); ".

 

Then, I add some edges to that form, with the form.Add Edge Method.

 

After that, I want to convert the form to a void. I know that I can create the form being a void, setting the first parameter to false, however,  if I do that, I am unable to add edges to that form.

 

Is it possible to set the form to a void after I created it?

 

Thanks in advance!!

 

 

 

 

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

 

Here's some of the code:

 

"

ref_ar_2.Append(geometry_arco1.Reference);
ref_ar_2.Append(geometry_arco2.Reference);
ref_ar_2.Append(geometry_arco3.Reference);
ref_ar_2.Append(geometry_arco4.Reference);
ref_ar_ar_2.Append(ref_ar_2);
ref_ar_2 = new ReferenceArray();

loftform2 = doc.FamilyCreate.NewLoftForm(true, ref_ar_ar_2);


if (tipo_I == true)
{


Options opt = new Options();

opt.ComputeReferences = true;

GeometryElement geoElement = loftform2.get_Geometry(opt);

Solid solido = geoElement.First() as Solid;

 

EdgeArray edge = solido.Edges;

Edge edge1 = edge.get_Item(1);
Edge edge2 = edge.get_Item(2);
Edge edge3 = edge.get_Item(3);
Edge edge4 = edge.get_Item(4);
Edge edge5 = edge.get_Item(5);
Edge edge6 = edge.get_Item(6);
Edge edge7 = edge.get_Item(7);
Edge edge8 = edge.get_Item(8);
Edge edge9 = edge.get_Item(9);
Edge edge10 = edge.get_Item(10);
Edge edge11 = edge.get_Item(11);


loftform2.AddEdge(loftform2.GetControlPoints(edge3.Reference).get_Item(1), loftform2.GetControlPoints(edge1.Reference).get_Item(0));
loftform2.AddEdge(loftform2.GetControlPoints(edge6.Reference).get_Item(1), loftform2.GetControlPoints(edge4.Reference).get_Item(0));
loftform2.AddEdge(loftform2.GetControlPoints(edge9.Reference).get_Item(0), loftform2.GetControlPoints(edge7.Reference).get_Item(0));
loftform2.AddEdge(loftform2.GetControlPoints(edge11.Reference).get_Item(1), loftform2.GetControlPoints(edge10.Reference).get_Item(0));

 

}

 

 

"

 

625 Views
0 Replies
Replies (0)