Тема: Как выбрать объект в чертеже и вернуться в диалоговое окно?

мне нуйно вибрат обйецт в чертейе & вернутса в диалоговое окно (доне_диалог 2) не получаетса
Предупреждение! Помещайте транслит между тагами [rus] и [/rus].
/Администратор./

Re: Как выбрать объект в чертеже и вернуться в диалоговое окно?

Пример из Bmake.lsp из AutoCAD R14

  ;; Main function for bmake
  (defun bmk_bmake_main ()
    ; Make list of defined blocks.
    (setq block_list (ai_table "block" 2)
          what_next     5
    )
    ;; Start the dialogue.
    (while (< 2 what_next)
      (if (not (new_dialog "bmake" dcl_id)) (exit))
      ;; Set up defaults, for initial load and when returning from object
      ;; selection or point picking.
      (bmk_defaults)
      (if (= 5 what_next) (mode_tile "bname" 2)) ; set focus to block name.
      ;; Define what happens when each control is picked.  Mode_tile is
      ;; used to set focus to the next relevant action, cuts down mouse
      ;; handling in the dialogue.
      (action_tile "bname"       "(bmk_check_name (setq bname (strcase (get_tile $key))))")
      (action_tile "pick_pt"     "(rs_error)(done_dialog 4)")
      (action_tile "x_pt"        "(setq x_pt (bmk_check_real (distof (get_tile $key)) $key))")
      (action_tile "y_pt"        "(setq y_pt (bmk_check_real (distof (get_tile $key)) $key))")
      (action_tile "z_pt"        "(setq z_pt (bmk_check_real (distof (get_tile $key)) $key))")
      (action_tile "sel_objs"    "(done_dialog 3)")
      (action_tile "list_blocks" "(rs_error)(bmk_list_blocks)")
      (action_tile "retain"      "(setq retain (atoi $value))")
      (action_tile "accept"      "(bmk_bexist)")
      (action_tile "cancel"      "(done_dialog 0)")
      (action_tile "help"        "(help \"\" \"block_definition_dialog\")")
      (setq what_next (start_dialog))   ; Throw up the dialogue.
      (cond                                   ; Decide what to do next.
        ;; If select objects was picked...
        ((= what_next 3)
          (setq temp_ss (ssget))
          (if temp_ss
            (setq selection_set (ai_ssget temp_ss))
          )
          (rs_error)
        )
        ;; If base point was picked...
        ((= what_next 4)
          (initget 1)
          (setq pick_pt (getpoint "Базовая точка вставки: "))
          (if pick_pt
            (setq x_pt (car   pick_pt)    ; Current UCS
                  y_pt (cadr  pick_pt)
                  z_pt (caddr pick_pt)
            )
          )
        )
      )
    )
    ;; If OK was picked...
    (if (= what_next 2)
      (bmk_make_block)
    )
  )

Re: Как выбрать объект в чертеже и вернуться в диалоговое окно?

> Игорь
:))