I should make it clear - I didnt write the file, I downladed it about 2 years aga, it worked fine until I tried this week and now I get the error report
this is one of the files that no longer works
(defun c:renum (/ oldPref oldSuf oldStart curText curStr
numZeros)
(vl-load-com)
(initget 6)
(setq numZeros (getInt "\nEnter number of 0 prefix's:"))
(defun num2str (num / numStr)
(setq numStr (itoa num))
(If (< (strlen numStr) numZeros)
(repeat (- numZeros (strlen numStr))
(setq numStr (strcat "0" numStr))
)
)
numStr
)
(if(not rnm:Pref)(setq rnm:Pref ""))
(if(not rnm:Suf)(setq rnm:Suf ""))
(if(not rnm:Start)(setq rnm:Start 1))
(setq oldPref rnm:Pref
oldSuf rnm:Suf
oldStart rnm:Start); end setq
(setq rnm:Pref
(getstring T
(strcat "\nPrefix: <"rnm:Pref">: ")))
(if(= "" rnm:Pref)(setq rnm:Pref oldPref))
(if(= " " rnm:Pref)(setq rnm:Pref ""))
(setq rnm:Suf
(getstring T
(strcat "\nSuffix: <"rnm:Suf">: ")))
(if(= "" rnm:Suf)(setq rnm:Suf oldSuf))
(if(= " " rnm:Suf)(setq rnm:Suf ""))
(setq rnm:Start
(getint
(strcat "\nStarting number <"
(itoa rnm:Start)">: ")))
(if(null rnm:Start)(setq rnm:Start oldStart))
(while T
(setq curStr(strcat rnm:Pref(num2Str rnm:Start)rnm:Suf))
(setq curText
(car
(nentsel "\n<<< Pick TEXT, MTEXT or ATTRIBUTE or press Esc to quit >>> ")))
(if
(and
curText
(member(cdr(assoc 0(entget curText))) '("TEXT" "MTEXT" "ATTRIB"))
); end and
(progn
(vla-put-TextString
(vlax-ename->vla-object curText)curStr)
(setq rnm:Start(1+ rnm:Start))
); end progn
(princ "\n This is not DText or MText ")
); end if
); end while
(princ)
); end of c:renum
(princ "\n[Info] http:\\\\www.AsmiTools.com [Info]")
(princ "\n[Info] Renumber tool. Type RENUM to run. [Info]")