Jump to content

Recommended Posts

Posted

I am getting stuck on trying to figure out why this piece of the code errors out on the rest of the routine.

 

I have routine with a bunch of (command)s then, towards the end of the routine is this command.

(setq prename (getfiled "Save as" "Concept" "dwg" 1))(command "_.saveas" "2018" prename)

If the files does not existing, it works as it should.

However, if the file does exist, it will save over the file and then stop the routine from continuing onward.

 

Any ideas?

Posted

Thanks for the pointer lol. It does make sense now.

 

(setvar 'expert 5)

(setq prename (getfiled "Save as" "Concept" "dwg" 1))(command "_.saveas" "2018" prename)

(setvar 'expert 0)

and it works! Thank you.

Posted

Might change it to: 

 

(setq expertvar (getvar 'expert))
(setvar 'expert 5)
(setq prename (getfiled "Save as" "Concept" "dwg" 1))(command "_.saveas" "2018" prename)
(setvar 'expert expertvar)

just in case expert is set to something else initially?

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