Hello all,
I am trying to add a suffix to the drawing name and current layout.
I have started with the following but get drawings with names such as:
M001- LEGENDS,SYMBOLS AND ABBREVIATIONS.dwg_P1.dwg
My questions is how do i get rid of the first0 ".dwg"?
Thank you all in advance,
Andre
Code:
(defun c:test (/ olddwgname suf newdwgname dwgpath oldlayoutname)
(setq olddwgname (getvar "dwgname"))
(setq suf (getstring T"\enter suffix: "))
(setq newdwgname (strcat odn suf))
(setq dwgpath (getvar "dwgprefix"))
(setq oldlayoutname (getvar "ctab"))
(command "-layout" "rename" "" (strcat oldlayoutname suf ""))
(command ".saveas" "2004" (strcat dwgpath newdwgname))
(princ))
Thanks again,
Andre