Skip to content
Discussion options

You must be logged in to vote

this seems to work

@Ap.Command()
def doit2():
    try:
        db = Db.curDb()
        model_space = db.modelSpace()
        objs = []
        name = 'test1'

        for solid_id in model_space.objectIds(Db.Solid3d.desc()):
            objs.append(Db.Solid3d(solid_id))

        ss = Ed.SelectionSet()
        for obj in objs:
            ss.add(obj.id())

        resbuf = [
            (Rx.LispType.kText, "_SUPPRESS"),
            (Rx.LispType.kText, "_N"),
            (Rx.LispType.kText, name),
            (Rx.LispType.kSelectionSet, ss),
            (Rx.LispType.kText, ""), # extra string to simulate enter
            (Rx.LispType.kVoid, 0)
        ]
        result = Ed.Core.cmdS(resbuf)…

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
3 replies
@CEXT-Dan
Comment options

@schoeller
Comment options

@CEXT-Dan
Comment options

Comment options

You must be logged in to vote
2 replies
@CEXT-Dan
Comment options

@CEXT-Dan
Comment options

Answer selected by schoeller
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants