nalsur8 Posted February 14, 2014 Share Posted February 14, 2014 (edited) here coding command line input can help me to change using DCL dialog (defun c:bll (/ a b c d num pt ds lg p1 p2 ang p3 ht cd p4 pt5) ;; Tharwat 26. Jan. 2014 ;; ;; edited by nalsur8 11/02/2014 ;;===== add 12022014 ====== (setq os (getvar "osmode")) (setvar "osmode" 512) (if (not job#) (setq job# (getstring "\nJob Number :")) (setq job# job#) ) ;if (if (= (setq ds (getvar "dimscale")) 0.0) (setq ds 1.) ) (setq lg (+ (* ds (getvar "dimasz")) 3)) (if (not num) (setq num (getint "\n Starting Item #: ")) (setq num num) ) ;if (setq split (getstring "\nSaparate Plate? Y,N :")) (if (= split "Y") (progn (initget 1 "A B C D") (setq plate# (getkword "Plate A,B,C,D <A>:")) ) ;progn (setq plate# "") ) ;if (while (and (setq p1 (getpoint "\n Leader Start Point: ")) (setq p2 (getpoint p1 "\n Leader Ending Point: ")) ) (if (< num 10) (setq num1 "-0") (setq num1 "-") ) (setq ang (angle p1 (list (car p2) (cadr p1)))) (setq p3 (polar p2 ang lg)) (setq ht (* ds (getvar "dimtxt"))) (setq cd (/ (* (getvar "dimtxt") ds) 0.4)) (setq p4 (polar p3 ang (/ cd 2.))) (command "_.leader" "_none" p1 "_none" p2 "_none" p3 "" "" "n") (setq a (polar p4 (+ ang (* pi 0.5)) (/ cd 2.))) (setq b (polar a ang 52.)) ;(distance p2 p3))); change long slot (setq c (polar b (+ ang (* pi 1.5)) cd)) (setq d (polar c (+ pi ang) 52.)) ;(distance p2 p3))); change long slot (entmakex (list '(0 . "LWPOLYLINE") '(100 . "AcDbEntity") '(100 . "AcDbPolyline") '(90 . 4) '(70 . 1) (cons 10 a) (cons 10 b) '(42 . -1) (cons 10 c) (cons 10 d) '(42 . -1) ) ) ;;; (command "circle" p4 "d" 3"");p============= (entmakex (list '(0 . "TEXT") (cons 10 (setq pt (mapcar '(lambda (p q) (/ (+ p q) 2.)) (mapcar '(lambda (p q) (/ (+ p q) 2.)) a b) (mapcar '(lambda (p q) (/ (+ p q) 2.)) d c) ) ) ) (cons 11 pt) (cons 40 ht) (cons 1 (strcat job# num1 (itoa num) plate#)) ;edit here for text (cons 50 0.) '(41 . 1.0) (cons 7 (getvar 'textstyle)) '(71 . 0) '(72 . 4) '(73 . 0) ) ) (setq num (+ num 1)) ) ;while (setq plate# nil) ;;; );if (princ) (setvar "osmode" os) ) DCL ballon_slot : dialog{ label="Ballon Slot"; :row{ :boxed_column{label="Setting"; :column{ fixed_width=true; :row{ :text{label="Job Number (Prefix)";} :edit_box{key="jobno";fixed_width=true;} } :row{ :text{label="Plate Stage (Suffix)";} :toggle{key="?????";} :edit_box{key="suffix";fixed_width=true;} } :row{ :text{label="Start No";} :edit_box{key="start_no";fixed_width=true;} } } } :column{ :button{label="OK";key="accept";is_default=true;} :button{label="Cancel";key="cancel";is_cancel=true;} :text{} :text{} :text{} :text{} } } } Edited February 14, 2014 by nalsur8 editing code format Quote Link to comment Share on other sites More sharing options...
MSasu Posted February 14, 2014 Share Posted February 14, 2014 Nalsur8, please edit your post to format properly the code; seems that it lost its new lines when pasted here, so appear as a single line. One looking to help you will have to first take care to split the code in its original statements. Quote Link to comment Share on other sites More sharing options...
nalsur8 Posted February 14, 2014 Author Share Posted February 14, 2014 sorry, already edit with correct format Quote Link to comment Share on other sites More sharing options...
nalsur8 Posted March 13, 2014 Author Share Posted March 13, 2014 any ideal to solve tq Quote Link to comment Share on other sites More sharing options...
Snownut Posted March 13, 2014 Share Posted March 13, 2014 Do some searching here, last week I posted a simple calculator DCL function that shows many actions available in DCL. (see below) There are also many other examples here. http://www.cadtutor.net/forum/showthread.php?84928-Learning-DCL&p=583191&viewfull=1#post583191 Quote Link to comment Share on other sites More sharing options...
nalsur8 Posted March 14, 2014 Author Share Posted March 14, 2014 Shownut: Thank you Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.