Please refer to the official document and modify it to fix with the IntelliCAD. Here's the modified function SSetCreate base on your one.
Code: Select all
Function SSetCreate(d_SetName As String, d_Mode As Integer, d_Data As String) As SelectionSet
Dim t_SSET As SelectionSet
Dim t_Point1 As Point
Dim t_Point2 As Point
Dim t_Code1 As Variant
Dim t_Value1 As Variant
Set t_Point1 = Library.CreatePoint(0, 0)
Set t_Point2 = Library.CreatePoint(300, 200)
t_Code1 = d_Mode
t_Value1 = d_Data
Set t_SSET = ActiveDocument.SelectionSets.Add(d_SetName)
'ActiveDocument.SendCommand ("zoom all" + vbCr)
t_SSET.Select vicSelectionSetAll, t_Point1, t_Point2, t_Code1, t_Value1
'ActiveDocument.SendCommand ("zoom p" + vbCr)
Set SSetCreate = t_SSET
End Function