Display full version of the post: code for commands

Arthurengineer
13.06.2012, 14:31
Hello all,I have been trying to integrate three commands with one custom button. I have assigned the following to the button     _zoom _e ^C^C_saveas     This gives me  zoom extents followed by the save as dialogue box. In 2007 LT I managed to have the purge command thrown in as well.I am now running Inventor LT 2012, mainly the LT side with our large legacy of 2D drawings whilst I find my way around the Inventor side.I would like to have my old command (zoom extents, purge & save as) in LT 2012 but no matter what I try I can't get it to work. Any help would be appreciated.Thanks in anticipation.

John Connor
13.06.2012, 18:08
And where does the code fail?


Arthurengineer
14.06.2012, 09:06
The code above works ok,  but where do I add the purge command to the line?...Is it .....  purge_zoom _e ^C^C_saveas  ? I tried all positions but to no avail. I must be doing something fundamentally wrong....as you may see I am very much a beginner to any kind of programming although I do like to experiment.

John Connor
14.06.2012, 11:50
I notice that you haven't set an option for the Purge command.  In the macro I use I first purge all Regapps then do a second Purge using the "All" option followed by an AUDIT to fix any errors before finally saving.


Arthurengineer
14.06.2012, 12:01
Ok, could advise me as to set up a macro that would do a purge all, audit, zoom extents and save as as one command? perhaps I could see where I am going wrong.Thanks....confused...

John Connor
14.06.2012, 12:19
This macro should work.  I substituted a "qsave" for "saveas".^C^C_ze audit y _purge a * n _qsave


Arthurengineer
14.06.2012, 12:36
I shall try this, Thanks for your help.Most appreciated