Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Wipeout off when plotting

8 REPLIES 8
Reply
Message 1 of 9
msarqui
652 Views, 8 Replies

Wipeout off when plotting

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!

8 REPLIES 8
Message 2 of 9
bhull1985
in reply to: msarqui

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 🙂

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Please use code tags and credit where credit is due. Accept as solution, if solved. Let's keep it trim people!
Message 3 of 9
bhull1985
in reply to: bhull1985

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....

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Please use code tags and credit where credit is due. Accept as solution, if solved. Let's keep it trim people!
Message 4 of 9
msarqui
in reply to: bhull1985

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?

Message 5 of 9
bhull1985
in reply to: msarqui

Would simply doing the same

Undefine "publish"

redefine "publish" as "wipeout" "f" "off" "publish"?

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Please use code tags and credit where credit is due. Accept as solution, if solved. Let's keep it trim people!
Message 6 of 9
msarqui
in reply to: bhull1985

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.

 

Message 7 of 9
bhull1985
in reply to: msarqui

Turn on cmdecho

 

Try -publish

with the hyphen

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Please use code tags and credit where credit is due. Accept as solution, if solved. Let's keep it trim people!
Message 8 of 9
msarqui
in reply to: bhull1985

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. 😞

 

Message 9 of 9
alexKoshman
in reply to: msarqui

Alas! It works just as it works... With Layout's shortcut it DOESN'T work... I beleive that from the shortcut some function works but not the command "publish"...

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost