- Public Sub Blocks2Points()
- On Error Resume Next
- Dim cogoPnts As AeccCogoPoints
- Dim newCogoPnt As AeccCogoPoint
- Set cogoPnts = AeccApplication.ActiveProject.CogoPoints
-
- Dim newPnt As Variant
- Set SSET = ThisDrawing.SelectionSets.Add("temp3")
- SSET.SelectOnScreen
- For Each ent In SSET
- Select Case ent.EntityType
- Case 7
- array1 = ent.GetAttributes
- newPnt = ent.InsertionPoint
- cogoPnts.NextPointNumber = array1(0).TextString
- Set newCogoPnt = cogoPnts.Add(newPnt, kCoordinateFormatXYZ)
- newCogoPnt.RawDescription = array1(1).TextString
- newCogoPnt.Elevation = array1(2).TextString
- End Select
- Next
- ThisDrawing.SelectionSets.Item("temp3").Delete
- End Sub
有些LDD的人必须得到这个,因为我不知道LDD对象模型,但这是任何想玩的人的代码。这是在Module1中。 |