Announcements

The Autodesk Community Forums has a new look. Read more about what's changed on the Community Announcements board.

How can I align FreeFormElement to reference line?

InoueKazuyaRo
Participant

How can I align FreeFormElement to reference line?

InoueKazuyaRo
Participant
Participant

I wanted to align FreeFormElement to reference line.

I tried following way,

 

 

FreeFormElement freeForm = FreeFormElement.Create(doc,solid);
Autodesk.Revit.DB.Options opt = new Options();
GeometryObject freeFormGeometry = freeForm.get_Geometry(opt);
Solid freeFormSolid = freeFormGeometry as Solid;

foreach(Face freeFace in freeFormSolid.Faces){
 EdgeArrayArray freeEdgeArray = freeFace.EdgeLoops;
 foreach(EdgeArray freeEdges in edgeArray){
  foreach(Edge freeEdge in freeEdges){
   doc.FamilyCreate.NewAlignment(doc.ActiveView, modelcurve.GeometryCurve.Reference, freeEdge.Reference);
  }
 }
}

 

 

I wanted to align freeEdge (as FreeFormElement edge) to modelcurve (as reference line).

But I cannot get the geometry of created FreeFormElment as null.

 

TIA

0 Likes
Reply
258 Views
0 Replies
Replies (0)