Jump to content

Macro to open a dwg, then SAVEAS?


dcowell

Recommended Posts

I'm working on a custom partial CUI menu for my firm. (I'm using AutoCad 2007.) I have a few drawings setup with items in both paperspace and modelspace. So, within the pulldown/menu, I've created a command with the following macro (that does not work)...

 

^c^cfiledia;0;open,Sheet-Setup_ID1-1_Notes;Saveas;

 

Any ideas? :cry:

Link to comment
Share on other sites

I'm working on a custom partial CUI menu for my firm. (I'm using AutoCad 2007.) I have a few drawings setup with items in both paperspace and modelspace. So, within the pulldown/menu, I've created a command with the following macro (that does not work)...

 

^c^cfiledia;0;open,Sheet-Setup_ID1-1_Notes;Saveas;

 

Any ideas? :cry:

 

Try doing something like this:

 

You are not putting the location path like this:

 

C:\Test\Test\Test\Sheet-Setup_ID1-1_Notes.dwt

 

Plus after the saveas command it will as what version would you like to save it as, and the location you would like to save it to.

 

Try tryping the commands in one at a time in the command line.

Link to comment
Share on other sites

Thanks for the response. However, if I add the path, the macro thinks it's a "pause", thus, I've placed the path in the SUPPORT FILE SEARCH PATH under the OPTION, File tab (which worked for block, etc. in the menu). Note, placing a "quote" around the path & file name did not work either.

 

After the saveas, I think I'd like the user to enter the rest of the information. So the prompt is good.

 

Right now, it does goto asking the version, but when done and saveas file path and name entered; the actual file it was supposed to open was not completed. Must be something with the open and all the lisp routines, etc. that need to run. Maybe the macro is not giving it enough time to "Open" before it asks for saving???

Link to comment
Share on other sites

One problem autocad has is with directory names that have spaces in them change the space to a _ and often problem solved.

 

eg old \projects\joe blogs\job54

new \projects\joe_blogs\job54

Link to comment
Share on other sites

Okay, still working on this and I'm thankful for all your input. Here's my Macro...I've simplified it for now not to do the SAVEAS as I can add that once it's working.

 

^c^cfiledia;0;open;T:/AutoCad2007/library/PKS/Sheet_Setup/Sheet-Setup_ID1-1_Notes;

 

I've checked all the spellings and I don't use spaces in folders or files. However, Autocad hangs up and shows...

 

Command: filedia

Enter new value for FILEDIA : 0

Command: open

Command: T:/AutoCad2007/library/PKS/Sheet_Setup/Sheet-Setup_ID1-1_Notes

Unknown command

"T:/AUTOCAD2007/LIBRARY/PKS/SHEET_SETUP/SHEET-SETUP_ID1-1_NOTES". Press F1 for

help.

Link to comment
Share on other sites

Okay, I added the .dwg, and the same problem appears. I'm actually thinking it's between the "open" and the ; see below. Even though when you type it you need to hit the return, is there some other symbol to use here instead of ; which, if you look below, looks like it terminates the macro and sees the path as a new command.

 

Command: filedia

Enter new value for FILEDIA : 0

Command: open

Command: T:/AutoCad2007/library/PKS/Sheet_Setup/Sheet-Setup_ID1-1_Notes.dwg

Unknown command

"T:/AUTOCAD2007/LIBRARY/PKS/SHEET_SETUP/SHEET-SETUP_ID1-1_NOTES.DWG". Press F1

for help.

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