NewAlignment Method

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I try to create a new family (rectangular-concrete-column) using structural column.rft. Below is part of my code:
//Create Rectangular Extrusion
NewExtrusion(true, CurveArrArray columnProfile, SketchPlane pSketchPlane, double dHeight);
//Add Alignment
//pviewplan = "Lowe Ref. Level"
//PlanarFace right
//PlanarFace left
NewAlignment(View pviewplan, right.reference, left.reference) ;
but this method failed to create an alignment, an exception thrown "Autodesk.Revit.Exceptions.ArgumentException"
Thrown when the input argument-"headerReference" or "otherReference"-is invalid.
Am i using the invalid argument? According to the revit api, the reference
These two references must be one of the following combinations:
- 2 planar faces
- 2 lines
- line and point
- 2 arcs
- 2 cylindrical faces
These references must be already geometrically aligned (this function will not force them to become aligned).
Can anyone share some idea on this, article, blog, sourcecode (Note: I am using Revit 2011 API)
Any help is appreciated. Thanks.