Message 1 of 3
Selection Set ERROR: Invalid argument pSelSet in AddItems
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I was trying to create selection set for some selected objects present in my AutoCAD drawing using Python, when the below mentioned error was thrown:
"self.__com_Invoke(memid, riid_null, lcid, invkind,
_ctypes.COMError: (-2147352567, 'Exception occurred.', ('Invalid argument pSelSet in AddItems', 'AutoCAD', 'C:\\Program Files\\Autodesk\\AutoCAD 2018\\HELP\\OLE_ERR.CHM', -2145320939, None))"
To control the type of items present in the array of objects I filtered out my model with only circles, but still, the error was there.
Here is my code :
"
from pyautocad import Autocad
acad = Autocad(create_if_not_exists=True)
ss = acad.doc.SelectionSets.Add("ss1")
arr_object = []
for i in acad.iter_objects_fast(object_name_or_list="AcDbCircle")
arr_object.append(i)
ss.AddItems(arr_object)
"
Can anyone please guide me on how to deal with this error ?
Thanks in advance.