CAD Forum - Database of tips, tricks and utilities for AutoCAD, Inventor and other Autodesk products [www.cadforum.cz]
CZ | EN | DE
Login or
registration
  Visitors: 8805
RSS channel - CAD tips RSS tips
RSS discussions

Discussion Discussion forum

 

HelpCAD discussion

 
CAD Forum - Homepage CAD discussion forum - ask any CAD-related questions here, share your CAD knowledge on AutoCAD, Inventor, Revit and other Autodesk software with your peers from all over the world. To start a new topic, choose an appropriate forum.

Please abide by the rules of this forum.

How to post questions: register or login, go to the specific forum and click the NEW TOPIC button.
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Topic Closedcode for commands

 Post Reply Post Reply
Author
Arthurengineer View Drop Down
Newbie
Newbie


Joined: 16.Nov.2010
Location: United Kingdom
Using: A'cad LT 2007 , A'cad 2000
Status: Offline
Points: 6
Direct Link To This Post Topic: code for commands
    Posted: 13.Jun.2012 at 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.
Arthur
Back to Top
John Connor View Drop Down
Senior Member
Senior Member


Joined: 01.Feb.2011
Location: United States
Using: AutoCAD 2018
Status: Offline
Points: 7175
Direct Link To This Post Posted: 13.Jun.2012 at 18:08
And where does the code fail?
"Humans have a strength that cannot be measured. This is John Connor. If you are reading this, you are the resistance."

<<AutoCAD 2015>>

Back to Top
Arthurengineer View Drop Down
Newbie
Newbie


Joined: 16.Nov.2010
Location: United Kingdom
Using: A'cad LT 2007 , A'cad 2000
Status: Offline
Points: 6
Direct Link To This Post Posted: 14.Jun.2012 at 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.
Arthur
Back to Top
John Connor View Drop Down
Senior Member
Senior Member


Joined: 01.Feb.2011
Location: United States
Using: AutoCAD 2018
Status: Offline
Points: 7175
Direct Link To This Post Posted: 14.Jun.2012 at 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.
"Humans have a strength that cannot be measured. This is John Connor. If you are reading this, you are the resistance."

<<AutoCAD 2015>>

Back to Top
Arthurengineer View Drop Down
Newbie
Newbie


Joined: 16.Nov.2010
Location: United Kingdom
Using: A'cad LT 2007 , A'cad 2000
Status: Offline
Points: 6
Direct Link To This Post Posted: 14.Jun.2012 at 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...
Arthur
Back to Top
John Connor View Drop Down
Senior Member
Senior Member


Joined: 01.Feb.2011
Location: United States
Using: AutoCAD 2018
Status: Offline
Points: 7175
Direct Link To This Post Posted: 14.Jun.2012 at 12:19
This macro should work.  I substituted a "qsave" for "saveas".

^C^C_ze audit y _purge a * n _qsave
"Humans have a strength that cannot be measured. This is John Connor. If you are reading this, you are the resistance."

<<AutoCAD 2015>>

Back to Top
Arthurengineer View Drop Down
Newbie
Newbie


Joined: 16.Nov.2010
Location: United Kingdom
Using: A'cad LT 2007 , A'cad 2000
Status: Offline
Points: 6
Direct Link To This Post Posted: 14.Jun.2012 at 12:36
I shall try this, Thanks for your help.
Most appreciated 
Arthur
Back to Top

Related CAD tips:


 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down



This page was generated in 0,453 seconds.