> GreyHound
Попробуй как будет работать, проверял
не шибко в А2007 только
Option Explicit
' witchcrafted by Fatty
Sub Ch_Example_Create_Boundary()
Dim oPline As AcadLWPolyline
Dim oCount As Long
Dim point2D As Variant
Dim poinStr As String
Dim retPnt As Variant
Dim kWord, xStr, yStr As String
On Error GoTo SayMeAbout
With ThisDrawing
.SetVariable "CMDECHO", 0
.SetVariable "HPGAPTOL", 5#
.SetVariable "OSMODE", 0
kWord = " >> Specify internal point >> "
.Utility.InitializeUserInput 128
retPnt = .Utility.GetPoint(, kWord)
xStr = Replace(CStr(retPnt(0)), ",", ".", 1, vbTextCompare)
yStr = Replace(CStr(retPnt(1)), ",", ".", 1, vbTextCompare)
poinStr = xStr & "," & yStr
.SendCommand "_-boundary" & vbCr & poinStr & vbCr & vbCr
DoEvents
Dim pfSset As AcadSelectionSet
Dim oEnt As AcadEntity
Set pfSset = .PickfirstSelectionSet
pfSset.Clear
pfSset.Select acSelectionSetLast
If pfSset.Count = 1 Then
Set oEnt = pfSset.Item(0)
If TypeOf oEnt Is AcadLWPolyline Then
Set oPline = oEnt
' edit this polyline here, i.e. change color:
oPline.color = acMagenta
End If
End If
.SetVariable "CMDECHO", 1
.SetVariable "OSMODE", 687
.Regen True
End With
SayMeAbout:
If Err.Number <> 0 Then
MsgBox Err.Description
End If
End Sub
~'J'~