コード例 #1
0
        public void CreateByLine_InvalidArgs()
        {
            var line1 = Line.ByStartPointEndPoint(Point.ByCoordinates(0, 0, 0), Point.ByCoordinates(0, 6, 0));

            var line2 = Line.ByStartPointEndPoint(Point.ByCoordinates(2, 0, 0), Point.ByCoordinates(2, 6, 0));

            System.Collections.Generic.List <Curve> curves = new System.Collections.Generic.List <Curve>()
            {
                line1, line2
            };

            var line3 = Line.ByStartPointEndPoint(Point.ByCoordinates(0, 3, 0), Point.ByCoordinates(2, 3, 0));

            Assert.Throws(typeof(System.ArgumentException), () => Dimension.ByEdges(Revit.Application.Document.Current.ActiveView, curves, line3));
        }