Audit: ommitting "fix errors" question, retaining pass info in CL with LISP

Audit: ommitting "fix errors" question, retaining pass info in CL with LISP

Anonymous
Not applicable
979 Views
5 Replies
Message 1 of 6

Audit: ommitting "fix errors" question, retaining pass info in CL with LISP

Anonymous
Not applicable

Hello,

 

I am searching for a way to get rid of the "Do you want to fix errors?" question within the audit command. The following is a line of LISP code that can do it:

              (defun c:AU () (command "audit" "y"))

The issue with this code, is that while I always want to respond YES to the fix errors question, I also would like to see the info in the command line as AutoCAD processes all objects through both passes as the audit is happening. This code acts as if CAD is frozen until the audit is complete. This is not ideal, as some of the files that I am working with these days take ~10+ minutes to audit, and I like to see real time status.

 

Is there a way to rewrite this code to print out the audit processing information as the command is runningaudit.PNG?

 

Thank You,

 

Lucas

0 Likes
Accepted solutions (1)
980 Views
5 Replies
Replies (5)
Message 2 of 6

cadffm
Consultant
Consultant
Without testing and don't knowing if that is what you want.

(Setvar "cmdecho" 1) in front of (command....)
Optional this one too (TEXTSCR)

Sebastian

0 Likes
Message 3 of 6

Anonymous
Not applicable

(Setvar "cmdecho" 1) in front of (command....)
Optional this one too (TEXTSCR)

cmdecho is already defaulted at 1.

 

this code works pretty well:

(defun c:AU () (command "textscr" "audit" "y" "textscr"))

 

it pops out a command text box, where the audit has real time status. for some reason, the command line doesn't give the same status, it is just frozen. maybe a glitch in the command line programing?

 

the above code works, but is there any way to get that status to stay in the command line and not need a separate window? this would be the optimal solution.

 

thanks for the tips.

Message 4 of 6

cadffm
Consultant
Consultant
no cmdecho
no textscr
OK

The last one(untested again, because i am away from cad)
(setvar "CLIPROMPTUPDATE" 1)

Sebastian

0 Likes
Message 5 of 6

Anonymous
Not applicable
Not tested
(defun C:AU (/ acdoc)
(vl-load-com)
(setvar 'CMDECHO 1)
(setq acdoc (vla-get-ActiveDocument (vlax-get-acad-object)))
(textscr)
(vla-AuditInfo acdoc :vlax-true)
)
(princ)
0 Likes
Message 6 of 6

Anonymous
Not applicable
Accepted solution

these codes will run the audit command, but will still not update status in command line. looks like the most appropriate solution is the code that i proposed before, which updates in a separate command text window:

 

(defun c:AU () (command "textscr" "audit" "y" "textscr"))

 

thanks all for your input.

0 Likes