Hi, I want to create a Bspline curve element, but when I try to create the bspline, the MS will have the error and close automatic.
This is my code:
BCOM.Application msApp = Bentley.MstnPlatformNET.InteropServices.Utilities.ComApp; List<BCOM.Point3d> pts = new List<BCOM.Point3d>(); pts.Add(createPoint(-20, 0, 20)); pts.Add(createPoint(-20, 0, -20)); pts.Add(createPoint(20, 0, -20)); pts.Add(createPoint(20, 0, 20)); pts.Add(createPoint(-20, 0, 20)); BCOM.ShapeElement shape = msApp.CreateShapeElement1(null, pts.ToArray(), BCOM.MsdFillMode.Filled); BCOM.Point3d sPt = createPoint(0, 0, 0); BCOM.Point3d ePt = createPoint(200, 200, 200); BCOM.CurveElement lin = Model_Draw.Instance.createClothoidLine(createPoint(0, 0, 0), 300, 0, 90, true); BCOM.BsplineCurveElement cur = lin.AsBsplineCurveElement(); msApp.ActiveModelReference.AddElement(cur); BCOM.SmartSolidElement SmartELE = Model_Draw.Instance.msApp.SmartSolid.SweepProfileAlongPath(shape, cur); msApp.ActiveModelReference.AddElement(SmartELE);
PS. If I sweep profile along curve element, the MS has error,too.