Jump to content

data extraction lisp - background save issue - Autocad


golfdogz

Recommended Posts

Hi

 

i have a lisp i have set up for the office that runs a pre-configured data extraction (dxe) file. the purpose of this lisp is to insert a table in the drawing that shows attributes from a specific block that contains a couple of attributes.

 

the only way i have been able to get the routine to work is to first do a background save to a specifically named file on the server (dxtemp file.dwg).. the dxe file then always references this file and for the most part works amazingly.

 

the issue i am having is that if a user does not first save the file they are working on - when the background (._save) happens, it opens the dxtemp file.dwg on their screen which in turn means that on occasions where this happens, someone else is unable to run the command as the dxtemp file is already open.

 

i ask if anyone knows a way to make the ._save always background, even if the file running it has not previously been saved - ie still called Drawing1.dwg etc.

 

here is my current code

(defun c:Atable (/ pt1)

(SETVAR "cmdecho" 0)
(command "._save" "V:/E-Library/Autocad/02 ACAD Settings/data extraction/DXTEMP FILE.dwg" "y") 
(princ "\nSelect point to insert table")
(setq pt1 (getpoint))
(command "-dataextraction" "V:/E-Library/Autocad/02 ACAD Settings/data extraction/DATAEXTRACT.dxe" pt1)
(dictremove (namedobjdict) "ACAD_DATALINK")
(princ)
)

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