ppblog 发表于 2005-10-12 13:32:00

[原创]发布一个ObjectARX .NET AutoCAD 二次开发 添加各种实体的类

<IMG id=Code_Open_Image style="DISPLAY: inline" onclick="this.style.display='none'; Code_Open_Text.style.display='none'; Code_Closed_Image.style.display='inline'; Code_Closed_Text.style.display='inline';" height=16 src="http://objectarx.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif" width=11 align=top><BR><!--<br><br>Code highlighting produced by Actipro CodeHighlighter (freeware)<br>http://www.CodeHighlighter.com/<br><br>--><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/None.gif" align=top>Imports&nbsp;Autodesk.AutoCAD.ApplicationServices<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/None.gif" align=top>Imports&nbsp;Autodesk.AutoCAD.DatabaseServices<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/None.gif" align=top>Imports&nbsp;Autodesk.AutoCAD.Runtime<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/None.gif" align=top>Imports&nbsp;Autodesk.AutoCAD.Geometry<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/None.gif" align=top>Imports&nbsp;Autodesk.AutoCAD.EditorInput<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/None.gif" align=top>Imports&nbsp;Autodesk.AutoCAD.Colors<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/None.gif" align=top>Imports&nbsp;DBTransMan&nbsp;=&nbsp;Autodesk.AutoCAD.DatabaseServices.TransactionManager<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/None.gif" align=top>REM&nbsp;Line,&nbsp;Circle,&nbsp;Arc,&nbsp;Ellipse,&nbsp;Polyline,&nbsp;DBText,&nbsp;MText,&nbsp;Table,&nbsp;Hatch&nbsp;and&nbsp;the&nbsp;Dimensions<BR><IMG id=Codehighlighter1_393_16470_Open_Image onclick="this.style.display='none'; Codehighlighter1_393_16470_Open_Text.style.display='none'; Codehighlighter1_393_16470_Closed_Image.style.display='inline'; Codehighlighter1_393_16470_Closed_Text.style.display='inline';" src="http://objectarx.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif" align=top><IMG id=Codehighlighter1_393_16470_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_393_16470_Closed_Text.style.display='none'; Codehighlighter1_393_16470_Open_Image.style.display='inline'; Codehighlighter1_393_16470_Open_Text.style.display='inline';" src="http://objectarx.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif" align=top>Public&nbsp;Class&nbsp;PublicClassClass&nbsp;PublicClass<BR><IMG id=Codehighlighter1_415_572_Open_Image onclick="this.style.display='none'; Codehighlighter1_415_572_Open_Text.style.display='none'; Codehighlighter1_415_572_Closed_Image.style.display='inline'; Codehighlighter1_415_572_Closed_Text.style.display='inline';" src="http://objectarx.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_415_572_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_415_572_Closed_Text.style.display='none'; Codehighlighter1_415_572_Open_Image.style.display='inline'; Codehighlighter1_415_572_Open_Text.style.display='inline';" src="http://objectarx.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;Enum&nbsp;PPColorEnum&nbsp;PPColor<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Red&nbsp;=&nbsp;1<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Yellow&nbsp;=&nbsp;2<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Green&nbsp;=&nbsp;3<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cyan&nbsp;=&nbsp;4&nbsp;'青色<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Blue&nbsp;=&nbsp;5<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Fuchsin&nbsp;=&nbsp;6&nbsp;'品红<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;White&nbsp;=&nbsp;7<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;End&nbsp;Enum<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;REM&nbsp;&lt;summary&gt;<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;'''函数注释<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;'''&lt;/summary&gt;&nbsp;&nbsp;<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;'''&lt;typeparam&nbsp;name="msg"&gt;变量参数的注释说明&lt;/typeparam&gt;<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;'''&lt;remarks&gt;<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;'''自己的注释说明<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top><BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;'''&lt;/remarks&gt;<BR><IMG id=Codehighlighter1_737_873_Open_Image onclick="this.style.display='none'; Codehighlighter1_737_873_Open_Text.style.display='none'; Codehighlighter1_737_873_Closed_Image.style.display='inline'; Codehighlighter1_737_873_Closed_Text.style.display='inline';" src="http://objectarx.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_737_873_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_737_873_Closed_Text.style.display='none'; Codehighlighter1_737_873_Open_Image.style.display='inline'; Codehighlighter1_737_873_Open_Text.style.display='inline';" src="http://objectarx.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;Public&nbsp;Sub&nbsp;ShowMessage()Sub&nbsp;ShowMessage(ByVal&nbsp;msg&nbsp;As&nbsp;String)<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Application.DocumentManager.MdiActiveDocument.Editor.WriteMessage(Chr(10)&nbsp;+&nbsp;msg)<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;End&nbsp;Sub<BR><IMG id=Codehighlighter1_886_1088_Open_Image onclick="this.style.display='none'; Codehighlighter1_886_1088_Open_Text.style.display='none'; Codehighlighter1_886_1088_Closed_Image.style.display='inline'; Codehighlighter1_886_1088_Closed_Text.style.display='inline';" src="http://objectarx.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_886_1088_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_886_1088_Closed_Text.style.display='none'; Codehighlighter1_886_1088_Open_Image.style.display='inline'; Codehighlighter1_886_1088_Open_Text.style.display='inline';" src="http://objectarx.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;Public&nbsp;Sub&nbsp;SendCommand()Sub&nbsp;SendCommand(ByVal&nbsp;cmd&nbsp;As&nbsp;String)<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Dim&nbsp;dotnetDoc&nbsp;As&nbsp;Document&nbsp;=&nbsp;Application.DocumentManager.MdiActiveDocument<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dotnetDoc.SendStringToExecute(cmd&nbsp;+&nbsp;Chr(13),&nbsp;True,&nbsp;False,&nbsp;False)<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;End&nbsp;Sub<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top><BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top><BR><IMG id=Codehighlighter1_1103_1422_Open_Image onclick="this.style.display='none'; Codehighlighter1_1103_1422_Open_Text.style.display='none'; Codehighlighter1_1103_1422_Closed_Image.style.display='inline'; Codehighlighter1_1103_1422_Closed_Text.style.display='inline';" src="http://objectarx.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_1103_1422_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_1103_1422_Closed_Text.style.display='none'; Codehighlighter1_1103_1422_Open_Image.style.display='inline'; Codehighlighter1_1103_1422_Open_Text.style.display='inline';" src="http://objectarx.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;Public&nbsp;Function&nbsp;GetPointAR()Function&nbsp;GetPointAR(ByVal&nbsp;pt1&nbsp;As&nbsp;Point3d,&nbsp;ByVal&nbsp;angle&nbsp;As&nbsp;Double,&nbsp;ByVal&nbsp;length&nbsp;As&nbsp;Double)&nbsp;As&nbsp;Point3d<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;REM&nbsp;angle(计算sin&nbsp;cos&nbsp;时&nbsp;是以弧度计量的角度)<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;angle&nbsp;=&nbsp;angle&nbsp;*&nbsp;Math.PI&nbsp;/&nbsp;180<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Dim&nbsp;pt2&nbsp;As&nbsp;New&nbsp;Point3d(pt1.X&nbsp;+&nbsp;length&nbsp;*&nbsp;Math.Cos(angle),&nbsp;pt1.Y&nbsp;+&nbsp;length&nbsp;*&nbsp;Math.Sin(angle),&nbsp;pt1.Z)<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return&nbsp;pt2<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;End&nbsp;Function<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;'&nbsp;&nbsp;Public&nbsp;Sub&nbsp;ShowMessage(ByVal&nbsp;msg&nbsp;As&nbsp;String,&nbsp;ByVal&nbsp;ex&nbsp;As&nbsp;Autodesk.AutoCAD.Runtime.Exception)<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ShowMessage(Chr(10)&nbsp;+&nbsp;msg&nbsp;+&nbsp;"错误信息如下:"&nbsp;+&nbsp;Chr(10)&nbsp;+&nbsp;ex.Message)<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;'&nbsp;&nbsp;End&nbsp;Sub<BR><IMG id=Codehighlighter1_1622_2377_Open_Image onclick="this.style.display='none'; Codehighlighter1_1622_2377_Open_Text.style.display='none'; Codehighlighter1_1622_2377_Closed_Image.style.display='inline'; Codehighlighter1_1622_2377_Closed_Text.style.display='inline';" src="http://objectarx.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_1622_2377_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_1622_2377_Closed_Text.style.display='none'; Codehighlighter1_1622_2377_Open_Image.style.display='inline'; Codehighlighter1_1622_2377_Open_Text.style.display='inline';" src="http://objectarx.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;Public&nbsp;Function&nbsp;AddEntity()Function&nbsp;AddEntity(ByVal&nbsp;ent&nbsp;As&nbsp;Entity)&nbsp;As&nbsp;ObjectId<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Dim&nbsp;db&nbsp;As&nbsp;Database&nbsp;=&nbsp;Application.DocumentManager.MdiActiveDocument.Database<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Dim&nbsp;tm&nbsp;As&nbsp;DBTransMan&nbsp;=&nbsp;db.TransactionManager<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Dim&nbsp;ta&nbsp;As&nbsp;Transaction&nbsp;=&nbsp;tm.StartTransaction<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Try<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Dim&nbsp;bt&nbsp;As&nbsp;BlockTable&nbsp;=&nbsp;ta.GetObject(db.BlockTableId,&nbsp;OpenMode.ForWrite,&nbsp;False)<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Dim&nbsp;btr&nbsp;As&nbsp;BlockTableRecord&nbsp;=&nbsp;ta.GetObject(bt(BlockTableRecord.ModelSpace),&nbsp;OpenMode.ForWrite,&nbsp;False)<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Dim&nbsp;objId&nbsp;As&nbsp;ObjectId&nbsp;=&nbsp;btr.AppendEntity(ent)<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ta.AddNewlyCreatedDBObject(ent,&nbsp;True)<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ta.Commit()<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ta.Dispose()<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return&nbsp;objId<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Catch&nbsp;ex&nbsp;As&nbsp;Exception<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ShowMessage("AddEntity出错了:"&nbsp;+&nbsp;ex.Message)<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;End&nbsp;Try<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;End&nbsp;Function<BR><IMG id=Codehighlighter1_2390_3593_Open_Image onclick="this.style.display='none'; Codehighlighter1_2390_3593_Open_Text.style.display='none'; Codehighlighter1_2390_3593_Closed_Image.style.display='inline'; Codehighlighter1_2390_3593_Closed_Text.style.display='inline';" src="http://objectarx.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_2390_3593_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_2390_3593_Closed_Text.style.display='none'; Codehighlighter1_2390_3593_Open_Image.style.display='inline'; Codehighlighter1_2390_3593_Open_Text.style.display='inline';" src="http://objectarx.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;Public&nbsp;Function&nbsp;AddLayer()Function&nbsp;AddLayer(ByVal&nbsp;LayerName&nbsp;As&nbsp;String,&nbsp;ByVal&nbsp;newColor&nbsp;As&nbsp;PPColor,&nbsp;ByVal&nbsp;LineWeithS&nbsp;As&nbsp;LineWeight,&nbsp;ByVal&nbsp;LineTypeName&nbsp;As&nbsp;String,&nbsp;Optional&nbsp;ByVal&nbsp;Description&nbsp;As&nbsp;String&nbsp;=&nbsp;"没有描述")<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Dim&nbsp;objId&nbsp;As&nbsp;ObjectId<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Dim&nbsp;db&nbsp;As&nbsp;Database&nbsp;=&nbsp;Application.DocumentManager.MdiActiveDocument.Database<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Dim&nbsp;tm&nbsp;As&nbsp;DBTransMan&nbsp;=&nbsp;db.TransactionManager<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Dim&nbsp;ta&nbsp;As&nbsp;Transaction&nbsp;=&nbsp;tm.StartTransaction<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Dim&nbsp;lt&nbsp;As&nbsp;LayerTable&nbsp;=&nbsp;tm.GetObject(db.LayerTableId,&nbsp;OpenMode.ForWrite)<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;If&nbsp;lt.Has(LayerName)&nbsp;Then<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;objId&nbsp;=&nbsp;lt.Item(LayerName)<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Else<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Dim&nbsp;ltr&nbsp;As&nbsp;New&nbsp;LayerTableRecord<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ltr.Name&nbsp;=&nbsp;LayerName<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Dim&nbsp;ColorType&nbsp;As&nbsp;Type&nbsp;=&nbsp;GetType(PPColor)<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Dim&nbsp;color1&nbsp;As&nbsp;Color<BR><IMG id=Codehighlighter1_3180_3593_Open_Image onclick="this.style.display='none'; Codehighlighter1_3180_3593_Open_Text.style.display='none'; Codehighlighter1_3180_3593_Closed_Image.style.display='inline'; Codehighlighter1_3180_3593_Closed_Text.style.display='inline';" src="http://objectarx.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_3180_3593_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_3180_3593_Closed_Text.style.display='none'; Codehighlighter1_3180_3593_Open_Image.style.display='inline'; Codehighlighter1_3180_3593_Open_Text.style.display='inline';" src="http://objectarx.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;color1&nbsp;=&nbsp;Color.FromColorIndex(ColorMethod.ByAci,&nbsp;Enum].Parse(ColorType,&nbsp;newColor.ToString))<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ltr.Color&nbsp;=&nbsp;color1<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ltr.LineWeight&nbsp;=&nbsp;LineWeithS<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ltr.LinetypeObjectId&nbsp;=&nbsp;LineType(LineTypeName)<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ltr.Description&nbsp;=&nbsp;Description<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;objId&nbsp;=&nbsp;lt.Add(ltr)<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tm.AddNewlyCreatedDBObject(ltr,&nbsp;True)<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ta.Commit()<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;End&nbsp;If<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ta.Dispose()<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tm.Dispose()<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return&nbsp;objId<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;End&nbsp;Function<BR><IMG id=Codehighlighter1_3606_4014_Open_Image onclick="this.style.display='none'; Codehighlighter1_3606_4014_Open_Text.style.display='none'; Codehighlighter1_3606_4014_Closed_Image.style.display='inline'; Codehighlighter1_3606_4014_Closed_Text.style.display='inline';" src="http://objectarx.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_3606_4014_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_3606_4014_Closed_Text.style.display='none'; Codehighlighter1_3606_4014_Open_Image.style.display='inline'; Codehighlighter1_3606_4014_Open_Text.style.display='inline';" src="http://objectarx.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;Public&nbsp;Function&nbsp;AddArc()Function&nbsp;AddArc(ByVal&nbsp;centerPoint&nbsp;As&nbsp;Point3d,&nbsp;ByVal&nbsp;normal&nbsp;As&nbsp;Vector3d,&nbsp;ByVal&nbsp;radius&nbsp;As&nbsp;Double,&nbsp;ByVal&nbsp;startAngle&nbsp;As&nbsp;Double,&nbsp;ByVal&nbsp;endAngle&nbsp;As&nbsp;Double,&nbsp;ByVal&nbsp;LayerName&nbsp;As&nbsp;String)&nbsp;As&nbsp;ObjectId<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;REM&nbsp;此处不用设置线型,颜色等,因为这些已经在图层里设置好了<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Dim&nbsp;a&nbsp;As&nbsp;New&nbsp;Arc(centerPoint,&nbsp;normal,&nbsp;radius,&nbsp;startAngle,&nbsp;endAngle)<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;a.Layer&nbsp;=&nbsp;LayerName<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;REM&nbsp;&nbsp;a.Clone()&nbsp;REM&nbsp;复制实体<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return&nbsp;AddEntity(a)<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;End&nbsp;Function<BR><IMG id=Codehighlighter1_4027_4255_Open_Image onclick="this.style.display='none'; Codehighlighter1_4027_4255_Open_Text.style.display='none'; Codehighlighter1_4027_4255_Closed_Image.style.display='inline'; Codehighlighter1_4027_4255_Closed_Text.style.display='inline';" src="http://objectarx.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_4027_4255_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_4027_4255_Closed_Text.style.display='none'; Codehighlighter1_4027_4255_Open_Image.style.display='inline'; Codehighlighter1_4027_4255_Open_Text.style.display='inline';" src="http://objectarx.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;Public&nbsp;Function&nbsp;AddLine()Function&nbsp;AddLine(ByVal&nbsp;startPt&nbsp;As&nbsp;Point3d,&nbsp;ByVal&nbsp;endpt&nbsp;As&nbsp;Point3d,&nbsp;ByVal&nbsp;LayerName&nbsp;As&nbsp;String)&nbsp;As&nbsp;ObjectId<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Dim&nbsp;line&nbsp;As&nbsp;New&nbsp;Line(startPt,&nbsp;endpt)<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;line.Layer&nbsp;=&nbsp;LayerName<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return&nbsp;AddEntity(line)<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;End&nbsp;Function<BR><IMG id=Codehighlighter1_4268_4548_Open_Image onclick="this.style.display='none'; Codehighlighter1_4268_4548_Open_Text.style.display='none'; Codehighlighter1_4268_4548_Closed_Image.style.display='inline'; Codehighlighter1_4268_4548_Closed_Text.style.display='inline';" src="http://objectarx.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_4268_4548_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_4268_4548_Closed_Text.style.display='none'; Codehighlighter1_4268_4548_Open_Image.style.display='inline'; Codehighlighter1_4268_4548_Open_Text.style.display='inline';" src="http://objectarx.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;Public&nbsp;Function&nbsp;AddLine()Function&nbsp;AddLine(ByVal&nbsp;startPt&nbsp;As&nbsp;Point3d,&nbsp;ByVal&nbsp;angle&nbsp;As&nbsp;Double,&nbsp;ByVal&nbsp;length&nbsp;As&nbsp;Double,&nbsp;ByVal&nbsp;LayerName&nbsp;As&nbsp;String)&nbsp;As&nbsp;ObjectId<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Dim&nbsp;line&nbsp;As&nbsp;New&nbsp;Line(startPt,&nbsp;GetPointAR(startPt,&nbsp;angle,&nbsp;length))<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;line.Layer&nbsp;=&nbsp;LayerName<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return&nbsp;AddEntity(line)<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;End&nbsp;Function<BR><IMG id=Codehighlighter1_4561_4963_Open_Image onclick="this.style.display='none'; Codehighlighter1_4561_4963_Open_Text.style.display='none'; Codehighlighter1_4561_4963_Closed_Image.style.display='inline'; Codehighlighter1_4561_4963_Closed_Text.style.display='inline';" src="http://objectarx.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_4561_4963_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_4561_4963_Closed_Text.style.display='none'; Codehighlighter1_4561_4963_Open_Image.style.display='inline'; Codehighlighter1_4561_4963_Open_Text.style.display='inline';" src="http://objectarx.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;Public&nbsp;Function&nbsp;AddMLine()Function&nbsp;AddMLine(ByVal&nbsp;scale&nbsp;As&nbsp;Double,&nbsp;ByVal&nbsp;newVertex&nbsp;As&nbsp;Point3d,&nbsp;ByVal&nbsp;LayerName&nbsp;As&nbsp;String)&nbsp;As&nbsp;ObjectId<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;REM&nbsp;多样线<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Dim&nbsp;ml&nbsp;As&nbsp;New&nbsp;Mline<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top><BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Dim&nbsp;ms&nbsp;As&nbsp;New&nbsp;MlineStyle<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ms.Name&nbsp;=&nbsp;"standard"<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top><BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ml.Style&nbsp;=&nbsp;ms.ObjectId<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ml.Layer&nbsp;=&nbsp;LayerName<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ml.Scale&nbsp;=&nbsp;scale<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ml.AppendSegment(newVertex)<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ml.AppendSegment(New&nbsp;Point3d(20,&nbsp;20,&nbsp;0))<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top><BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;End&nbsp;Function<BR><IMG id=Codehighlighter1_4976_5367_Open_Image onclick="this.style.display='none'; Codehighlighter1_4976_5367_Open_Text.style.display='none'; Codehighlighter1_4976_5367_Closed_Image.style.display='inline'; Codehighlighter1_4976_5367_Closed_Text.style.display='inline';" src="http://objectarx.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_4976_5367_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_4976_5367_Closed_Text.style.display='none'; Codehighlighter1_4976_5367_Open_Image.style.display='inline'; Codehighlighter1_4976_5367_Open_Text.style.display='inline';" src="http://objectarx.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;Public&nbsp;Function&nbsp;AddTrace()Function&nbsp;AddTrace(ByVal&nbsp;pointer1&nbsp;As&nbsp;Point3d,&nbsp;ByVal&nbsp;pointer2&nbsp;As&nbsp;Point3d,&nbsp;ByVal&nbsp;pinter3&nbsp;As&nbsp;Point3d,&nbsp;ByVal&nbsp;pointer4&nbsp;As&nbsp;Point3d,&nbsp;ByVal&nbsp;LayerName&nbsp;As&nbsp;String)&nbsp;As&nbsp;ObjectId<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;REM&nbsp;有问题吧<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Dim&nbsp;myTrace&nbsp;As&nbsp;New&nbsp;Trace(pointer1,&nbsp;pointer2,&nbsp;pinter3,&nbsp;pointer4)<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;myTrace.LineWeight&nbsp;=&nbsp;LineWeight.LineWeight200<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;myTrace.Layer&nbsp;=&nbsp;LayerName<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return&nbsp;AddEntity(myTrace)<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top><BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;End&nbsp;Function<BR><IMG id=Codehighlighter1_5380_5694_Open_Image onclick="this.style.display='none'; Codehighlighter1_5380_5694_Open_Text.style.display='none'; Codehighlighter1_5380_5694_Closed_Image.style.display='inline'; Codehighlighter1_5380_5694_Closed_Text.style.display='inline';" src="http://objectarx.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_5380_5694_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_5380_5694_Closed_Text.style.display='none'; Codehighlighter1_5380_5694_Open_Image.style.display='inline'; Codehighlighter1_5380_5694_Open_Text.style.display='inline';" src="http://objectarx.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;Public&nbsp;Function&nbsp;AddShape()Function&nbsp;AddShape(ByVal&nbsp;position&nbsp;As&nbsp;Point3d,&nbsp;ByVal&nbsp;size&nbsp;As&nbsp;Double,&nbsp;ByVal&nbsp;shapeName&nbsp;As&nbsp;String,&nbsp;ByVal&nbsp;rotation&nbsp;As&nbsp;Double,&nbsp;ByVal&nbsp;widthFactor&nbsp;As&nbsp;Double)&nbsp;As&nbsp;ObjectId<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;REM&nbsp;shapeName&nbsp;???&nbsp;有问题吧<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Dim&nbsp;sh&nbsp;As&nbsp;New&nbsp;Shape(position,&nbsp;size,&nbsp;shapeName,&nbsp;rotation,&nbsp;widthFactor)<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return&nbsp;AddEntity(sh)<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;End&nbsp;Function<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top><BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top><BR><IMG id=Codehighlighter1_5709_6100_Open_Image onclick="this.style.display='none'; Codehighlighter1_5709_6100_Open_Text.style.display='none'; Codehighlighter1_5709_6100_Closed_Image.style.display='inline'; Codehighlighter1_5709_6100_Closed_Text.style.display='inline';" src="http://objectarx.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_5709_6100_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_5709_6100_Closed_Text.style.display='none'; Codehighlighter1_5709_6100_Open_Image.style.display='inline'; Codehighlighter1_5709_6100_Open_Text.style.display='inline';" src="http://objectarx.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;Public&nbsp;Function&nbsp;AddPolygon()Function&nbsp;AddPolygon(ByVal&nbsp;upperLeft&nbsp;As&nbsp;Point3d,&nbsp;ByVal&nbsp;upperRight&nbsp;As&nbsp;Point3d,&nbsp;ByVal&nbsp;lowerLeft&nbsp;As&nbsp;Point3d,&nbsp;ByVal&nbsp;lowerRight&nbsp;As&nbsp;Point3d)&nbsp;As&nbsp;ObjectId<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Dim&nbsp;rect&nbsp;As&nbsp;New&nbsp;Rectangle3d(upperLeft,&nbsp;upperRight,&nbsp;lowerLeft,&nbsp;lowerRight)<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Dim&nbsp;rect3d&nbsp;As&nbsp;Entity3d<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top><BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top><BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'&nbsp;&nbsp;&nbsp;Dim&nbsp;m&nbsp;As&nbsp;New&nbsp;Plane(New&nbsp;Point3d(100,&nbsp;100,&nbsp;0),&nbsp;New&nbsp;Point3d(100,&nbsp;200,&nbsp;0),&nbsp;New&nbsp;Point3d(100,&nbsp;200,&nbsp;100))<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top><BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top><BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top><BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top><BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;End&nbsp;Function<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;'''&lt;summary&gt;<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;'''获取或设置外部处理过程的委托<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;'''&lt;/summary&gt;<BR><IMG id=Codehighlighter1_6170_6410_Open_Image onclick="this.style.display='none'; Codehighlighter1_6170_6410_Open_Text.style.display='none'; Codehighlighter1_6170_6410_Closed_Image.style.display='inline'; Codehighlighter1_6170_6410_Closed_Text.style.display='inline';" src="http://objectarx.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_6170_6410_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_6170_6410_Closed_Text.style.display='none'; Codehighlighter1_6170_6410_Open_Image.style.display='inline'; Codehighlighter1_6170_6410_Open_Text.style.display='inline';" src="http://objectarx.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;Public&nbsp;Function&nbsp;AddCircle()Function&nbsp;AddCircle(ByVal&nbsp;center&nbsp;As&nbsp;Point3d,&nbsp;ByVal&nbsp;radius&nbsp;As&nbsp;Double)&nbsp;As&nbsp;ObjectId<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Dim&nbsp;myCircle&nbsp;=&nbsp;New&nbsp;Circle(center,&nbsp;Vector3d.ZAxis,&nbsp;radius)<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Dim&nbsp;circleId&nbsp;As&nbsp;ObjectId&nbsp;=&nbsp;AddEntity(myCircle)<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return&nbsp;circleId<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;End&nbsp;Function<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;'''&lt;remarks&gt;<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;'''自己的注释说明<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;'''&lt;/remarks&gt;<BR><IMG id=Codehighlighter1_6473_6979_Open_Image onclick="this.style.display='none'; Codehighlighter1_6473_6979_Open_Text.style.display='none'; Codehighlighter1_6473_6979_Closed_Image.style.display='inline'; Codehighlighter1_6473_6979_Closed_Text.style.display='inline';" src="http://objectarx.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_6473_6979_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_6473_6979_Closed_Text.style.display='none'; Codehighlighter1_6473_6979_Open_Image.style.display='inline'; Codehighlighter1_6473_6979_Open_Text.style.display='inline';" src="http://objectarx.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;Public&nbsp;Function&nbsp;AddEllipse()Function&nbsp;AddEllipse(ByVal&nbsp;centerPoint&nbsp;As&nbsp;Point3d,&nbsp;ByVal&nbsp;majorAxis&nbsp;As&nbsp;Vector3d,&nbsp;ByVal&nbsp;radiusRatio&nbsp;As&nbsp;Double,&nbsp;ByVal&nbsp;startAngle&nbsp;As&nbsp;Double,&nbsp;ByVal&nbsp;endAngle&nbsp;As&nbsp;Double)<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;REM&nbsp;画完整椭圆时,开始角度=&nbsp;终止角度,调整角度,就可以调整方向<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;REM&nbsp;可能存在问题<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'&nbsp;Ellipse(Ellipse&nbsp;=&nbsp;New&nbsp;Ellipse(center,&nbsp;Vector3d.ZAxis,&nbsp;New&nbsp;Vector3d(3,&nbsp;0,&nbsp;0),&nbsp;0.5,&nbsp;0,&nbsp;0))<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Dim&nbsp;unitNormal&nbsp;=&nbsp;Vector3d.ZAxis<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Dim&nbsp;e&nbsp;As&nbsp;New&nbsp;Ellipse(centerPoint,&nbsp;unitNormal,&nbsp;majorAxis,&nbsp;radiusRatio,&nbsp;startAngle,&nbsp;endAngle)<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return&nbsp;AddEntity(e)<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;End&nbsp;Function<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;'''&lt;typeparam&nbsp;name="text"&gt;变量参数的注释说明&lt;/typeparam&gt;<BR><IMG id=Codehighlighter1_7044_7657_Open_Image onclick="this.style.display='none'; Codehighlighter1_7044_7657_Open_Text.style.display='none'; Codehighlighter1_7044_7657_Closed_Image.style.display='inline'; Codehighlighter1_7044_7657_Closed_Text.style.display='inline';" src="http://objectarx.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_7044_7657_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_7044_7657_Closed_Text.style.display='none'; Codehighlighter1_7044_7657_Open_Image.style.display='inline'; Codehighlighter1_7044_7657_Open_Text.style.display='inline';" src="http://objectarx.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;Public&nbsp;Function&nbsp;AddDBText()Function&nbsp;AddDBText(ByVal&nbsp;text&nbsp;As&nbsp;String,&nbsp;ByVal&nbsp;Position&nbsp;As&nbsp;Point3d,&nbsp;ByVal&nbsp;LayerName&nbsp;As&nbsp;String)<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'''&lt;typeparam&nbsp;name="msg"&gt;变量参数的注释说明&lt;/typeparam&gt;<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Dim&nbsp;mytext&nbsp;As&nbsp;New&nbsp;DBText<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mytext.TextString&nbsp;=&nbsp;text&nbsp;&nbsp;&nbsp;REM&nbsp;TextString&nbsp;Contents<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mytext.Position&nbsp;=&nbsp;Position&nbsp;REM&nbsp;location&nbsp;position<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mytext.VerticalMode&nbsp;=&nbsp;TextVerticalMode.TextVerticalMid&nbsp;'垂直对齐方式<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mytext.HorizontalMode&nbsp;=&nbsp;TextHorizontalMode.TextCenter&nbsp;'水平对齐方式<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'&nbsp;&nbsp;&nbsp;mytext.AlignmentPoint&nbsp;=&nbsp;Position&nbsp;'文本的坐标&nbsp;&nbsp;&nbsp;&nbsp;mytext.Position&nbsp;=&nbsp;Position&nbsp;&nbsp;重复&nbsp;???矛盾<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mytext.Layer&nbsp;=&nbsp;LayerName<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return&nbsp;AddEntity(mytext)<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;End&nbsp;Function<BR><IMG id=Codehighlighter1_7670_7943_Open_Image onclick="this.style.display='none'; Codehighlighter1_7670_7943_Open_Text.style.display='none'; Codehighlighter1_7670_7943_Closed_Image.style.display='inline'; Codehighlighter1_7670_7943_Closed_Text.style.display='inline';" src="http://objectarx.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_7670_7943_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_7670_7943_Closed_Text.style.display='none'; Codehighlighter1_7670_7943_Open_Image.style.display='inline'; Codehighlighter1_7670_7943_Open_Text.style.display='inline';" src="http://objectarx.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;Public&nbsp;Function&nbsp;AddMText()Function&nbsp;AddMText(ByVal&nbsp;text&nbsp;As&nbsp;String,&nbsp;ByVal&nbsp;Position&nbsp;As&nbsp;Point3d,&nbsp;ByVal&nbsp;LayerName&nbsp;As&nbsp;String)<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Dim&nbsp;mytext&nbsp;As&nbsp;New&nbsp;MText<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mytext.Contents&nbsp;=&nbsp;text<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mytext.Location&nbsp;=&nbsp;Position<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mytext.Layer&nbsp;=&nbsp;LayerName<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return&nbsp;AddEntity(mytext)<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;End&nbsp;Function<BR><IMG id=Codehighlighter1_7956_9671_Open_Image onclick="this.style.display='none'; Codehighlighter1_7956_9671_Open_Text.style.display='none'; Codehighlighter1_7956_9671_Closed_Image.style.display='inline'; Codehighlighter1_7956_9671_Closed_Text.style.display='inline';" src="http://objectarx.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_7956_9671_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_7956_9671_Closed_Text.style.display='none'; Codehighlighter1_7956_9671_Open_Image.style.display='inline'; Codehighlighter1_7956_9671_Open_Text.style.display='inline';" src="http://objectarx.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;Public&nbsp;Function&nbsp;AddHatch()Function&nbsp;AddHatch(ByVal&nbsp;PointArray()&nbsp;As&nbsp;Point3d,&nbsp;ByVal&nbsp;HatchStyleType&nbsp;As&nbsp;HatchStyle,&nbsp;ByVal&nbsp;PatternScale&nbsp;As&nbsp;Double,&nbsp;ByVal&nbsp;PatternAngle&nbsp;As&nbsp;Double,&nbsp;ByVal&nbsp;LayerName&nbsp;As&nbsp;String,&nbsp;Optional&nbsp;ByVal&nbsp;PatternName&nbsp;As&nbsp;String&nbsp;=&nbsp;"ANSI31")&nbsp;As&nbsp;ObjectId<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;REM&nbsp;多点填充<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;REM&nbsp;圆,圆弧的填充呢??<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Dim&nbsp;hl&nbsp;As&nbsp;New&nbsp;HatchLoop&nbsp;&nbsp;REM&nbsp;少了new&nbsp;时:未将对象设置引用到实例<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Dim&nbsp;P3d&nbsp;As&nbsp;Point3d<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Dim&nbsp;p&nbsp;As&nbsp;Point2d<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Dim&nbsp;bv&nbsp;As&nbsp;BulgeVertex<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;For&nbsp;Each&nbsp;P3d&nbsp;In&nbsp;PointArray<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Try<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;p&nbsp;=&nbsp;New&nbsp;Point2d(P3d.X,&nbsp;P3d.Y)<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bv&nbsp;=&nbsp;New&nbsp;BulgeVertex(p,&nbsp;0)<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;REM&nbsp;ShowMessage("bv.Bulge=&nbsp;&nbsp;"&nbsp;+&nbsp;bv.Bulge.ToString)<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;REM&nbsp;ShowMessage("&nbsp;bv.Vertex.ToString"&nbsp;+&nbsp;bv.Vertex.ToString)<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;hl.Add(bv)<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'&nbsp;&nbsp;hl.LoopType&nbsp;=&nbsp;HatchLoopTypes.Default&nbsp;REM&nbsp;改怎么选<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top><BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Catch&nbsp;ex&nbsp;As&nbsp;Exception<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ShowMessage("错"&nbsp;+&nbsp;ex.Message)<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;End&nbsp;Try<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top><BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Next<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top><BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top><BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Dim&nbsp;ha&nbsp;As&nbsp;New&nbsp;Hatch&nbsp;REM&nbsp;还有很多属性可以设置<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ha.HatchStyle&nbsp;=&nbsp;HatchStyleType<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'&nbsp;&nbsp;ha.HatchStyle&nbsp;=&nbsp;HatchStyle.Normal&nbsp;&nbsp;&nbsp;REM&nbsp;三种<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ha.Layer&nbsp;=&nbsp;LayerName<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ha.PatternAngle&nbsp;=&nbsp;PatternAngle&nbsp;&nbsp;REM&nbsp;填充图案角度&nbsp;0&nbsp;90,270<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ha.PatternScale&nbsp;=&nbsp;PatternScale<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'&nbsp;ha.HatchObjectType&nbsp;=&nbsp;HatchObjectType.HatchObject&nbsp;REM&nbsp;2种<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ha.SetHatchPattern(HatchPatternType.PreDefined,&nbsp;PatternName)&nbsp;REM&nbsp;预定义&nbsp;,自定义&nbsp;,用户定义&nbsp;三种<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'&nbsp;ha.SetGripStatus(GripStatus.GripsToBeDeleted)<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'ha.SetGradient(GradientPatternType.PreDefinedGradient,"")<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'&nbsp;ha.IntersectWith(ent,&nbsp;Intersect.ExtendThis,&nbsp;d,&nbsp;0,&nbsp;0)<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'&nbsp;ha.EvaluateGradientColorAt(1)<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'&nbsp;ha.BoundingBoxIntersectWith(<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'&nbsp;ha.AppendLoop<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ha.AppendLoop(hl)<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ha.EvaluateHatch(True)<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return&nbsp;AddEntity(ha)<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;End&nbsp;Function<BR><IMG id=Codehighlighter1_9684_10481_Open_Image onclick="this.style.display='none'; Codehighlighter1_9684_10481_Open_Text.style.display='none'; Codehighlighter1_9684_10481_Closed_Image.style.display='inline'; Codehighlighter1_9684_10481_Closed_Text.style.display='inline';" src="http://objectarx.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_9684_10481_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_9684_10481_Closed_Text.style.display='none'; Codehighlighter1_9684_10481_Open_Image.style.display='inline'; Codehighlighter1_9684_10481_Open_Text.style.display='inline';" src="http://objectarx.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;Public&nbsp;Function&nbsp;AddHatch()Function&nbsp;AddHatch(ByVal&nbsp;idC&nbsp;As&nbsp;ObjectIdCollection,&nbsp;ByVal&nbsp;HatchStyleType&nbsp;As&nbsp;HatchStyle,&nbsp;ByVal&nbsp;PatternScale&nbsp;As&nbsp;Double,&nbsp;ByVal&nbsp;PatternAngle&nbsp;As&nbsp;Double,&nbsp;ByVal&nbsp;LayerName&nbsp;As&nbsp;String,&nbsp;Optional&nbsp;ByVal&nbsp;PatternName&nbsp;As&nbsp;String&nbsp;=&nbsp;"ANSI31")&nbsp;As&nbsp;ObjectId<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;REM&nbsp;圆的填充()<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;REM&nbsp;多边形与圆组合的填充&nbsp;&nbsp;&nbsp;????<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Dim&nbsp;ha&nbsp;As&nbsp;New&nbsp;Hatch<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ha.HatchStyle&nbsp;=&nbsp;HatchStyleType<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'&nbsp;&nbsp;ha.HatchStyle&nbsp;=&nbsp;HatchStyle.Normal&nbsp;&nbsp;&nbsp;REM&nbsp;三种<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ha.Layer&nbsp;=&nbsp;LayerName<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ha.PatternAngle&nbsp;=&nbsp;PatternAngle&nbsp;&nbsp;REM&nbsp;填充图案角度&nbsp;0&nbsp;90,270<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ha.PatternScale&nbsp;=&nbsp;PatternScale<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'&nbsp;ha.HatchObjectType&nbsp;=&nbsp;HatchObjectType.HatchObject&nbsp;REM&nbsp;2种<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ha.SetHatchPattern(HatchPatternType.PreDefined,&nbsp;PatternName)&nbsp;REM&nbsp;预定义&nbsp;,自定义&nbsp;,用户定义&nbsp;三种<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top><BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ha.AppendLoop(0,&nbsp;idC)<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ha.EvaluateHatch(True)<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return&nbsp;AddEntity(ha)<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top><BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;End&nbsp;Function<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top><BR><IMG id=Codehighlighter1_10495_11068_Open_Image onclick="this.style.display='none'; Codehighlighter1_10495_11068_Open_Text.style.display='none'; Codehighlighter1_10495_11068_Closed_Image.style.display='inline'; Codehighlighter1_10495_11068_Closed_Text.style.display='inline';" src="http://objectarx.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_10495_11068_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_10495_11068_Closed_Text.style.display='none'; Codehighlighter1_10495_11068_Open_Image.style.display='inline'; Codehighlighter1_10495_11068_Open_Text.style.display='inline';" src="http://objectarx.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;Public&nbsp;Function&nbsp;AddPolyline()Function&nbsp;AddPolyline(ByVal&nbsp;ptArr&nbsp;As&nbsp;Point3dCollection,&nbsp;ByVal&nbsp;LayerName&nbsp;As&nbsp;String,&nbsp;Optional&nbsp;ByVal&nbsp;width&nbsp;As&nbsp;Double&nbsp;=&nbsp;0)&nbsp;As&nbsp;ObjectId<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;REM&nbsp;有&nbsp;Polyline&nbsp;Polyline2d&nbsp;&nbsp;Polyline3d<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Dim&nbsp;pl&nbsp;As&nbsp;New&nbsp;Polyline<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pl.Layer&nbsp;=&nbsp;LayerName<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Dim&nbsp;i&nbsp;As&nbsp;Integer<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Dim&nbsp;bulge,&nbsp;startWidth,&nbsp;endWidth&nbsp;As&nbsp;Double<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bulge&nbsp;=&nbsp;0<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;startWidth&nbsp;=&nbsp;width<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;endWidth&nbsp;=&nbsp;width<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;For&nbsp;i&nbsp;=&nbsp;0&nbsp;To&nbsp;ptArr.Count&nbsp;-&nbsp;1<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pl.AddVertexAt(i,&nbsp;New&nbsp;Point2d(ptArr(i).X,&nbsp;ptArr(i).Y),&nbsp;bulge,&nbsp;startWidth,&nbsp;endWidth)<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Next<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return&nbsp;AddEntity(pl)<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top><BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top><BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;End&nbsp;Function<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top><BR><IMG id=Codehighlighter1_11082_11438_Open_Image onclick="this.style.display='none'; Codehighlighter1_11082_11438_Open_Text.style.display='none'; Codehighlighter1_11082_11438_Closed_Image.style.display='inline'; Codehighlighter1_11082_11438_Closed_Text.style.display='inline';" src="http://objectarx.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_11082_11438_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_11082_11438_Closed_Text.style.display='none'; Codehighlighter1_11082_11438_Open_Image.style.display='inline'; Codehighlighter1_11082_11438_Open_Text.style.display='inline';" src="http://objectarx.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;Public&nbsp;Function&nbsp;AddPolyline()Function&nbsp;AddPolyline(ByVal&nbsp;ptArr&nbsp;As&nbsp;Point3dCollection,&nbsp;ByVal&nbsp;closed&nbsp;As&nbsp;Boolean,&nbsp;ByVal&nbsp;LayerName&nbsp;As&nbsp;String)&nbsp;As&nbsp;ObjectId<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;REM&nbsp;有&nbsp;Polyline&nbsp;Polyline2d&nbsp;&nbsp;Polyline3d<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'closed表示闭合&nbsp;只有添加多边形时才闭合<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Dim&nbsp;pline3d&nbsp;As&nbsp;New&nbsp;Polyline3d(Poly3dType.SimplePoly,&nbsp;ptArr,&nbsp;closed)<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pline3d.Layer&nbsp;=&nbsp;LayerName<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return&nbsp;AddEntity(pline3d)<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;End&nbsp;Function<BR><IMG id=Codehighlighter1_11451_11807_Open_Image onclick="this.style.display='none'; Codehighlighter1_11451_11807_Open_Text.style.display='none'; Codehighlighter1_11451_11807_Closed_Image.style.display='inline'; Codehighlighter1_11451_11807_Closed_Text.style.display='inline';" src="http://objectarx.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_11451_11807_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_11451_11807_Closed_Text.style.display='none'; Codehighlighter1_11451_11807_Open_Image.style.display='inline'; Codehighlighter1_11451_11807_Open_Text.style.display='inline';" src="http://objectarx.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;Public&nbsp;Function&nbsp;AddRectangle()Function&nbsp;AddRectangle(ByVal&nbsp;pt1&nbsp;As&nbsp;Point3d,&nbsp;ByVal&nbsp;pt3&nbsp;As&nbsp;Point3d,&nbsp;ByVal&nbsp;LayerName&nbsp;As&nbsp;String)&nbsp;As&nbsp;ObjectId<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Dim&nbsp;ptArr&nbsp;As&nbsp;New&nbsp;Point3dCollection<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ptArr.Add(pt1)<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ptArr.Add(New&nbsp;Point3d(pt1.X,&nbsp;pt3.Y,&nbsp;0))<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ptArr.Add(pt3)<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ptArr.Add(New&nbsp;Point3d(pt3.X,&nbsp;pt1.Y,&nbsp;0))<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return&nbsp;AddPolyline(ptArr,&nbsp;True,&nbsp;LayerName)<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;End&nbsp;Function<BR><IMG id=Codehighlighter1_11820_12571_Open_Image onclick="this.style.display='none'; Codehighlighter1_11820_12571_Open_Text.style.display='none'; Codehighlighter1_11820_12571_Closed_Image.style.display='inline'; Codehighlighter1_11820_12571_Closed_Text.style.display='inline';" src="http://objectarx.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_11820_12571_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_11820_12571_Closed_Text.style.display='none'; Codehighlighter1_11820_12571_Open_Image.style.display='inline'; Codehighlighter1_11820_12571_Open_Text.style.display='inline';" src="http://objectarx.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;Public&nbsp;Function&nbsp;AddPolygon()Function&nbsp;AddPolygon(ByVal&nbsp;centerPoint&nbsp;As&nbsp;Point3d,&nbsp;ByVal&nbsp;number&nbsp;As&nbsp;Integer,&nbsp;ByVal&nbsp;radius&nbsp;As&nbsp;Double,&nbsp;ByVal&nbsp;LayerName&nbsp;As&nbsp;String,&nbsp;Optional&nbsp;ByVal&nbsp;width&nbsp;As&nbsp;Double&nbsp;=&nbsp;0)&nbsp;As&nbsp;ObjectId<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;REM&nbsp;半径指的是外接圆的半径<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Dim&nbsp;angle&nbsp;As&nbsp;Double<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;angle&nbsp;=&nbsp;Math.PI&nbsp;*&nbsp;2&nbsp;/&nbsp;number<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Dim&nbsp;ptArr&nbsp;As&nbsp;New&nbsp;Point3dCollection<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Dim&nbsp;pt&nbsp;As&nbsp;Point3d<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Dim&nbsp;i&nbsp;As&nbsp;Integer<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;For&nbsp;i&nbsp;=&nbsp;0&nbsp;To&nbsp;number&nbsp;-&nbsp;1<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'&nbsp;pt.X&nbsp;=&nbsp;centerPoint.X&nbsp;+&nbsp;radius&nbsp;*&nbsp;Math.Cos(i&nbsp;*&nbsp;angle)<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'&nbsp;pt.Y&nbsp;=&nbsp;centerPoint.Y&nbsp;+&nbsp;radius&nbsp;*&nbsp;Math.Sin(i&nbsp;*&nbsp;angle)<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pt&nbsp;=&nbsp;New&nbsp;Point3d(centerPoint.X&nbsp;+&nbsp;radius&nbsp;*&nbsp;Math.Cos(i&nbsp;*&nbsp;angle),&nbsp;centerPoint.Y&nbsp;+&nbsp;radius&nbsp;*&nbsp;Math.Sin(i&nbsp;*&nbsp;angle),&nbsp;0)<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ptArr.Add(pt)<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Next<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return&nbsp;AddPolyline(ptArr,&nbsp;True,&nbsp;LayerName)<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top><BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;End&nbsp;Function<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top><BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;REM&nbsp;没有成功<BR><IMG id=Codehighlighter1_12598_13089_Open_Image onclick="this.style.display='none'; Codehighlighter1_12598_13089_Open_Text.style.display='none'; Codehighlighter1_12598_13089_Closed_Image.style.display='inline'; Codehighlighter1_12598_13089_Closed_Text.style.display='inline';" src="http://objectarx.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_12598_13089_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_12598_13089_Closed_Text.style.display='none'; Codehighlighter1_12598_13089_Open_Image.style.display='inline'; Codehighlighter1_12598_13089_Open_Text.style.display='inline';" src="http://objectarx.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;Public&nbsp;Function&nbsp;AddTable()Function&nbsp;AddTable(ByVal&nbsp;Position&nbsp;As&nbsp;Point3d,&nbsp;ByVal&nbsp;row&nbsp;As&nbsp;Integer,&nbsp;ByVal&nbsp;col&nbsp;As&nbsp;Integer)&nbsp;As&nbsp;ObjectId<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Dim&nbsp;mytable&nbsp;As&nbsp;New&nbsp;Table<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mytable.NumRows&nbsp;=&nbsp;row<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mytable.NumColumns&nbsp;=&nbsp;col<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mytable.SetRowHeight(1,&nbsp;3)<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mytable.SetTextHeight(3,&nbsp;2,&nbsp;2.5)<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mytable.Position&nbsp;=&nbsp;Position<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mytable.SetBackgroundColor(2,&nbsp;2,&nbsp;Color.FromColorIndex(ColorMethod.ByAci,&nbsp;1))<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mytable.SetTextString(0,&nbsp;0,&nbsp;"你是SB")&nbsp;&nbsp;REM&nbsp;还有其他的<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;AddEntity(mytable)<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;End&nbsp;Function<BR><IMG id=Codehighlighter1_13091_13901_Closed_Image onclick="this.style.display='none'; Codehighlighter1_13091_13901_Closed_Text.style.display='none'; Codehighlighter1_13091_13901_Open_Image.style.display='inline'; Codehighlighter1_13091_13901_Open_Text.style.display='inline';" src="http://objectarx.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" align=top><IMG id=Codehighlighter1_13091_13901_Open_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_13091_13901_Open_Text.style.display='none'; Codehighlighter1_13091_13901_Closed_Image.style.display='inline'; Codehighlighter1_13091_13901_Closed_Text.style.display='inline';" src="http://objectarx.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top>创建组#Region&nbsp;"创建组"<BR><IMG id=Codehighlighter1_13116_13889_Open_Image onclick="this.style.display='none'; Codehighlighter1_13116_13889_Open_Text.style.display='none'; Codehighlighter1_13116_13889_Closed_Image.style.display='inline'; Codehighlighter1_13116_13889_Closed_Text.style.display='inline';" src="http://objectarx.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_13116_13889_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_13116_13889_Closed_Text.style.display='none'; Codehighlighter1_13116_13889_Open_Image.style.display='inline'; Codehighlighter1_13116_13889_Open_Text.style.display='inline';" src="http://objectarx.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;Public&nbsp;Sub&nbsp;AddGroup()Sub&nbsp;AddGroup(ByVal&nbsp;objIds&nbsp;As&nbsp;ObjectIdCollection,&nbsp;ByVal&nbsp;pGroupName&nbsp;As&nbsp;System.String)<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Dim&nbsp;db&nbsp;As&nbsp;Database&nbsp;=&nbsp;Application.DocumentManager.MdiActiveDocument.Database<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Dim&nbsp;tm&nbsp;As&nbsp;DBTransMan&nbsp;=&nbsp;db.TransactionManager<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'start&nbsp;a&nbsp;transaction<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Dim&nbsp;ta&nbsp;As&nbsp;Transaction&nbsp;=&nbsp;tm.StartTransaction()<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Try<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Dim&nbsp;gp&nbsp;As&nbsp;New&nbsp;Group(pGroupName,&nbsp;True)<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Dim&nbsp;dict&nbsp;As&nbsp;DBDictionary&nbsp;=&nbsp;tm.GetObject(db.GroupDictionaryId,&nbsp;OpenMode.ForWrite,&nbsp;True)<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dict.SetAt("ASDK_NEWNAME",&nbsp;gp)<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top><BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Dim&nbsp;thisId&nbsp;As&nbsp;ObjectId<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;For&nbsp;Each&nbsp;thisId&nbsp;In&nbsp;objIds<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;gp.Append(thisId)<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Next<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tm.AddNewlyCreatedDBObject(gp,&nbsp;True)<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ta.Commit()<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Finally<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ta.Dispose()<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;End&nbsp;Try<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;End&nbsp;Sub<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>#End&nbsp;Region<BR><IMG id=Codehighlighter1_13903_14694_Closed_Image onclick="this.style.display='none'; Codehighlighter1_13903_14694_Closed_Text.style.display='none'; Codehighlighter1_13903_14694_Open_Image.style.display='inline'; Codehighlighter1_13903_14694_Open_Text.style.display='inline';" src="http://objectarx.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" align=top><IMG id=Codehighlighter1_13903_14694_Open_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_13903_14694_Open_Text.style.display='none'; Codehighlighter1_13903_14694_Closed_Image.style.display='inline'; Codehighlighter1_13903_14694_Closed_Text.style.display='inline';" src="http://objectarx.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top>添加UCS#Region&nbsp;"添加UCS"<BR><IMG id=Codehighlighter1_13930_14682_Open_Image onclick="this.style.display='none'; Codehighlighter1_13930_14682_Open_Text.style.display='none'; Codehighlighter1_13930_14682_Closed_Image.style.display='inline'; Codehighlighter1_13930_14682_Closed_Text.style.display='inline';" src="http://objectarx.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_13930_14682_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_13930_14682_Closed_Text.style.display='none'; Codehighlighter1_13930_14682_Open_Image.style.display='inline'; Codehighlighter1_13930_14682_Open_Text.style.display='inline';" src="http://objectarx.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;Public&nbsp;Function&nbsp;AddUcs()Function&nbsp;AddUcs(ByVal&nbsp;UcsName&nbsp;As&nbsp;String)&nbsp;As&nbsp;ObjectId<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Dim&nbsp;objId&nbsp;As&nbsp;ObjectId<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Dim&nbsp;db&nbsp;As&nbsp;Database&nbsp;=&nbsp;Application.DocumentManager.MdiActiveDocument.Database<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Dim&nbsp;tm&nbsp;As&nbsp;DBTransMan&nbsp;=&nbsp;db.TransactionManager<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Dim&nbsp;ta&nbsp;As&nbsp;Transaction&nbsp;=&nbsp;tm.StartTransaction<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Dim&nbsp;ut&nbsp;As&nbsp;UcsTable&nbsp;=&nbsp;tm.GetObject(db.UcsTableId,&nbsp;OpenMode.ForWrite)<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;If&nbsp;ut.Has(UcsName)&nbsp;Then<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;objId&nbsp;=&nbsp;ut.Item(UcsName)<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Else<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Dim&nbsp;utr&nbsp;As&nbsp;New&nbsp;UcsTableRecord<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;utr.Name&nbsp;=&nbsp;UcsName<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'utr.Origin=<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'&nbsp;utr.XAxis<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;objId&nbsp;=&nbsp;ut.Add(utr)<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tm.AddNewlyCreatedDBObject(utr,&nbsp;True)<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ta.Commit()<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top><BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;End&nbsp;If<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ta.Dispose()<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tm.Dispose()<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return&nbsp;objId<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;End&nbsp;Function<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>#End&nbsp;Region<BR><IMG id=Codehighlighter1_14696_15571_Closed_Image onclick="this.style.display='none'; Codehighlighter1_14696_15571_Closed_Text.style.display='none'; Codehighlighter1_14696_15571_Open_Image.style.display='inline'; Codehighlighter1_14696_15571_Open_Text.style.display='inline';" src="http://objectarx.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" align=top><IMG id=Codehighlighter1_14696_15571_Open_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_14696_15571_Open_Text.style.display='none'; Codehighlighter1_14696_15571_Closed_Image.style.display='inline'; Codehighlighter1_14696_15571_Closed_Text.style.display='inline';" src="http://objectarx.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top>添加视口#Region&nbsp;"添加视口"<BR><IMG id=Codehighlighter1_14722_15559_Open_Image onclick="this.style.display='none'; Codehighlighter1_14722_15559_Open_Text.style.display='none'; Codehighlighter1_14722_15559_Closed_Image.style.display='inline'; Codehighlighter1_14722_15559_Closed_Text.style.display='inline';" src="http://objectarx.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_14722_15559_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_14722_15559_Closed_Text.style.display='none'; Codehighlighter1_14722_15559_Open_Image.style.display='inline'; Codehighlighter1_14722_15559_Open_Text.style.display='inline';" src="http://objectarx.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;Public&nbsp;Function&nbsp;AddViewport()Function&nbsp;AddViewport(ByVal&nbsp;ViewPortName&nbsp;As&nbsp;String)&nbsp;As&nbsp;ObjectId<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Dim&nbsp;objId&nbsp;As&nbsp;ObjectId<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Dim&nbsp;db&nbsp;As&nbsp;Database&nbsp;=&nbsp;Application.DocumentManager.MdiActiveDocument.Database<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Dim&nbsp;tm&nbsp;As&nbsp;DBTransMan&nbsp;=&nbsp;db.TransactionManager<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Dim&nbsp;ta&nbsp;As&nbsp;Transaction&nbsp;=&nbsp;tm.StartTransaction<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Dim&nbsp;vpt&nbsp;As&nbsp;ViewportTable&nbsp;=&nbsp;tm.GetObject(db.ViewportTableId,&nbsp;OpenMode.ForWrite)<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;If&nbsp;vpt.Has(ViewPortName)&nbsp;Then<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;objId&nbsp;=&nbsp;vpt.Item(ViewPortName)<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Else<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Dim&nbsp;vptr&nbsp;As&nbsp;New&nbsp;ViewportTableRecord<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;vptr.Name&nbsp;=&nbsp;ViewPortName<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'&nbsp;&nbsp;Autodesk.AutoCAD.Geometry.CoordinateSystem3d()<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'vptr.Ucs()<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top><BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;objId&nbsp;=&nbsp;vpt.Add(vptr)<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tm.AddNewlyCreatedDBObject(vptr,&nbsp;True)<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ta.Commit()<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;End&nbsp;If<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ta.Dispose()<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tm.Dispose()<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return&nbsp;objId<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;End&nbsp;Function<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>#End&nbsp;Region<BR><IMG id=Codehighlighter1_15573_16457_Closed_Image onclick="this.style.display='none'; Codehighlighter1_15573_16457_Closed_Text.style.display='none'; Codehighlighter1_15573_16457_Open_Image.style.display='inline'; Codehighlighter1_15573_16457_Open_Text.style.display='inline';" src="http://objectarx.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" align=top><IMG id=Codehighlighter1_15573_16457_Open_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_15573_16457_Open_Text.style.display='none'; Codehighlighter1_15573_16457_Closed_Image.style.display='inline'; Codehighlighter1_15573_16457_Closed_Text.style.display='inline';" src="http://objectarx.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top>添加视图#Region&nbsp;"添加视图"<BR><IMG id=Codehighlighter1_15599_16445_Open_Image onclick="this.style.display='none'; Codehighlighter1_15599_16445_Open_Text.style.display='none'; Codehighlighter1_15599_16445_Closed_Image.style.display='inline'; Codehighlighter1_15599_16445_Closed_Text.style.display='inline';" src="http://objectarx.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_15599_16445_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_15599_16445_Closed_Text.style.display='none'; Codehighlighter1_15599_16445_Open_Image.style.display='inline'; Codehighlighter1_15599_16445_Open_Text.style.display='inline';" src="http://objectarx.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;Public&nbsp;Function&nbsp;AddView()Function&nbsp;AddView(ByVal&nbsp;ViewName&nbsp;As&nbsp;String,&nbsp;ByVal&nbsp;render&nbsp;As&nbsp;RenderMode,&nbsp;ByVal&nbsp;ucsId&nbsp;As&nbsp;ObjectId)&nbsp;As&nbsp;ObjectId<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;REM&nbsp;添加视图()&nbsp;这个和添加图层是相同的<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Dim&nbsp;db&nbsp;As&nbsp;Database&nbsp;=&nbsp;Application.DocumentManager.MdiActiveDocument.Database<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Dim&nbsp;tm&nbsp;As&nbsp;DBTransMan&nbsp;=&nbsp;db.TransactionManager<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Dim&nbsp;ta&nbsp;As&nbsp;Transaction&nbsp;=&nbsp;tm.StartTransaction<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Dim&nbsp;vt&nbsp;As&nbsp;ViewTable&nbsp;=&nbsp;ta.GetObject(db.ViewTableId,&nbsp;OpenMode.ForWrite)<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Dim&nbsp;objId&nbsp;As&nbsp;ObjectId<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;If&nbsp;vt.Has(ViewName)&nbsp;Then<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;objId&nbsp;=&nbsp;vt.Item(ViewName)<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Else<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Dim&nbsp;vtr&nbsp;As&nbsp;New&nbsp;ViewTableRecord<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;vtr.Name&nbsp;=&nbsp;ViewName<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;vtr.RenderMode&nbsp;=&nbsp;render<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;vtr.SetUcs(ucsId)<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;REM&nbsp;vtr.SetUcs(<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;objId&nbsp;=&nbsp;vt.Add(vtr)<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tm.AddNewlyCreatedDBObject(vtr,&nbsp;True)<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ta.Commit()<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;End&nbsp;If<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return&nbsp;objId<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;End&nbsp;Function<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>#End&nbsp;Region<BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top><BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top><BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/InBlock.gif" align=top><BR><IMG src="http://objectarx.cnblogs.com/Images/OutliningIndicators/ExpandedBlockEnd.gif" align=top>End&nbsp;Class<BR>

