(defun tool-pallete-list-commands (pallete-patch / DESCRIPTION-BOOTON MACRO NAME-BOOTON NAME-PALLETE O-DOC PALLETE-COMMANDS-LIST PATCH-IMAGE PROPERTIES TOOLS)
  ; возвращает список комманд палитры
  (setq o-doc (XML-Get-XMLObject pallete-patch))
  (setq name-pallete (XML-Get-Child-Value(XML-Get-Child o-doc nil "Properties")nil "ItemName"))
  (setq Tools (XML-Get-Child o-doc nil "Tools"))
  (foreach x (XML-Get-ChildList Tools)
    (if (=(XML-Get-Attribute x "option" "")"24")
      (progn
	(setq properties (XML-Get-Child x nil "Properties"))
	(if (=(setq name-booton (XML-Get-Child-Value properties nil "ItemName"))nil)(setq name-booton ""))
	(if (=(setq description-booton (XML-Get-Child-Value properties nil "Description"))nil)(setq description-booton ""))
	(setq patch-image (XML-Get-Attribute(XML-Get-Child(XML-Get-Child properties nil "Images")nil "Image")"src" ""))
;;;	(setq id-booton (XML-Get-Attribute(XML-Get-Child x nil "ItemID")"idValue" ""))
	(if (=(setq macro (XML-Get-Child-Value(XML-Get-Child(XML-Get-Child x nil "Data") nil "Command") nil "Macro"))nil)(setq macro ""))
	(if (/= name-booton "")
	  (setq pallete-commands-list (append pallete-commands-list (list
								      (list
								      (list "name" name-booton)
								      (list "description" description-booton)
								      (list "image"(strcat (vl-filename-base patch-image)(vl-filename-extension patch-image)))
								      (list "macro" macro)
								      ))))
	  )
	))
    )
  (vlax-release-object properties)
  (vlax-release-object Tools)
  (vlax-release-object o-doc)
  (list (list "name-pallete" name-pallete) (list "pallete-commands" pallete-commands-list))
  )