golfdogz 发表于 2022-7-5 23:57:50

data extraction lisp - backgro

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))
页: [1]
查看完整版本: data extraction lisp - backgro