Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 04/26/2019 in all areas

  1. Check out: http://www.lee-mac.com/clock.html
    1 point
  2. (defun c:efernal (/ dcl_id dx dy erro f_imagem f_rbs hlp item lista0 lista1 lista2 lista3 lista4 lista5 lista6 lista7 reason topico dialog-fn dialog-fp dcl_id) ; (setvar "CMDECHO" 0) ; command echo could usefull when inserting block unless ins.point/scale/rot. are fixed ; to make perfect slide : ; ":image_button {key=\"img\";width=30;aspect_ratio=1.02;color=0;alignment=top;}}spacer;}" ; this means your slide is about 30x30 .... so insert symbol you want to take slide of in mspace, ; switch to paper space, make viewport size 30x30, make it active (double click), ; zoom to symbol , smile and take picture / slide (Create_Dialog) ; (SETQ dcl_id (LOAD_DIALOG "d:/Temp/Lisp/Cad-tutor/JuniorNogueira/C_Efernal.dcl")) (setq dcl_id (load_dialog dialog-fn)) (if (> dcl_id 0) (if (new_dialog "efernal" dcl_id) (progn (setq erro "Atenção:\n\nVocê não selecionou um item na lista..." hlp "Como usar:\n\nPrograme como usar seu help neste evento..." lista1 '("Lona 1" "Lona 2" "Lona 3" "Lona 4" "Lona 5") lista2 '("Ar condicianado 1" "Ar condicianado 2" "Ar condicianado 3" "Ar condicianado 4" "Ar condicianado 5" "Ar condicianado 6") lista3 '("Vestiário 1" "Vestiário 2" "Vestiário 3" "Vestiário 4" "Vestiário 5") lista4 '("Ref. 1" "Ref. 2" "Ref. 3" "Ref. 4" "Ref. 5") lista5 '("Móvel 1" "Móvel 2" "Móvel 3" "Móvel 4" "Móvel 5") lista6 '("Textos") lista7 '("Símbolo 01" "Símbolo 02" "Símbolo 03" "Símbolo 04" "Símbolo 05" "Símbolo 06" "Símbolo 07" "Símbolo 08" "Símbolo 09" "Símbolo 10") dx (dimx_tile "img") dy (dimy_tile "img") ) (defun f_rbs (k) (cond ((= k "rb1") (SETQ lista0 lista1 topico "LONARIA")) ((= k "rb2") (SETQ lista0 lista2 topico "CLIMATIZAÇÃO")) ((= k "rb3") (SETQ lista0 lista3 topico "VESTIÁRIO")) ((= k "rb4") (SETQ lista0 lista4 topico "REFEITÓRIO")) ((= k "rb5") (SETQ lista0 lista5 topico "MÓVEIS")) ((= k "rb6") (SETQ lista0 lista6 topico "TEXTOS")) ((= k "rb7") (SETQ lista0 lista7 topico "SÍMBOLOS")) ) (start_list "item" 3) (mapcar 'add_list lista0) (end_list) (start_image "img") (fill_image 0 0 dx dy 0) (end_image) (SET_TILE "msg" "Selecione um item na lista, por favor...") ) (defun f_imagem (/ slide) (if (setq slide (findfile (strcat "c:\\clientes\\sld\\" item ".sld"))) (progn (start_image "img") (fill_image 0 0 dx dy 0) (slide_image 0 0 dx dy slide) (end_image) ) (alert (strcat "atenção:\n\nf:\\clientes\\luciana\\sld\\" item ".sld\n" "não foi encontrado...")) ) ) (foreach x '("rb1" "rb2" "rb3" "rb4" "rb5" "rb6" "rb7") (ACTION_TILE x "(F_Rbs $key)")) (action_tile "item" "(setq item (nth (atoi $value) lista0))(f_imagem)") (action_tile "help" "(alert hlp)") (action_tile "cancel" "(done_dialog 0)") (action_tile "accept" "(if item (done_dialog 1)(alert erro))") (setq reason (start_dialog)) (unload_dialog dcl_id) (cond ((= reason 0) (princ "\n-> Cancelado...")) ((= reason 1) (alert (STRCAT "Executar o desejado aqui, com " topico " e " item)) (insert_block topico item) ) ) ) ) (alert "Atenção:\n\nNão foi possível carregar o arquivo dcl.") ) (if (and dialog-fn (setq dialog-fn (findfile dialog-fn)))(vl-file-delete dialog-fn)) (princ) ) (defun insert_block ( %topico %item / path blk) (setq path "f:/clientes/luciana/") (cond ((vl-catch-all-error-p (setq blk (vl-catch-all-apply 'strcat (list path %topico "/" %item ".dwg")))) (alert (strcat "*** Error: \n" (vl-catch-all-error-message blk)))) ((not (findfile blk)) (alert (strcat "Nada noppos blockos :\n" blk))) (t (command "-insert" blk)(while (= 1 (logand (getvar "cmdactive") 1))(command pause))) ) ) (defun Create_Dialog ( ) (if (and (setq dialog-fn (vl-filename-mktemp "tmp.dcl")) (setq dialog-fp (open dialog-fn "w"))) (mapcar '(lambda (x)(write-line x dialog-fp)) (list "efernal:dialog {label=\"E.Fernal\";initial_focus=\"msg\";:spacer {height=1;}" ":text{label=\"Selecione o tópico e depois o item\";key=\"msg\";alignment=centered;height=2;}" ":row {alignment=centered;fixed_width=true;spacer;" ":column {alignment=top;fixed_width=true;fixed_height=true;" ":text {label=\"Selecione tópico\";}" ":radio_column {alignment=top;fixed_height=true;" ":radio_button{label=\"Lonaria\";key=\"rb1\";}" ":radio_button{label=\"Climatização\";key=\"rb2\";}" ":radio_button{label=\"Vestiário\";key=\"rb3\";}" ":radio_button{label=\"Refeitório\";key=\"rb4\";}" ":radio_button{label=\"Móveis Gerais\";key=\"rb5\";}" ":radio_button{label=\"Textos\";key=\"rb6\";}" ":radio_button{label=\"Símbolos\";key=\"rb7\";}}}" "spacer;" ":column {alignment=top;children_fixed_width=true;children_fixed_height=true;" ":text {label=\"Selecione o item\";}:list_box {key=\"item\";width=40;height=16;alignment=top;}}" "spacer;" ":column {alignment=top;children_fixed_width=true;children_fixed_height=true;" ":text {label=\"Preview\";}" ":image_button {key=\"img\";width=30;aspect_ratio=1.02;color=0;alignment=top;}}spacer;}" "spacer;" ":column {:concatenation {alignment=centered;children_fixed_width=true;" ":button {label=\"Como usar\";key=\"help\";width=15;}" ":button {label=\"Cancelar\";key=\"cancel\";is_cancel=true;width=15;}" ":button {label=\"Inserir\";key=\"accept\";width=15;}}}}" ) ) ) (if dialog-fp (close dialog-fp)) )
    1 point
  3. Would you consider using layers (freeze and thaw) as I suggested here?
    1 point
  4. I don't think you need the redraw command. Check out the end of this video I made that animates a four-bar linkage. I would think that animating a clock hand is a similar goal.
    1 point
  5. It is possible that some of you have noticed that the site AsmiTools no longer works due to unpaid hosting services. This is my conscious decision and not due to lack of funds. My present work has nothing to do with AutoCAD, and I find it difficult to maintain this site, as well as participate in this wonderful forum. I say goodbye to your friends. In this archive with all the AsmiTools, lisps each of you can use them as he wants. Perhaps they can be placed in AutoLISP Archive at this site. If someone wants to use my site, I will give it, write me at asmirnov#inbox.lv. Now I end my membership at the forum and erase my account. Goodbye friends, thanks for everything. AsmiTools_Lisps.zip
    1 point
×
×
  • Create New...