tcsl9621 发表于 2006-4-2 16:57:00

对不起,我试用时发现添加图层函数的,设定线型的LINETYPE函数好像不对。请楼主指点。谢谢楼主提供这么好的东东。

tcsl9621 发表于 2006-5-3 20:52:00

这么好的贴子怎么没人顶起。大家都有眼无珠啊!我再来顶一下……

springtao 发表于 2006-5-8 09:17:00

<P>顶一下 ,不错,呵呵,学习!</P>

ganok 发表于 2006-5-16 19:36:00

谢谢无私精神。

tcsl9621 发表于 2006-5-26 13:48:00

本帖最后由 作者 于 2006-5-31 21:26:14 编辑

再顶一下。现在这个论谈里的人最少了。给楼主送花一朵。

leidiang 发表于 2006-5-29 16:37:00

顶,好东西!!!

whales 发表于 2006-6-7 12:49:00

顶一下,谢了!

idoo 发表于 2006-8-22 22:32:00

<P>先顶了,接下来在慢慢研究</P>

mkhsj929 发表于 2006-8-23 09:39:00

<P>缺少一个重要的东东——制作块</P>
<P>另外,我个人认为直线用多义线代替就行了,因为多义线编辑比较方便</P>
页: [1] 2
查看完整版本: [原创]发布一个ObjectARX .NET AutoCAD 二次开发 添加各种实体的类