Jump to content

Recommended Posts

Posted

Hello,

On 14th of Mar. 2012 a member named Big Al posted the dcl code for a program called DD4X3. Does anyone have the lisp code that goes with that dcl file? It's a very nice dialog box with spaces for images, but I can't figure out how to get images to show up. Thanks in advance.

DD4X3.PNG

Posted

Would it happen to be what is shown in post #28 of the thread you are referring to?

Posted

Here is the lisp you should have just asked me.

 

 

 

 

used to set up dimension variables
;;;               Uses dd4x3.dcl for the dialogue definition.  The
;;;               slide images are in list ai_pts_lst.
(setvar "CMDECHO" 0)
(setq ai_pts_lst '("CTONE(DSE1ON)" "CTONE(DSE1OF)" "CTONE(DSE2ON)" "CTONE(DSE2OF)"
                  "CTONE(DTADON)" "CTONE(DTADOF)" "CTONE(DIMTOLP)" "CTONE(DIMTOLM)"
                  "CTONE(DTOLON)" "CTONE(DTOLOF)" "CTONE(DTIHON)" "CTONE(DTIHOF)")
)
(setq ai_pts_lst2 '("43sq1" "43sq2" "43sq3" "43sq4" "43sq5" "43sq6""43sq7" "43sq8" "43sq9" "43sq10" "43sq11" "43sq12"))

(defun subdlg ()
 (setq dcl_id (load_dialog  "ddval"))
 (if (not (new_dialog "ddval" dcl_id))
 (exit))
 (action_tile "sizze" "(setq dimval (atof $value))(done_dialog)")
 (mode_tile "sizze" 3)
 (start_dialog)
)
(defun alan2 ()
   (setq ans $key)
   (cond
   ((= ans "43sq1")(setvar "dimse1" 1)(princ "On"))
   ((= ans "43sq2")(setvar "dimse1" 0)(princ "Off"))
   ((= ans "43sq3")(setvar "dimse2" 1)(princ "On"))
   ((= ans "43sq4")(setvar "dimse2" 0)(princ "Off"))
   ((= ans "43sq5")(setvar "dimtad" 1)(princ "On"))
   ((= ans "43sq6")(setvar "dimtad" 0)(princ "Off"))
   ((= ans "43sq7")
;call popup dialog
     (subdlg) 
;(princ dimval)
     (setvar "dimtp" dimval)
   )
   ((= ans "43sq8")
     (subdlg)
     (setvar "dimtm" dimval)
   )
   ((= ans "43sq9")(setvar "dimtol" 1)(princ "On"))
   ((= ans "43sq10")(setvar "dimtol" 0)(princ "Off"))
   ((= ans "43sq11")(setvar "dimtih" 1)(princ "On"))
   ((= ans "43sq12")(setvar "dimtih" 0)(princ "Off"))
 )
)                                                   
; 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  "(alan2)")
 )
 (start_dialog)
)
; this is first step
 (setq app "dd4x3.dcl")
 
 (setq dcl_id (load_dialog app))
 (if (not (new_dialog "dd4x3" dcl_id))
 (exit))
 
 (ai_ptype_main)
 (setq *error* old_error old_error nil)
(done_dialog)
(princ)


Posted

BIGAL: The OP probably did not know how to ask you given he just became a member of the forum.

Posted

Thank You Big Al-

I'm new to this, when I searched your name nothing came up... I'm learning my way around the site better, thanks for being patient with me, and thanks for the code!

Posted

No worries the routines were done with 2x3 3x3 etc so they could be used with any code.

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...