(defun extract_name_num (name_layout flag_strcat / name_layout_list num_list name_list num name flag)
  (setq name_layout_list (reverse(vl-string->list name_layout)))
  (setq flag T)
  (repeat (length name_layout_list)
    (if flag
      (if (member (car name_layout_list) (list 48 49 50 51 52 53 54 55 56 57))
	(setq num_list (append num_list (list(car name_layout_list))))
	(setq name_list(append name_list (list(car name_layout_list)))
	      flag nil)
	)
      (setq name_list(append name_list (list(car name_layout_list))))
      )
    (setq name_layout_list (cdr name_layout_list))
    )
  (if num_list
    (setq num (atoi(vl-list->string(reverse num_list))))
    (setq num 1)
    )
  (setq name (vl-list->string(reverse name_list)))
  (while (member (strcat name (itoa num)) (layoutlist))
    (setq num (1+ num))
    )
  (if flag_strcat
    (strcat name (itoa num))
    (list name num)
    )
  )
