0 Members and 1 Guest are viewing this topic.
$(substr,$(getvar,dwgprefix),[color=red]NUMBER[/color])
(defun string-break (str pat / i j lst) (setq i 0) (while (setq j (vl-string-search pat str i)) (setq lst (cons (substr str (1+ i) (- j i)) lst)) (setq i (+ j (strlen pat)))) (mapcar (function (lambda (x) (vl-string-trim " " x))) (cons (substr str (1+ i)) lst)))
(setq filename "S:\\STONE_APPS\\CUSTOMERS\\JIM VAUGHN HOMES\\24115")(setq items (reverse (string-break filename "\\")));;;(setq backslashes (- (length items) 1));;;\JIM VAUGHN HOMES\24115(setq lsp (strcat "\\" (nth (- (length items) 2) items) "\\" (last items)))
I replied before I saw the second response. How exactly would I use the lisp code to set the field to the last two backslashes?
I must be missing something. I don't see a field option for lisp variable.
How about setting the string you need to one of USERS1, and using a DIESEL field to retrieve it? Can't think of much else....
Th IT Nazis here at work have that site blocked as an interest/hobby so I can't view the example. I'd love to see it though, can you post it here?
also, don't remember if RTEXT it is available on A2006, you might see if could be of some help too, maybe