Sub InsertBlock()
On Error GoTo ErrorHandler
Dim blockRef As AcadBlockReference
Dim name As String
Dim prevPoint, nextPoint As Variant
Dim tempNum As Integer
name = "Проба_1светильник"
prevPoint = Null
tempNum = InputBox("Введите номер")
Do While True
nextPoint = ThisDrawing.Utility.GetPoint(, "Укажите точку вставки")
Set blockRef = ThisDrawing.ModelSpace.InsertBlock(nextPoint, name, 1, 1, 1, 0)
Call Increment(tempNum, blockRef)
If (IsNull(prevPoint) = False) Then
Call DrawLine(prevPoint, nextPoint)
End If
prevPoint = nextPoint
tempNum = tempNum + 1
Loop
Exit Sub
ErrorHandler:
Exit Sub
End Sub