Anuncios

The Autodesk Community Forums has a new look. Read more about what's changed on the Community Announcements board.

wispoxy
en respuesta a: lee_pellegrin5UBS5

The LISP...

(defun split-string (delimiter string)
  (loop for i = 0 then (1+ j)
        as j = (position delimiter string :start i)
        collect (subseq string i j)
        until (null j)))

(let* ((ssm-variable "Test1|test2|test3|test4")
       (values (split-string #\| ssm-variable)))
  (print (nth 0 values)) ; To get "Test1"
  (print (nth 1 values)) ; To get "test2"
  (print (nth 2 values)) ; To get "test3"
  (print (nth 3 values))) ; To get "test4"