예제 #1
0
        public void ReadTest()
        {
            var reader = new DxfHelperReader();

            using (var ms = File.OpenRead(@"P:\Demo\AutoCAD\WebApplication\Draw2.dxf"))
            {
                reader.Read(ms, 1, "all");
            }
        }
예제 #2
0
        public void ReadTest()
        {
            DxfHelperReader reader = new DxfHelperReader();

            using (var ms = File.OpenRead("Draw3.dxf"))
            {
                reader.Read(ms, 1);
            }
        }
예제 #3
0
        public JsonResult GetData(string type)
        {
            FileInfo        fileInfo        = new FileInfo(@"D:\学习\asp.net\Github\WebApplication\WebApplication\Draw3.dxf");
            var             fileStream      = fileInfo.OpenRead();
            DxfHelperReader dxfHelperReader = new DxfHelperReader();
            var             list1           = dxfHelperReader.Read(fileStream, int.Parse(type));

            //
            //P:\Demo\WebApplication\WebApplication\Draw3.dxf
            return(Json(list1, JsonRequestBehavior.AllowGet));
        }
예제 #4
0
        public JsonResult GetData(string type, string layer)
        {
            //FileInfo fileInfo = new FileInfo(@"P:\Demo\WebApplication\WebApplication\Draw3.dxf");

            using (var ms = System.IO.File.OpenRead(@"P:\Demo\AutoCAD\WebApplication\Draw3.dxf"))
            {
                DxfHelperReader dxfHelperReader = new DxfHelperReader();
                var             list1           = dxfHelperReader.Read(ms, int.Parse(type), layer);

                //D:\学习\asp.net\vs2017\WebApplication\WebApplication\Draw3.dxf
                //
                return(Json(new { list = list1 }, JsonRequestBehavior.AllowGet));
            }
        }