Overwrite PRINT function

Overwrite PRINT function

pavel_hosek
Participant Participant
339 Views
3 Replies
Message 1 of 4

Overwrite PRINT function

pavel_hosek
Participant
Participant

Is it possible to overwrite the default _PRINT function (the one called by ctrl+P)? I would like to automatically check the drawing by my own LISP (for instance for layers that have been switched off accidentaly) before allowing the user to print it.

0 Likes
Accepted solutions (1)
340 Views
3 Replies
Replies (3)
Message 2 of 4

komondormrex
Mentor
Mentor

komondormrex_1-1696841803842.png

your custom command or function to check and then plot.

clear Ctrl-P and click OK.

0 Likes
Message 3 of 4

paullimapa
Mentor
Mentor

You can try command Undefine and then enter Print


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes
Message 4 of 4

Kent1Cooper
Consultant
Consultant
Accepted solution

@pavel_hosek wrote:

.... the default _PRINT function (the one called by ctrl+P) ....


That's actually _PLOT [unless that's changed in a newer version than 2020 that I have here -- I can check in 2024 elsewhere later] -- PRINT is just an alias.  If you want to UNDEFINE, it needs to be the actual command name [I get an unknown-command-name error message if I try to UNDEFINE PRINT or use it in an AutoLisp (command) function].  You can then define your own under the same name if you want [so it will be what is invoked by Ctrl+P], doing your own stuff before calling the real command using:

(command "_.plot" ...)

with the period prefix to force the use of the native command.  If you've Undefined it, the (command) function won't recognize it without that.

Kent Cooper, AIA
0 Likes