- 积分
- 1622
- 明经币
- 个
- 注册时间
- 2015-7-17
- 在线时间
- 小时
- 威望
-
- 金钱
- 个
- 贡献
-
- 激情
-
|
楼主 |
发表于 2015-8-5 23:14:35
|
显示全部楼层
- Sub dd1223()
- On Error Resume Next
- Dim datatype(0 To 1) As Integer
- Dim data(0 To 1) As Variant
- Dim xtypeOut As Variant, XDateOut As Variant
- Dim objCurrent As AcadEntity
- Dim basePnt As Variant
- Dim ss As AcadSelectionSet
- Dim minExt As Variant
- Dim maxExt As Variant
- '--------------------------------------------------------------------------------------------
- If Not IsNull(ThisDrawing.SelectionSets.Item("11")) Then
- Set ss = ThisDrawing.SelectionSets.Item("11")
- ss.Delete
- End If
- '---------------------------------------------------------------------------------------------
- Dim filtertype(0) As Integer
- Dim filterdata(0) As Variant
- filtertype(0) = 0
- filterdata(0) = "LWPOLYLINE"
- Set ss = ThisDrawing.Application.ActiveDocument.SelectionSets.Add("11")
- ss.SelectOnScreen filtertype, filterdata
- '-----------------------------------------------------------------------------------------------
- Dim datatypee(0 To 4) As Integer
- Dim dataa(0 To 4) As Variant
- '------------------------------------------------------------------
- For Each objCurrent In ss
- datatypee(0) = 1001: dataa(0) = "SOUTH"
- datatypee(1) = 1000: dataa(1) = "300000"
- datatypee(2) = 1000: dataa(2) = ""
- datatypee(3) = 1000: dataa(3) = ""
- datatypee(4) = 1000: dataa(4) = "072"
-
- objCurrent.SetXData datatypee, dataa
- objCurrent.GetXData "", xtypeOut, XDateOut
-
- datatype(0) = 1001: data(0) = "QHDM"
- datatype(1) = 1000: data(1) = ""
-
- objCurrent.SetXData datatype, data
- objCurrent.GetXData "", xtypeOut, XDateOut
-
- datatype(0) = 1001: data(0) = "SJZGBM"
- datatype(1) = 1000: data(1) = ""
-
- objCurrent.SetXData datatype, data
- objCurrent.GetXData "", xtypeOut, XDateOut
-
- datatype(0) = 1001: data(0) = "FRDBXM"
- datatype(1) = 1000: data(1) = ""
-
- objCurrent.SetXData datatype, data
- objCurrent.GetXData "", xtypeOut, XDateOut
-
- datatype(0) = 1001: data(0) = "FRDBZMS"
- datatype(1) = 1000: data(1) = ""
- objCurrent.SetXData datatype, data
- objCurrent.GetXData "", xtypeOut, XDateOut
-
- datatype(0) = 1001: data(0) = "FRDBDH" '
- datatype(1) = 1000: data(1) = ""
- objCurrent.SetXData datatype, data
- objCurrent.GetXData "", xtypeOut, XDateOut
-
- datatype(0) = 1001: data(0) = "DLRXM" '
- datatype(1) = 1000: data(1) = ""
- objCurrent.SetXData datatype, data
- objCurrent.GetXData "", xtypeOut, XDateOut
-
- datatype(0) = 1001: data(0) = "DLRSFZ"
- datatype(1) = 1000: data(1) = ""
- objCurrent.SetXData datatype, data
- objCurrent.GetXData "", xtypeOut, XDateOut
-
- datatype(0) = 1001: data(0) = "DLRDH"
- datatype(1) = 1000: data(1) = ""
- objCurrent.SetXData datatype, data
- objCurrent.GetXData "", xtypeOut, XDateOut
-
- datatype(0) = 1001: data(0) = "TXDZ"
- datatype(1) = 1000: data(1) = ""
- objCurrent.SetXData datatype, data
- objCurrent.GetXData "", xtypeOut, XDateOut
-
- datatype(0) = 1001: data(0) = "TDZL"
- datatype(1) = 1000: data(1) = ""
- objCurrent.SetXData datatype, data
- objCurrent.GetXData "", xtypeOut, XDateOut
-
- datatype(0) = 1001: data(0) = "DONGZHI"
- datatype(1) = 1000: data(1) = ""
- objCurrent.SetXData datatype, data
- objCurrent.GetXData "", xtypeOut, XDateOut
- datatype(0) = 1001: data(0) = "NANZHI"
- datatype(1) = 1000: data(1) = ""
- objCurrent.SetXData datatype, data
- objCurrent.GetXData "", xtypeOut, XDateOut
- datatype(0) = 1001: data(0) = "XIZHI"
- datatype(1) = 1000: data(1) = ""
- objCurrent.SetXData datatype, data
- objCurrent.GetXData "", xtypeOut, XDateOut
- datatype(0) = 1001: data(0) = "BEIZHI"
- datatype(1) = 1000: data(1) = ""
- objCurrent.SetXData datatype, data
- objCurrent.GetXData "", xtypeOut, XDateOut
- datatype(0) = 1001: data(0) = "QSLYZM"
- datatype(1) = 1000: data(1) = ""
- objCurrent.SetXData datatype, data
- objCurrent.GetXData "", xtypeOut, XDateOut
-
- datatype(0) = 1001: data(0) = "PZTDYT"
- datatype(1) = 1000: data(1) = ""
- objCurrent.SetXData datatype, data
- objCurrent.GetXData "", xtypeOut, XDateOut
-
- datatype(0) = 1001: data(0) = "TDSYZ"
- datatype(1) = 1000: data(1) = ""
- objCurrent.SetXData datatype, data
- objCurrent.GetXData "", xtypeOut, XDateOut
-
- datatype(0) = 1001: data(0) = "SBJZWQS"
- datatype(1) = 1000: data(1) = ""
- objCurrent.SetXData datatype, data
- objCurrent.GetXData "", xtypeOut, XDateOut
-
- datatype(0) = 1001: data(0) = "YBDJH"
- datatype(1) = 1000: data(1) = ""
- objCurrent.SetXData datatype, data
- objCurrent.GetXData "", xtypeOut, XDateOut
-
- datatype(0) = 1001: data(0) = "TDZH"
- datatype(1) = 1000: data(1) = ""
- objCurrent.SetXData datatype, data
- objCurrent.GetXData "", xtypeOut, XDateOut
-
- datatype(0) = 1001: data(0) = "SHRQ"
- datatype(1) = 1000: data(1) = ""
- objCurrent.SetXData datatype, data
- objCurrent.GetXData "", xtypeOut, XDateOut
-
- datatype(0) = 1001: data(0) = "DJRQ"
- datatype(1) = 1000: data(1) = ""
- objCurrent.SetXData datatype, data
- objCurrent.GetXData "", xtypeOut, XDateOut
-
- datatype(0) = 1001: data(0) = "ZZRQ"
- datatype(1) = 1000: data(1) = ""
- objCurrent.SetXData datatype, data
- objCurrent.GetXData "", xtypeOut, XDateOut
-
- datatype(0) = 1001: data(0) = "DWXZ"
- datatype(1) = 1000: data(1) = ""
- objCurrent.SetXData datatype, data
- objCurrent.GetXData "", xtypeOut, XDateOut
-
- datatype(0) = 1001: data(0) = "QSXZ"
- datatype(1) = 1000: data(1) = ""
- objCurrent.SetXData datatype, data
- objCurrent.GetXData "", xtypeOut, XDateOut
-
- datatype(0) = 1001: data(0) = "SYQLX"
- datatype(1) = 1000: data(1) = ""
- objCurrent.SetXData datatype, data
- objCurrent.GetXData "", xtypeOut, XDateOut
-
- datatype(0) = 1001: data(0) = "TDDJ"
- datatype(1) = 1000: data(1) = ""
- objCurrent.SetXData datatype, data
- objCurrent.GetXData "", xtypeOut, XDateOut
-
- datatype(0) = 1001: data(0) = "MPH"
- datatype(1) = 1000: data(1) = ""
- objCurrent.SetXData datatype, data
- objCurrent.GetXData "", xtypeOut, XDateOut
-
- datatype(0) = 1001: data(0) = "TUFU"
- datatype(1) = 1000: data(1) = ""
- objCurrent.SetXData datatype, data
- objCurrent.GetXData "", xtypeOut, XDateOut
-
-
- datatype(0) = 1001: data(0) = "JZMJ"
- datatype(1) = 1000: data(1) = ""
- objCurrent.SetXData datatype, data
- objCurrent.GetXData "", xtypeOut, XDateOut
-
- datatype(0) = 1001: data(0) = "BDDJ"
- datatype(1) = 1000: data(1) = ""
- objCurrent.SetXData datatype, data
- objCurrent.GetXData "", xtypeOut, XDateOut
-
- datatype(0) = 1001: data(0) = "SBDJ"
- datatype(1) = 1000: data(1) = ""
- objCurrent.SetXData datatype, data
- objCurrent.GetXData "", xtypeOut, XDateOut
- objCurrent.color = acCyan
-
- objCurrent.GetBoundingBox minExt, maxExt
- Sleep 1
- ZoomWindow minExt, maxExt
- Sleep 1
- Next objCurrent
- ss.Delete
- End Sub
老师这是我写入宗地属性的全部代码, 你帮我看看 ,对不对, 有点乱,如果有错的地方???请帮我指出来 先谢谢了 ,老师?
|
|