Sub VBA_ent2Lisp_ent()
Dim FilterSet As AcadSelectionSet
On Error Resume Next
Set FilterSet = ThisDrawing.SelectionSets.Add("XXX")
If Err Then
ThisDrawing.SelectionSets("XXX").Delete
Set FilterSet = ThisDrawing.SelectionSets.Add("XXX")
Err.Clear
End If
FilterSet.SelectOnScreen
Dim E As AcadEntity
Dim i As Long
Dim H As String
Dim pLisp As String
Dim Obj As VLAX
For i = 0 To FilterSet.Count - 1
Set E = FilterSet.item(i)
H = ToStr(E.handle)
'ThisDrawing.Utility.Prompt H & vbCrLf ''这句话执行就出错
ThisDrawing.SendCommand "(entdel (handent " & H & "))" & vbCrLf
Next
End Sub
Dim FilterSet As AcadSelectionSet
On Error Resume Next
Set FilterSet = ThisDrawing.SelectionSets.Add("XXX")
If Err Then
ThisDrawing.SelectionSets("XXX").Delete
Set FilterSet = ThisDrawing.SelectionSets.Add("XXX")
Err.Clear
End If
FilterSet.SelectOnScreen
Dim E As AcadEntity
Dim i As Long
Dim H As String
Dim pLisp As String
Dim Obj As VLAX
For i = 0 To FilterSet.Count - 1
Set E = FilterSet.item(i)
H = ToStr(E.handle)
'ThisDrawing.Utility.Prompt H & vbCrLf ''这句话执行就出错
ThisDrawing.SendCommand "(entdel (handent " & H & "))" & vbCrLf
Next
End Sub
|
暂时没有评论
发表评论 - 不要忘了输入验证码哦! |