欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

Grid Class in Autodesk.Revit.DB

程序员文章站 2022-06-11 08:21:30
...

 A Grid is a DatumPlane, so it is actually a three dimensional surface.

Static Create(Document, Line)

Creates a new grid line.

Grid gr1=Grid.Create(doc, Line.CreateBound(new XYZ(100, 0, 0), new XYZ(100, 2000, 0)));
            gr1.Name = "A";
            for (int i = 200; i < 2000; i += 100)
            {
                 gr1= Grid.Create(doc, Line.CreateBound(new XYZ(i, 0, 0), new XYZ(i, 2000, 0)));
            }
            Grid gr2 = Grid.Create(doc, Line.CreateBound(new XYZ(0, 100, 0), new XYZ(2000, 100, 0)));
            gr2.Name = "1";
            for (int j = 200; j < 2000; j += 100)
            {
                 gr2 = Grid.Create(doc, Line.CreateBound(new XYZ(0, j, 0), new XYZ(2000, j, 0)));
            }

tips.创建Name后,下一根轴线会自动命名。