Skip to content
Discussion options

You must be logged in to vote

I added it in [#190]

setMuteCmdLine(True) does not work 100% in ZwCAD, it still shows the Y/N prompt

I swap in a new HostApplicationServices class for the capture.
using other Db.HostApplicationServices methods while its swapped is probably not a good idea.

import traceback
from pyrx import Rx, Ge, Gi, Db, Ap, Ed, Ax

def do_capture_audit()-> str:
    capture = Db.HostApplicationServices.createOutputCapture()
    capture.setMuteCmdLine(True)
    cmdData = [
        (Rx.LispType.kText, "AUDIT"),
        (Rx.LispType.kText, "N"),
        (Rx.LispType.kNone, 0),
    ]
    Ed.Core.cmdS(cmdData)
    return capture.output()

@Ap.Command("doit")
def doit():
    try:
       result = do_capture_audit

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@gswifort
Comment options

gswifort Feb 18, 2025
Collaborator Author

@CEXT-Dan
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by gswifort
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