当前位置: 首页 > news >正文

做网站都去哪申请网址一般网站的宽度

做网站都去哪申请网址,一般网站的宽度,创建全国文明城市作文,网站 建设目标如图所示原始坐标格式,xy按空格分开,将坐标按顺序在cad中画成多段线: 坐标xy分开并按行重新输入txt,效果如下: 代码如下 : using Autodesk.AutoCAD.DatabaseServices; using Autodesk.AutoCAD.Runtime; us…

如图所示原始坐标格式,xy按空格分开,将坐标按顺序在cad中画成多段线:

 坐标xy分开并按行重新输入txt,效果如下:

代码如下 :

using Autodesk.AutoCAD.DatabaseServices;
using Autodesk.AutoCAD.Runtime;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using AcTools;
using Autodesk.AutoCAD.Geometry;
using System.IO;namespace Acdemo
{public class Acdemo{private void Addl(Entity ent ) {Database db = HostApplicationServices.WorkingDatabase;using (Transaction tr = db.TransactionManager .StartTransaction ()){BlockTable bt = (BlockTable)tr.GetObject (db.BlockTableId ,OpenMode .ForRead  );BlockTableRecord btr = (BlockTableRecord)tr.GetObject(bt[BlockTableRecord .ModelSpace ],OpenMode.ForWrite );btr.AppendEntity (ent);tr.AddNewlyCreatedDBObject(ent,true );tr.Commit ();   }}[CommandMethod("xx")]public void Demo(){Database db = HostApplicationServices.WorkingDatabase;string filename = @"E:\d\8.txt";string filename1 = @"E:\d\999.txt";try{File.Delete(filename1); string contents = File.ReadAllText(filename);List<List<string>> list = new List<List<string>>();Polyline pl = new Polyline();  pl.Closed = true;   pl.ColorIndex = 3;string[] cont = contents.Split(new char[] { ' ', '\n' });double x, y;File.AppendAllLines(filename1, cont);for (int i = 0; i < cont.Length / 2; i++){   x = Convert.ToDouble (cont[2*i]);y = Convert.ToDouble(cont[2*i+1]);pl.AddVertexAt(i, new Point2d(x, y),0.0,0.0,0.0);}Addl (pl);}catch (System.Exception){throw;}}  }
}

其中有个封装函数addl,为封装事务写入实体到数据库的函。

若输入坐标格式有误,则用以下程序,可在命令行提示错误信息:

using Autodesk.AutoCAD.DatabaseServices;
using Autodesk.AutoCAD.Runtime;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using AcTools;
using Autodesk.AutoCAD.Geometry;
using System.IO;
using Autodesk.AutoCAD.EditorInput;
using Autodesk.AutoCAD.ApplicationServices;namespace Acdemo
{public class Acdemo{private void Addl(Entity ent ) {Database db = HostApplicationServices.WorkingDatabase;using (Transaction tr = db.TransactionManager .StartTransaction ()){BlockTable bt = (BlockTable)tr.GetObject (db.BlockTableId ,OpenMode .ForRead  );BlockTableRecord btr = (BlockTableRecord)tr.GetObject(bt[BlockTableRecord .ModelSpace ],OpenMode.ForWrite );btr.AppendEntity (ent);tr.AddNewlyCreatedDBObject(ent,true );tr.Commit ();   }}[CommandMethod("xx")]public void Demo(){Database db = HostApplicationServices.WorkingDatabase;string filename = @"E:\d\8.txt";string filename1 = @"E:\d\999.txt";try{File.Delete(filename1); string contents = File.ReadAllText(filename);List<List<string>> list = new List<List<string>>();Polyline pl = new Polyline();  pl.Closed = true;   pl.ColorIndex = 3;string[] cont = contents.Split(new char[] { ' ', '\n' });double x, y;File.AppendAllLines(filename1, cont);for (int i = 0; i < cont.Length / 2; i++){   //x = Convert.ToDouble (cont[2*i]);//y = Convert.ToDouble(cont[2*i+1]);bool bx = double.TryParse(cont[2*i], out x);bool by = double.TryParse (cont[2*i + 1],out y);if (bx==false ||  by == false ) {Editor ed = Application .DocumentManager.MdiActiveDocument .Editor ;ed.WriteMessage($"有错误,{cont[2 * i]},{cont[2 * i+1]}");}pl.AddVertexAt(i, new Point2d(x, y),0.0,0.0,0.0);}Addl (pl);}catch (System.Exception){throw;}}  }
}

 

http://www.yayakq.cn/news/248088/

相关文章:

  • 马鞍山建设局网站半厘米wordpress
  • 由一个网页建成的网站简单的html网页制作模板免费
  • 购物网站建设过程安卓软件定制开发
  • 做设计的网站定制app下载软件电脑版
  • 高端手机网站建设需要多少钱湖南企业网站定制
  • 那些网站是做俄罗斯鞋子素材网免费
  • 进空间的网站网站 短链接怎么做
  • 建设银行 网站怎么打不开了开一个网站多少钱
  • 微信分销平台排行广州网站优化排名哪家好
  • 单位网站 单位网页 区别吗建筑网格布搭接
  • 公司两个网站可以做友情链接吗广州万户网络科技有限公司
  • 行业前10的网站建设定制网站建设公司价格
  • 建设网站需要什么设施?专业手机网站制作哪家好
  • 手机网站开发注意网站可以换域名吗
  • flash网站开源正规的电商平台有哪些
  • 大中小网站的区分网站开发了下载文件需要
  • 地方网站域名莱州网络推广
  • 网站服务名词解释中国建设银行官网首页 网站首页
  • 网站开发工程师应聘书范文700字门户网站建设内
  • 网站步骤林业建设协会网站
  • 域名申请 网站建设wordpress媒体插件
  • 毕设如何做网站东丽做网站公司
  • 做论坛网站好吗如何打开网站网页
  • 舟山建设网站公司建设网络平台的流程
  • 廊坊网站建站建设全球新冠死亡人数
  • 上海响应式网站建设推荐湘潭市建设工程质量监督站网站
  • 中国建设劳动学会是假网站吗深圳沙井做网站
  • 徐州网站制作功能深圳公司排名100强
  • wordpress站群主机情侣视频被4万人围观
  • 深圳设计公司哪家怎么做优化关键词