Hi,
I know the PUBLISH command changes the value of the variable FIELDEVAL. Similarly, it would be possible to create a routine that when I call the PLOT or the PUBLISH command, the routine will turn off the Wipeout frame automatically? In other words, this routine will prevent making plots with the Wipeout frame on.
Something like:
(if PLOT or PUBLISH
(command "wipeout" "f" "off")
)
And then the PLOT or PUBLISH command continues.
Perhaps at the end the Wipeout frame could be turn on again. 🙂
Thanks!
Yes it is quite easy to do this 🙂
Please take a look at the following page which outlines the process to UNDEFINE a command and the process to REDEFINE it correctly, and which files you will need to modify in order to do so.
http://www.afralisp.net/autolisp/tutorials/redefining-commands.php
Please keep in mind that this will only affect the machine in which the changes are made so if you're needing to redefine this command for your entire network then you could add a menu item to your .CUIx that would contain a macro of the following:
^C^Cwipeout;f;off;plot;
that you could call Plot w/oWipeOuts or simply "Plot" --however you'd like to name it in fact, that's the great thing about the .CUIx capabilities.
Keep in mind that separate from the REDEFINE method linked to, the .CUIx method would be a suitable alternative to accomplishing this task. Either one, or both in fact 🙂
Though, in order to prevent completely plotting with wipeout frames on, then you'd likely need to have a reactor created and have it run in the background....I don't believe this is advisable but if you'd only require it's usage in batch plotting, for instance, then it may be suitable. Just depends on your setup/actual needs more than anything. You can't call a (command) with a reactor though....
I did not know the UNDEFINE method . Thank you for the tip. I'm working in routine and so far managed to make it work for the PLOT command.
(command "UNDEFINE" "PLOT")
(defun c: plot ()
(command "wipeout" "f" "off")
(initdia)
(command ".plot")
(command "wipeout" "f" "on")
(command "regen")
)
However this does not work when I select several layouts to make a PUBLISH.
Any idea?
Would simply doing the same
Undefine "publish"
redefine "publish" as "wipeout" "f" "off" "publish"?
Because it will work only if I use the command line 😞
The procedure we use in our office is to select the wanted layout tabs, right click on it and select Publish Select Layouts from the menu.
The problem is that I can not figure out what is the invoked command for this action. If I knew, I could maybe use the REDEFINE method.
Turn on cmdecho
Try -publish
with the hyphen
So far, this is what I achieved :
(command "UNDEFINE" "PLOT");for single print
(defun c: plot (/ usercmd)
(setq usercmd (getvar "cmdecho"))
(setvar "cmdecho" 0)
(command "wipeout" "f" "off")
(initdia)
(command "_.plot")
(while (> (getvar 'cmdactive) 0) (command pause));to avoid a error message when window selection in the Plot dialog box
(command "wipeout" "f" "on")
(setvar "cmdecho" usercmd)
(command "regen")
)
(command "UNDEFINE" "PUBLISH");for more than one print
(defun c: publish (/ usercmd)
(setq usercmd (getvar "cmdecho"))
(setvar "cmdecho" 0)
(command "wipeout" "f" "off")
(initdia)
(command "_.publish")
(command "wipeout" "f" "on")
(command "regen")
(setvar "cmdecho" usercmd)
)
Well, they only close the wipeout frame when I use the menu, the ribbon/the toolbar and the command line.
If I use the right-clic on the layout tabs It does not work. 😞