sachindkini 发表于 2012-3-17 22:00:39

Can add sld file for privew

Dear Sir,

Can add sld file for privew
(defun c:vblk ( / block id name )
    (cond
      (   (<= (setq id (load_dialog "vblk.dcl")) 0)
            (princ "\nDCL File not found.")
       )
       (   (not (new_dialog "valveblk" id))
            (princ "\nDialog could not be loaded.")
       )
      (   t
         (foreach tile '("GATEV" "GLOBE" "BALL" "BUTTERFLY" "CHECK" "PLUG" "WAFER" "NEEDLE" "GLOBE-CV")
               (action_tile tile "(setq name $key) (done_dialog)")
         )
            (start_dialog)
         (if name
                (if
                   (or
                        (tblsearch "BLOCK" (setq block name))
                        (setq block (findfile (strcat name ".dwg")))
                   )
                  (command "_.-insert" block "_S" 1.0 "_R" 0.0 pause)
                   (princ (strcat "\nBlock: " name ".dwg could not be found."))
               )
               (princ "\n*Cancel*")
            )
       )
    )
   (if (< 0 id) (unload_dialog id))
    (princ))
bt : button { width = 15; height = 2; fixed_width = true; fixed_height = true; }
valveblk : dialog { label = "Select block to insert"; spacer;
   : boxed_column { label = "Valves";
      : row {
            : column {
               : bt { key = "GATEV"; label="GATE" ; }
                : bt { key = "GLOBE"; label="GLOBE"; }
                : bt { key = "BALL" ; label = "BALL" ; }
               : bt { key = "BUTTERFLY" ; label = "B/FLY"; }
            }
         : column {
               : bt { key = "CHECK"; label = "CHECK"; }
                : bt { key = "PLUG" ; label = "PLUG" ; }
                : bt { key = "WAFER"; label = "WAFER"; }
                : bt { key = "NEEDLE"; label = "NEEDLE"; }
            }
      }
      spacer;
    }
    : boxed_column { label = "Control Valves";
      : bt { key = "GLOBE-CV"; label = "GLOBE CV"; } spacer;
    }
   : bt { key = "accept"; label = "Cancel"; is_default = true; is_cancel = true; alignment = centered; }}

langjs 发表于 2012-3-18 12:48:31

学习了,这个程序的结构真的不错。

chpmould 发表于 2012-3-18 20:59:14

very good example
thanks!

yshf 发表于 2012-3-18 21:26:35

sachindkini 发表于 2012-3-18 21:32:00

本帖最后由 sachindkini 于 2012-3-18 21:36 编辑

Dear All

can add preview on this lisp help me plz
sse image i want this type result

soly2006 发表于 2012-3-18 23:15:48

http://bbs.mjtd.com/thread-77054-1-1.html

fools 发表于 2012-3-20 16:42:14

sachindkini 发表于 2012-3-18 21:32 static/image/common/back.gif
Dear All

can add preview on this lisp help me plz


use "slide_image" function

sachindkini 发表于 2012-3-21 17:57:22

fools 发表于 2012-3-20 16:42 static/image/common/back.gif
use "slide_image" function

dear sir
can u give sample

fools 发表于 2012-3-21 18:47:35

sachindkini 发表于 2012-3-21 17:57 static/image/common/back.gif
dear sir
can u give sample

http://docs.autodesk.com/ACD/2011/CHS/filesALG/WS73099cc142f4875516d84be10ebc87a53f-7a8a.htm

sachindkini 发表于 2012-3-21 18:56:52

fools 发表于 2012-3-21 18:47 static/image/common/back.gif
http://docs.autodesk.com/ACD/2011/CHS/filesALG/WS73099cc142f4875516d84be10ebc87a53f-7a8a.htm

DEAR SIR,

THANK U VERY MUCH
页: [1] 2
查看完整版本: Can add sld file for privew