Message 1 of 1
NewFamilyInstance ArgumentsInconsistentException on line projected on sketch plane
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello All,
I try to create line-based family instance on curtain wall grid.
The problem is that no mather what face/reference i get, when I project my line on this face/reference I get ArgumentsInconsistentException when I try to create family instance.
I found this topic but even if I create new sketch plane this exception still oocurs.
var extFace = GetCurtainWallExternalFace(newWall);
if (extFace == null)
continue;
var plane = Plane.CreateByNormalAndOrigin(extFace.FaceNormal, extFace.Origin);
var skPlane = SketchPlane.Create(Doc, plane);
plane.Project(curve.GetEndPoint(0), out UV uv0, out double dist0);
var p0 = curve.GetEndPoint(0) + plane.Normal * dist0;
plane.Project(curve.GetEndPoint(1), out UV uv1, out double dist1);
var p1 = curve.GetEndPoint(1) + plane.Normal * dist1;
var newLine = Line.CreateBound(p0, p1);
var newElement = Doc.Create.NewFamilyInstance(skPlane.GetPlaneReference(), newLine, vProfileType);
Best regards
Andrzej