Jump to content

Call "pType" dialog over an active/loaded DCL window


Recommended Posts

Posted

Hi BigAl , 

 

 Please , can you attach some samples?

 

Regards ,

 

Costin

  • Replies 22
  • Created
  • Last Reply

Top Posters In This Topic

  • Costinbos77

    10

  • BIGAL

    5

  • eldon

    4

  • Jonathan Handojo

    2

Top Posters In This Topic

Posted Images

Posted

This is cut from other code so hope makes sense uses slide library ctone.slb

 

(setq ai_pts_lst '("ctone(tlsw)" "ctone(studd)" "ctone(trsw)"
                   "ctone(studr)" "ca3blank" "ctone(studl)"
                   "ctone(blsw)" "ctone(studu)" "ctone(brsw)")
)

(setq ai_pts_lst2 '("33sq1" "33sq2" "33sq3" "33sq4" "33sq5" "33sq6""33sq7" "33sq8" "33sq9" ))

(defun sq_pick ()
  (cond 
    ((= ans "33sq1")(setq ang1 1.5708)(setq ang2 3.1417)(tl))
    ((= ans "33sq2")(tm))
    ((= ans "33sq3")(setq ang1 1.5708)(setq ang2 0.0)(tl))
    ((= ans "33sq4")(tm))
    ((= ans "33sq5")(princ "run other clean up"))
    ((= ans "33sq6")(tm))
    ((= ans "33sq7")(setq ang1 3.1417)(setq ang2 4.7125)(tl))
    ((= ans "33sq8")(tm))
    ((= ans "33sq9")(setq ang1 4.7125)(setq ang2 0.0)(tl))
    )
)

; calculates next slide
(defun alan4 ()
(setq x (+ x 1))
(setq sldname (nth x ai_pts_lst))
)
      

; third step
; set up slide libraray 
(defun ai_ptype_start ()
  (setq x -1)
  (foreach pts0 ai_pts_lst2
      (alan4)
      (start_image pts0)
      (slide_image 0 0 (- (dimx_tile pts0) 1) (- (dimy_tile pts0) 1) sldname)
      (end_image)
  )
)

; this is second step
(defun ai_ptype_main (/ globals)
  (ai_ptype_start)
;now check each sq if picked then run alan2
  (foreach pd0 ai_pts_lst2
    (action_tile  pd0  "(done_dialog)(setq ans $key)")
  )
  (start_dialog)

)

; this is first step

  (if (= w2 nil)(setw2))      
  (setq app "dd3x3.dcl")
  (if (= id_3x3 nil)
    (progn
    (setq dcl_id (load_dialog app))
    (setq id_3x3 dcl_id)
    )
  )
  (if (not (new_dialog "dd3x3" id_3x3))
  (exit)
  )
  (ai_ptype_main)
  (sq_pick)

//  DD3x3 dialogue.  Used by the DD3x3 command in DD3x3.lsp.
//  Called from the AutoCAD Release 12 Standard Menu.

dd3x3 : dialog {
  label        = "Please choose item";
  : column {
    : row {
      : image_button {
        key          = "33sq1";
        width        = 10;
        aspect_ratio = 1.0;
        color        = 0;
        allow_accept = true;
      }
      : image_button {
        key          = "33sq2";
        width        = 10;
        aspect_ratio = 1.0;
        color        = 0;
        allow_accept = true;
      }
      : image_button {
        key          = "33sq3";
        width        = 10;
        aspect_ratio = 1.0;
        color        = 0;
        allow_accept = true;
      }
    }
    : row {
      : image_button {
        key          = "33sq4";
        width        = 10;
        aspect_ratio = 1.0;
        color        = 0;
        allow_accept = true;
      }
      : image_button {
        key          = "33sq5";
        width        = 10;
        aspect_ratio = 1.0;
        color        = 0;
        allow_accept = true;
      }
      : image_button {
        key          = "33sq6";
        width        = 10;
        aspect_ratio = 1.0;
        color        = 0;
        allow_accept = true;
      }
      }
      : row {
      : image_button {
        key          = "33sq7";
        width        = 10;
        aspect_ratio = 1.0;
        color        = 0;
        allow_accept = true;
      }
      : image_button {
        key          = "33sq8";
        width        = 10;
        aspect_ratio = 1.0;
        color        = 0;
        allow_accept = true;
      }
      : image_button {
        key          = "33sq9";
        width        = 10;
        aspect_ratio = 1.0;
        color        = 0;
        allow_accept = true;
      }
      }
  }
ok_cancel;
}

 

Posted

Thank you very much BigAl,  for your support !

 

Regards ,

 

Costin

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...