Hi all,
I've been using the code below to check the last character of our drawing revision attribute so I can determine where to put the PDF file once it has been created (we want only "As-Built" drawings available for general usage).
We use an alpha-numeric revision numbering system where 0, 1, 2, etc are As-Builts and 0A, 1A, 1B, etc. are interim revisions. I have just discovered today though that this code works for all revisions except revision 0 (the first As-Built revision).
revval = the actual revision (e.g. 0, 0A, 1A, etc.)Code:(setq revlen (strlen revval)) (setq revlast (substr revval revlen)) (if (= 0 (atoi revlast)) (command "script" "N:/plot/Pspace-Interim.scr") (command "script" "N:/plot/Pspace-As-Built.scr") )
revlast = the last character of the revision value stripped out
Of course you will see that this works fine for any drawing with a revision other than '0', for this revision it will determine (incorrectly) that it is an interim revision.
Does anybody have another way of checking this value (revlast) to see if it is an numeric or an alpha character?
TIA,...Jon.