I need to connect 2 splines through a macro
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi all! Tell me please, I need to connect 2 splines through a macro, by googling I collected this for tests:
Dim ssetObj As AcadSelectionSet
Set sset = ThisDrawing.SelectionSets
Dim acadobj As AcadObject
Dim objname As String
For Each ssetObj In sset
If UCase(ssetObj.Name) = "TEST" Then
sset.Item("TEST").Delete
Exit For
End If
Next
Set ssetObj = ThisDrawing.SelectionSets.Add("TEST")
ssetObj.Select acSelectionSetAll
' there is an error
ThisDrawing.SendCommand "_SPLINEDIT" & vbCr & ssetObj.Item(0) & vbCr & "join" & vbCr & ssetObj.Item(1) & vbCr & vbCr
I have two splines in total, I wanted to combine them, but the error is on the last line (obj doesnt support this property or method)
If manually, the commands take turns, then everything is fine. These splines are two quarters of a circle, but separate.
The splines are:
SPLINE Layer: "0"
Space: Model space
Handle = 4a2
Length: 15.7102
Order: 4
Properties: Planar, Non-Rational, Non-Periodic
I'm new to AutoCAD, I would like to understand, thanks!