(defun C:normal-set-000 ( / nabor vla-obj n)
  ;устанавливает normal (0 0 1)
  (load_global_variable)
  (setq nabor(ssget "_X"))
  (setq n 0)
  (repeat (sslength nabor)
    (setq vla-obj (vlax-ename->vla-object(ssname nabor n)))
    (if (vlax-property-available-p vla-obj "normal" T)
    (vla-put-normal vla-obj (vlax-3D-point(list 0.0 0.0 1.0))))
;;;    (vla-put-normal (vlax-ename->vla-object(car(entsel))) (vlax-3D-point(list 0.0 0.0 1.0)))
    (setq n (1+ n))
    )
  (progn)
  )

(defun C:list-tree ( / nabor vla-obj n list-all-tree)
  (load_global_variable)
  (setq nabor(ssget "_X" '((8 . "Нумерация деревьев"))))
  (setq n 0)
  (repeat (sslength nabor)
    (setq vla-obj (vlax-ename->vla-object(ssname nabor n)))
    (setq list-all-tree (append list-all-tree (list(atoi(vla-get-TextString vla-obj)))))
    
    (setq n (1+ n))
    )
  
  (file_write_list_to_file "C:\\test\\list.txt" (mapcar 'itoa (vl-sort list-all-tree '<)))
;;;  (princ(vl-sort list-all-tree '<))
  (princ)
  )