示例#1
0
        public void ByGeometry_GoodArgs()
        {
            var cube = Autodesk.DesignScript.Geometry.Cuboid.ByCorners(
                Autodesk.DesignScript.Geometry.Point.ByCoordinates(0, 0, 0),
                Autodesk.DesignScript.Geometry.Point.ByCoordinates(100, 100, 100));

            string path = System.Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData);

            path = System.IO.Path.Combine(path, @"Autodesk\RAC 2016\Family Templates\English\Metric Generic Model.rft");

            var type = FamilyType.ByGeometry(cube, "MyCube", Category.ByName("Mass"), path, Material.ByName("Poche"));

            Assert.NotNull(type);
            Assert.IsTrue(typeof(FamilyType) == type.GetType());
        }