Save-As with Suffix - I am mis
This should be easy, yet I am clearly missing something simple!!(defun c:test (/ pathx namex suffx dwgx) (setvar "CMDECHO" 0) (setvar "FILEDIA" 0) (setq pathx (getvar 'dwgprefix)) (setq namex (get-dwgnameonly)) (setq suffx "-Link") (setq dwgx (strcat (pathx namex suffx ".dwg"))) (command "._saveas" "" dwgx) (setvar "CMDECHO" 1) (setvar "FILEDIA" 1) (princ))(defun get-dwgnameonly () (vl-filename-base (getvar 'dwgname)) )
I keep getting:
error: bad function: "D:\\"
Please put me out of my misery
Cheers.. Just remove the two brackets as shown below .
(setq dwgx (strcat (pathx namex suffx ".dwg"))) Thank you Tharwat,
It was that easy! I wonder why that is not identified in VLIDE after selecting 'Check Text in Editor'?
Thank you for your help.
You are welcome .
Actually it won't give you any error report even if you add more open with close brackets because that is not related to a function. I guess .
页:
[1]