Phil Gravel
2012-04-18, 03:05 PM
Good day all,
I've been running ashore trying to get this lisp running. Here's what I'm trying to do:
1) Get user input on file name and insertion point
2) Locate the actual file
3) Insert it in the dwg as a block
All works fine until the insertion of the block
Using: (PATHFLAG is already define earlier)
(defun FILEFIND()
(setq FILETOFIND (strcat TYPQUINC NUMQUINC ".dwg"))
(setq STARTDIR (strcat "H:/Banque/AutoCAD/Quincaillerie/" PATHFLAG "/"))
(setq PATHQUINC (acet-file-dir FILETOFIND STARTDIR))
)
Would return (in a specific instance) if using (princ PATHQUINC):
(H:\Banque\AutoCAD\Quincaillerie\A-Attache\Titus\A000.dwg)
Which is bang on the money.
Problem happens when I: (INSRTPT is also predefined earlier)
(command "_.insert" PATHQUINC INSRTPT "" "" "")
Autocad requires the name of the block to be inserted.....
What am I not seeing?????
I've tried (vl-string-translate "\\\"" "/" pathquinc) to get it to look at the right place, but that doesn't work either....
Thanks
I've been running ashore trying to get this lisp running. Here's what I'm trying to do:
1) Get user input on file name and insertion point
2) Locate the actual file
3) Insert it in the dwg as a block
All works fine until the insertion of the block
Using: (PATHFLAG is already define earlier)
(defun FILEFIND()
(setq FILETOFIND (strcat TYPQUINC NUMQUINC ".dwg"))
(setq STARTDIR (strcat "H:/Banque/AutoCAD/Quincaillerie/" PATHFLAG "/"))
(setq PATHQUINC (acet-file-dir FILETOFIND STARTDIR))
)
Would return (in a specific instance) if using (princ PATHQUINC):
(H:\Banque\AutoCAD\Quincaillerie\A-Attache\Titus\A000.dwg)
Which is bang on the money.
Problem happens when I: (INSRTPT is also predefined earlier)
(command "_.insert" PATHQUINC INSRTPT "" "" "")
Autocad requires the name of the block to be inserted.....
What am I not seeing?????
I've tried (vl-string-translate "\\\"" "/" pathquinc) to get it to look at the right place, but that doesn't work either....
Thanks