(defun profile-draw-block-by-view-basement (insert-point data-list-dialog /
					    name input-list name-block
					    block curent-text-style d-basement h-text start-point summa-height obj-list
					    curent-block-profile-obj temp)
  ; чертит блок подвала по указаным параметрам
  (setq input-list (nth (nth 1 data-list-dialog)(profile-get-sorting-list-profile-dat)))
  (setq name(nth 0 data-list-dialog))
  (setq name-block(strcat "gt-profile_" name))
  (if (tblobjname "block" name-block)
    (command "_-purge" "Б" name-block "Н")
    )
  (setq curent-text-style (nth 1 (cadr input-list)))
  (if(or(eq curent-text-style "***Текущий***")(not(member curent-text-style(get-text-style-list))))
    (setq curent-text-style(getvar "TEXTSTYLE")))
  (setq h-text (atof(nth 2 (cadr input-list))))
  (setq d-basement (atoi(nth 4 (cadr input-list))))
  (setq start-point (list 0.0 0.0 0.0))
  (setq summa-height 0)
  
  (setq block (vla-Add (vla-get-Blocks(vla-get-ActiveDocument(vlax-get-acad-object)))
		       (vlax-3D-point '(0 0 0)) name-block))
  (draw-line-vla-by-list-property(list
				 (cons "spece" block)
				 (cons "StartPoint" (mapcar '- start-point (list  d-basement 0)))
				 (cons "EndPoint" start-point)
				 (cons "Color" 0)
				 (cons "Linetype" "Continuous")
				 (cons "Layer" "0")
				 ))
  (foreach x (cddr input-list)
    (draw-line-vla-by-list-property(list
				     (cons "spece" block)
				     (cons "StartPoint" (mapcar '- start-point (list  d-basement (+ summa-height (atof(nth 2 x))))))
				     (cons "EndPoint" (mapcar '- start-point (list  0 (+ summa-height (atof(nth 2 x))))))
				     (cons "Color" 0)
				     (cons "Linetype" "Continuous")
				     (cons "Layer" "0")
				     ))
    (if
      (eq (nth 1 x) "dist-downgrade")
      (progn
	(cond
	  
	  ((wcmatch (nth 0 x) "*/*" )
	   (draw-line-vla-by-list-property(list
					    (cons "spece" block)
					    (cons "StartPoint" (mapcar '- start-point (list  0 summa-height)))
					    (cons "EndPoint" (mapcar '- start-point (list  d-basement (+ summa-height (atof(nth 2 x))))))
					    (cons "Color" 0)
					    (cons "Linetype" "Continuous")
					    (cons "Layer" "0")
					    ))
	   (draw-mtext-vla-by-list-property(list
					     (cons "spece" block)
					     (cons "TextString" (strcat "\\pxl0.5;"(substr (nth 0 x) 1 (vl-string-position (ascii "/") (nth 0 x) nil))))
					     (cons "InsertionPoint" (mapcar '- start-point (list d-basement (+ summa-height(/ h-text 3)))))
					     (cons "Height" h-text)
					     (cons "Width" d-basement)
					     (cons "Color" 0)
					     (cons "AttachmentPoint" 1)
					     (cons "StyleName" curent-text-style)
					     (cons "Layer" "0")
					     ))
	   (draw-mtext-vla-by-list-property(list
					     (cons "spece" block)
					     (cons "TextString" (strcat "\\pxr0.5;"(substr (nth 0 x) (+ 2(vl-string-position (ascii "/") (nth 0 x) nil))(strlen (nth 0 x)))))
					     (cons "InsertionPoint" (mapcar '- start-point (list 0 (-(+ summa-height (atof(nth 2 x)))(/ h-text 3)))))
					     (cons "Height" h-text)
					     (cons "Width" d-basement)
					     (cons "Color" 0)
					     (cons "AttachmentPoint" 9)
					     (cons "StyleName" curent-text-style)
					     (cons "Layer" "0")
					     ))
	   )
	  
	  ((wcmatch (nth 0 x) "*\\*" )
	   (draw-line-vla-by-list-property(list
				 (cons "spece" block)
				 (cons "StartPoint" (mapcar '- start-point (list  d-basement summa-height)))
				 (cons "EndPoint" (mapcar '- start-point (list  0 (+ summa-height (atof(nth 2 x))))))
				 (cons "Color" 0)
				 (cons "Linetype" "Continuous")
				 (cons "Layer" "0")
				 ))
	   (draw-mtext-vla-by-list-property(list
					     (cons "spece" block)
					     (cons "TextString" (strcat "\\pxl0.5;"(substr (nth 0 x) 1 (vl-string-position (ascii "\\") (nth 0 x) nil))))
					     (cons "InsertionPoint" (mapcar '- start-point (list d-basement(-(+ summa-height (atof(nth 2 x)))(/ h-text 3)))))
					     (cons "Height" h-text)
					     (cons "Width" d-basement)
					     (cons "Color" 0)
					     (cons "AttachmentPoint" 7)
					     (cons "StyleName" curent-text-style)
					     (cons "Layer" "0")
					     ))
	   (draw-mtext-vla-by-list-property(list
					     (cons "spece" block)
					     (cons "TextString" (strcat "\\pxr0.5;"(substr (nth 0 x) (+ 2(vl-string-position (ascii "\\") (nth 0 x) nil))(strlen (nth 0 x)))))
					     (cons "InsertionPoint" (mapcar '- start-point (list 0 (+ summa-height (/ h-text 3)))))
					     (cons "Height" h-text)
					     (cons "Width" d-basement)
					     (cons "Color" 0)
					     (cons "AttachmentPoint" 3)
					     (cons "StyleName" curent-text-style)
					     (cons "Layer" "0")
					     ))
	   )
	  
	  (T
	   (draw-mtext-vla-by-list-property(list
					     (cons "spece" block)
					     (cons "TextString" (strcat "\\pxl0.5,ql;" (nth 0 x)))
					     (cons "InsertionPoint" (mapcar '- start-point (list(/ d-basement 2)(+ summa-height (/(atof(nth 2 x))2)))))
					     (cons "Height" h-text)
					     (cons "Width" d-basement)
					     (cons "Color" 0)
					     (cons "AttachmentPoint" 5)
					     (cons "StyleName" curent-text-style)
					     (cons "Layer" "0")
					     ))
	   )
	  )
	
	
	
	)
      (draw-mtext-vla-by-list-property(list
					     (cons "spece" block)
					     (cons "TextString" (strcat "\\pxl0.5,ql;" (nth 0 x)))
					     (cons "InsertionPoint" (mapcar '- start-point (list(/ d-basement 2)(+ summa-height (/(atof(nth 2 x))2)))))
					     (cons "Height" h-text)
					     (cons "Width" d-basement)
					     (cons "Color" 0)
					     (cons "AttachmentPoint" 5)
					     (cons "StyleName" curent-text-style)
					     (cons "Layer" "0")
					     ))
      )
    (setq summa-height (+ summa-height (atof(nth 2 x))))
    )
  (draw-line-vla-by-list-property(list
				 (cons "spece" block)
				 (cons "StartPoint" start-point)
				 (cons "EndPoint" (mapcar '- start-point (list  0 summa-height)))
				 (cons "Color" 0)
				 (cons "Linetype" "Continuous")
				 (cons "Layer" "0")
				 ))
  (draw-line-vla-by-list-property(list
				 (cons "spece" block)
				 (cons "StartPoint" (mapcar '- start-point (list  d-basement 0)))
				 (cons "EndPoint" (mapcar '- start-point (list  d-basement summa-height)))
				 (cons "Color" 0)
				 (cons "Linetype" "Continuous")
				 (cons "Layer" "0")
				 ))
  (draw-text-vla-by-list-property(list
				   (cons "spece" block)
				   (cons "TextString" (nth 8 (cadr input-list)))
				   (cons "InsertionPoint" (mapcar '+ (mapcar '- start-point (list  d-basement 0)) (list 0 (* h-text 6.5))))
				   (cons "Height" h-text)
				   (cons "Rotation" 0)
				   (cons "Color" 0)
				   (cons "Alignment" 0)
				   (cons "StyleName" curent-text-style)
				   (cons "Layer" "0")
				   ))
  (setq obj-list
	 (append obj-list
		 (list
		   (cons"vertical-scale"
			(draw-text-vla-by-list-property(list
							 (cons "spece" block)
							 (cons "TextString" (strcat(nth 7 (cadr input-list))" 1:"(itoa(nth 2 data-list-dialog))))
							 (cons "InsertionPoint" (mapcar '+ (mapcar '- start-point (list  d-basement 0)) (list 0 (* h-text 4.5))))
							 (cons "Height" h-text)
							 (cons "Rotation" 0)
							 (cons "Color" 0)
							 (cons "Alignment" 0)
							 (cons "StyleName" curent-text-style)
							 (cons "Layer" "0")
							 ))
			)
		   )))
  (setq obj-list
	 (append obj-list
		 (list
		   (cons"horizontal-scale"
			(draw-text-vla-by-list-property(list
							 (cons "spece" block)
							 (cons "TextString" (strcat(nth 6 (cadr input-list))" 1:"(itoa(nth 3 data-list-dialog))))
							 (cons "InsertionPoint" (mapcar '+ (mapcar '- start-point (list  d-basement 0)) (list 0 (* h-text 3))))
							 (cons "Height" h-text)
							 (cons "Rotation" 0)
							 (cons "Color" 0)
							 (cons "Alignment" 0)
							 (cons "StyleName" curent-text-style)
							 (cons "Layer" "0")
							 ))
			)
		   )))
  (setq obj-list
	 (append obj-list
		 (list
		   (cons"reference-level"
			(draw-text-vla-by-list-property(list
							 (cons "spece" block)
							 (cons "TextString" (strcat(nth 5 (cadr input-list))" "(rtos(nth 5 data-list-dialog)2 2)"м"))
							 (cons "InsertionPoint" (mapcar '+ (mapcar '- start-point (list  d-basement 0)) (list 0 h-text)))
							 (cons "Height" h-text)
							 (cons "Rotation" 0)
							 (cons "Color" 0)
							 (cons "Alignment" 0)
							 (cons "StyleName" curent-text-style)
							 (cons "Layer" "0")
							 ))
			)
		   )))
  
  (setq obj-list(append obj-list(list(cons"block"block))))
  
  (entmake (list '(0 . "INSERT")
		 (cons 2 name-block)
		 (append '(10) insert-point)
		 (cons 41 (/ 1.0 (/ 1000.0 (nth 3 data-list-dialog))))
		 (cons 42 (/ 1.0 (/ 1000.0 (nth 3 data-list-dialog))))
		 (cons 43 (/ 1.0 (/ 1000.0 (nth 3 data-list-dialog))))
		 (cons 50 0)))
  (if (eq (nth 4 data-list-dialog)1)
    (setq data-list-dialog(replase-item-in-list-by-number nil 5 data-list-dialog))
    )
  (setq curent-block-profile-obj(vlax-ename->vla-object(entlast)))
  (vla-put-Linetype curent-block-profile-obj "Continuous")
  (vla-add (vla-get-hyperlinks curent-block-profile-obj) "about:blank" (strcat"Имя профиля: "name))
  (vlax-ldata-put curent-block-profile-obj "profile-name" name)
  (vlax-ldata-put curent-block-profile-obj "parameters-list" input-list)
  (vlax-ldata-put curent-block-profile-obj "view-basement-name" (car input-list))
  (vlax-ldata-put curent-block-profile-obj "profile-parameters" (cadr input-list))
  (vlax-ldata-put curent-block-profile-obj "profile-string-list" (cddr input-list))
  (vlax-ldata-put curent-block-profile-obj "vertical-scale" (nth 2 data-list-dialog))
  (vlax-ldata-put curent-block-profile-obj "horizontal-scale" (nth 3 data-list-dialog))
  (vlax-ldata-put curent-block-profile-obj "auto-reference-level" (nth 4 data-list-dialog))
  (vlax-ldata-put curent-block-profile-obj "reference-level" (nth 5 data-list-dialog))
  (vlax-ldata-put curent-block-profile-obj "draw-intersection" (nth 6 data-list-dialog))
  (vlax-ldata-put curent-block-profile-obj "draw-points" (nth 7 data-list-dialog))
  (vlax-ldata-put curent-block-profile-obj "draw-angle" (nth 8 data-list-dialog))
  (vlax-ldata-put curent-block-profile-obj "elevation-buffer" (nth 9 data-list-dialog))
  (vlax-ldata-put curent-block-profile-obj "picket-first" (nth 10 data-list-dialog))
  (vlax-ldata-put curent-block-profile-obj "accuracy-mleader" (nth 10 (cadr input-list)))
  (vlax-ldata-put curent-block-profile-obj "data-list-dialog" data-list-dialog)
  (vlax-ldata-put curent-block-profile-obj "obj-list" obj-list)
  (vlax-ldata-put curent-block-profile-obj "ruler" 0)
  (vlax-ldata-put"geo_tools_dictionary" "curent-profile"(cons name curent-block-profile-obj))
  (vlax-ldata-put"geo_tools_dictionary" "profile-mode" 1)
  curent-block-profile-obj
  )