Jump to content

Script or lisp to press "OK" on pop up box


dweafer

Recommended Posts

Hi all,

 

We are having serious issues with AutoCad 2019 in our office.  I have decided to switch back to 2016.  Our IT had advised that all drawings were to be saved as a 2018 version.

 

I have saved my 200+ drawings back to 2013 version.  But when opening I receive a pop up warning about vehicle tracking which "purgevehicletracking" gets rid of when used.  

 

Can anyone help with a script or lisp code what will press the OK button after the command "_purgevehicletracking".  I want to be able to use this across all my drawings.  

 

image.png.1444b5445907fb0785060c12abb6bce3.png

 

 

 

image.png

Edited by dweafer
mistake on warning
Link to comment
Share on other sites

Like dlanorh a key combo like alt+o which you can program may work. You need to put this code I think in the s:startup section so it runs last.

 

Enter is (Chr 13)

Link to comment
Share on other sites

52 minutes ago, dlanorh said:

Trying to find out if any of the buttons


is_default

is set.

the default is to cancel the command,  I tried to 'tab' and 'enter' in a script which works in order of manual entry.  but has no luck when running.  I would not have much knowledge for writing code,  so I was trying this in a script format and trying to use Scriptpro on multiple files.  

 

_purgevehicletracking

"need to hit the ok button"

 

I appreciate any help.  Thank you. 

 

Link to comment
Share on other sites

Maybe running a script using the core console could work? Think ScriptPro uses this too? Have AutoCAD 2016 here at the office so I could try it if I had an example...

Link to comment
Share on other sites

Hi rlx

 

I am only trying to run one command 'purgevehicletracking' then press 'ok' on the pop up window for this command.  

 

purgevehicletracking - enter

Press ok button

press ok button

qsave

 

Pardon my ignorance but I am not great when it comes to this type of stuff.  

 

 

Link to comment
Share on other sites

39 minutes ago, dweafer said:

Hi rlx

 

I am only trying to run one command 'purgevehicletracking' then press 'ok' on the pop up window for this command.  

 

purgevehicletracking - enter

Press ok button

press ok button

qsave

 

Pardon my ignorance but I am not great when it comes to this type of stuff.  

 

 

 

that's no problem , others are better at this , but in order to come up with something they / we / I would need an example to try to find something which would work for you. This could be anything from making a lisp to run a purge-all on the entire folder with your drawings or maybe using something like initcommandversion / cmddia / while cmdactive blabla bla in the startup of your acad.lsp... just stinking out loud...

Link to comment
Share on other sites

Thanks rlx.

 

I have tried 'Lee Mac' sendkeys function,  while this only works in the command line for using up and down arrow keys after the command/lisp is finished and lets you repeat the command or by pressing the UP button numerous times.  It still leaves the drawing paused waiting for the 'OK' or 'Cancel' button to be hit,  before carrying sendkeys. 

 

I dont think the other link helps either.  I tried these commands in order and noting works.  

 

I appreciate the help thanks.  I will look into it further as this could have to be used across the office.   

Link to comment
Share on other sites

Tharwat

 

The command works.  The issue I am having, is that 2 text box alerts pop up when I execute the command the first with 3 options.  I need to hit 'ok' to agree to continue the command and then another alert to which there is one option to press ok to continue.  

 

Its fine manually entering this but every drawing in the office which has been opened in 2019 needs to have the vehicle tracking purged in 2016.  its a hicup like the proxy graphic information showing up when opening a drawing although this can be turned off.  Its an annoying issue not a critical issue.  But I can not batchplot drawing because of it which is an issue.  

Link to comment
Share on other sites

Even when you ran the command with a hyphen in prior, is it still showing you that dialog ? or is it suppressed to the command line ?

Link to comment
Share on other sites

Strangely the hyphen disappears when I hit enter. 

 

Its not reacting the same as '-purge' would to just 'purge'  the pop still appears and it does not show an option for the hyphen command.

Link to comment
Share on other sites

If only a few hundred drawings are 'infected' the damage is relatively small , just a bad day's work... but the offer still stands , if you could give a sample drawing , no need for much information or data in it , just enough to cause the error. Wrote a routine while back using autocad core console to saveas back to previous release. Core console is commandline only so no dialogs so at least theoretically , if it doesn't hang , it should be possible to process an entire folder in a matter of a few minutes.

Link to comment
Share on other sites

Left field and probably won't work, but what is sysvar "filedia" set to? If it = 1 set it to 0 (zero) and see if the dialog still pops up or it goes to command line.

 

If it doesn't work then reset it to 1 otherwise no dialog's for a lot of commands.

Link to comment
Share on other sites

14 hours ago, rlx said:

If only a few hundred drawings are 'infected' the damage is relatively small , just a bad day's work... but the offer still stands , if you could give a sample drawing , no need for much information or data in it , just enough to cause the error. Wrote a routine while back using autocad core console to saveas back to previous release. Core console is commandline only so no dialogs so at least theoretically , if it doesn't hang , it should be possible to process an entire folder in a matter of a few minutes.

 

Hi rlx

 

I have attached a drawing here as a sample.  See the warning when opening in 2016.  To get rid of this I need to run _purgevehicletracking,  As I said this is not a big issue but across all my drawing it is when trying to batch plot.

 

Appreciate any effort on this.   

MTFO-RODA-MAW-S01-DR-CE-700009 test.dwg

Link to comment
Share on other sites

12 hours ago, dlanorh said:

Left field and probably won't work, but what is sysvar "filedia" set to? If it = 1 set it to 0 (zero) and see if the dialog still pops up or it goes to command line.

 

If it doesn't work then reset it to 1 otherwise no dialog's for a lot of commands.

 

Thanks dlanorh,  I had tried this with no luck.  The popups still appear when windows are suppressed when filedia is set to 0

Link to comment
Share on other sites

5 minutes ago, dweafer said:

 

Hi rlx

 

I have attached a drawing here as a sample.  See the warning when opening in 2016.  To get rid of this I need to run _purgevehicletracking,  As I said this is not a big issue but across all my drawing it is when trying to batch plot.

 

Appreciate any effort on this.   

MTFO-RODA-MAW-S01-DR-CE-700009 test.dwg 800.54 kB · 1 download

 

I've got no nag screen? do you when you open this drawing? Else send one by private message maybe...

Link to comment
Share on other sites

I thought that would be the case. I think you're stuck with the modal dialog and mouse option unless there is another way to strip the data i.e it is xdata attached to objects. Can't open the drawing as I need 2010.

Edited by dlanorh
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...