Jump to content

Need help (Copyclip to New Drawing)


Recommended Posts

Posted

What I need to accomplish. I'd like to code this all into one lisp but I'm having trouble with the "New" or "Qnew" command and getting them to work in a lisp routine.

 

1. Copybase with window select (done)

(command "copybase" "0,0" "W" pause pause "")

2. create a new drawing from template. I need to autoname this with a filename that can be overwritten each time. I've got the code for the auto name done and working, but I can't get the "New" command to run.

 

(command "setvar""users1""-CNC")
(command "setvar""users2""CNC/")
(setq AA (GETVAR "USERS1"))
(SETQ AB (GETVAR "USERS2"))
(setq CT (getvar "CTAB"))
(setq DP (getvar "DWGPREFIX"))
(SETQ TM (STRCAT DP AB CT AA))""
(command "new" TM )
(command "tilemode" "1")

3. Pasteclip and insert the contents from the base point in the Copybase at a specific point. (done)

 

(command "pasteclip" "0,0" "")

I can't use -wblock which I'd prefer to use and have everything working. What I'm doing is extracting a CNC drawing from a construction set, at some point in time the draworder command was use in the drawing and it's no longer compatible with our "CNC" software. using wblock caries over something in the drawing that is causing the problem.

 

I've tried disabling draworder with draworderctl (0), sortents (0), treedepth (0) and it hasn't worked.

 

I know that copycliping the parts, then pasting them into a new drawing works, then renaming it. It's a lot of extra steps that I'd rather not have to do.

 

thanks.

Posted

I've done a little research and it looks like this will need to be done in VBA, because the lisp stops when a new drawing is opened.

 

Can anyone help me with this?

  • 2 weeks later...
Posted

I'm still looking for some help with this. Anyone?

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