Replies: 3 comments 3 replies
-
|
@CEXT-Dan, any ideas? |
Beta Was this translation helpful? Give feedback.
2 replies
-
|
Still not 100% clear, still recovering from jet lag. maybe some of these will spawn some ideas? from pyrx import Ap, Ax, Db, Ed, Ge, Rx
import traceback
def select():
filter = [
(Db.DxfCode.kDxfStart, "LINE"),
(Db.DxfCode.kDxfLayerName, "0"),
]
ps, ss = Ed.Editor.selectPrompt("(A)dd lines: ", "(R)emove lines: ",filter)
return ss.objectIds()
def select_ctor():
db = Db.curDb()
ss = Ed.SelectionSet()
for id in db.modelSpace():
ss.add(id)
ss.ssSetFirst()
@Ap.Command()
def doit():
try:
select()
ps, ss = Ed.Editor.selectPrevious()
print(ss.size())
except Exception:
print(traceback.format_exc())
@Ap.Command()
def doit2():
try:
select_ctor()
print(len(Ed.Core.getCurrentSelectionSet()))
except Exception:
print(traceback.format_exc()) |
Beta Was this translation helpful? Give feedback.
1 reply
-
|
I mean something like this: from pyrx import Ed
def doit():
sset = Ed.SelectionSet()
for id in obj_ids:
sset.add(id)
while True:
sset.ssSetFirst()
status, sset = Ed.Editor.select()
# the user adds elements to or removes them from the initialized set
if status == Ed.PromptStatus.eOk:
process_sset(sset)
else:
break |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Can I call
Ed.Editor.select()with an initialized selection set to which the user can add or remove items?Beta Was this translation helpful? Give feedback.
All reactions