;;; Translated to English by Igal Averbuh 2015

;;; ;;
;;; | _ |\/| _ _ _ .|_ _ ;;
;;; |__(_| | |(_|| |||||_(_| ;;
;;; ;;
;;-----------------------------------------------------------
;;NOTAS:
;;CABECERAS: ASCII Generator, tipo: straight
;;http://www.network-science.de/ascii/
;;-----------------------------------------------------------

;;------------------- DEFAULTS ------------------------------
;; Valores por defecto al cargar el programa
;;-----------------------------------------------------------

;;Variables GLOBALES
(setq **NameJLGGGlobal** "LaMarmita")
(setq **NameJLGGPopMenu** "LaMarmita")
(setq **NameJLGGMenu** "LAMARMITA" )
(setq **NameJLGGVersion** "LaMarmita.2015")

;;___________________________________________________________
(vl-doc-set '**NameJLGGGlobal** **NameJLGGGlobal** )
(vl-doc-set '**NameJLGGPopMenu** **NameJLGGPopMenu**)
(vl-doc-set '**NameJLGGMenu** **NameJLGGMenu** )
(vl-doc-set '**NameJLGGVersion** **NameJLGGVersion**)

;;Global para la carga:
(setq *Auxiliares_jlgg* T)

;;____________________________________________
;;Activar AutoCAD-Vlisp ActiveX
(vl-load-com)

;;; __ __ __ __ __ __ ;;;
;;; / _ |_ |\ ||_ |__) /\ | |_ (_ ;;;
;;; \__)|__| \||__| \ /--\|__|____) ;;;
;;; ;;;

;;------------------ jlgg-UndoStart --------------------
;; (COMMAND "_.undo" "_be") con VLA
;; Uso: (jlgg-UndoStart (jlgg-ActDoc))
;;------------------------------------------------------
(defun jlgg-UndoStart (doc)
(jlgg-UndoEnd doc)
(vla-startundomark doc)
)
;;------------------ jlgg-UndoEnd ----------------------
;; (COMMAND "_.undo" "_e") con VLA
;; Uso: (jlgg-UndoEnd (jlgg-ActDoc))
;;------------------------------------------------------
(defun jlgg-UndoEnd (doc)
(while (= 8 (logand 8 (getvar 'undoctl)))
(vla-endundomark doc)
)
)

;;-------------------------------- jlgg-ActDoc --------------------------------------
;; Devuelve el objeto VLA del documento activo
;;-----------------------------------------------------------------------------------
;;(defun jlgg-ActDoc () (vla-get-activedocument (vlax-get-acad-object)))
(defun jlgg-ActDoc ()
(vla-get-activedocument (vlax-get-acad-object))
)

;;---------------------------- jlgg-Get-ActiveSpace ---------------------------------
;; Obtener el Espacio activo de un documento
;;-----------------------------------------------------------------------------------
(defun jlgg-Get-ActiveSpace (*AcDoc*)
(if (not *AcDoc*)(setq *AcDoc* (jlgg-ActDoc)))
(vlax-get-property *AcDoc* (if (= 1 (getvar 'cvport)) 'paperspace 'modelspace))
);c.defun

;;; __ __ __ __ __ ;;;
;;; |_ |__)|__)/ \|__) ;;;
;;; |__| \ | \ \__/| \ ;;;
;;; ;;;

;;******************************************************************************************;;
;; RUTINA GENERAL DE ERROR ;;
;;---------------------------------- LMT:error ---------------------------------------------;;
;; Funciףn para manejo de errores, Rutina general de error que sustituye ;;
;; a la funcion de *error* de Autocad para nuestros programas. ;;
;; Esta rutina sirve para cargarla con casi todos los programas. Modo de uso: ;;
;; Modo de uso: ;;
;; Inicio Prg: (setq ac:err *error* *error* LMT:error) ;;
;; Fin Prg: (setq *error* ac:err ac:err nil) ;;
;;------------------------------------------------------------------------------------------;;
(defun LMT:error (msg / funC )
;; Utilizar "command-s" en versiones superiores para no tener problemas
(setq funC (if (>= (read (substr (getvar "ACADVER") 1 4)) 20) command-s vl-cmdf))
;;____________________________________________________________________________________
;; (command-s) por si solo no cancela comandos y (command) o (vl-cmdf) si los cancela
;; pero estos dos תltimos pueden causar problemas en las nuevas versiones de Autocad
;; (2015 - 2016) dentro de la funcion de error.

;;(while (/= (getvar "CMDNAMES") "") (funC)) ;;cancelar comandos activos
;;Uso (jlgg_cancelcmd) del ARX en su lugar (Aתn no implementado para LA MARMITA)
;;(repeat 2 (jlgg_cancelcmd)) ;;cancelar comandos activos

;;__________________________________________________________________________
;;RESTABLECEMOS UNDOs NO TERMINADOS..
(jlgg-UndoEnd (jlgg-ActDoc))
;;Mensaje:
(if (not (setq sTmp (vl-doc-ref '*NameAppRun*)))
(setq sTmp "CustomAPP")
)
(vl-doc-set '*NameAppRun* nil)
(if msg
(if (and msg (not (wcmatch (strcase msg t) "*break,*cancel*,*exit*,interrup*")))
(princ (strcat "\nError en " sTmp ": " msg))
)
)
;;Si existio error en APP: devolvemos a Autocad su funciףn de ERROR
(if ac:err
(setq *error* ac:err ac:err nil)
)
;;si existio error y las variables no se guardarףn se restablecen como estaban
(jlgg-res_vars)
;;para que no exista conflicto con la proxima app en ejecuciףn
(vl-doc-set '*Tmp_ListVars* nil)

(princ)
);cierro defun Cerror

;;; __ __ __ __ __ __ ;;;
;;; / / \| / \|__)|_ (_ ;;;
;;; \__\__/|__\__/| \ |____) ;;;
;;; ;;;

;;--------------------------- jlgg-Get_Col ------------------
;;obtener lista de color de una entidad
(defun jlgg-Get_Col (obj / tmpCol)
(setq obj (jlgg-GetENAM-Obj obj))
(if (null (setq tmpCol (vl-remove-if-not
(function (lambda (x) (Member (car x) '(62 420 430))))
(entget Obj))))
(setq tmpCol '((62 . 256))))
tmpCol
);c.defun

;-------------------- cambio de color de una entidad ---------------------
(defun jlgg-Ch_Col (Ent listCol / tmpCol LEnt)
(setq Ent (jlgg-GetENAM-Obj Ent))
(cond ((= (type listCol) 'INT)
(if (> listCol 256)
(setq tmpCol (list '(62 . 7) (cons 420 listCol))) ;420 = OLECOLOR
(setq tmpCol (list (cons 62 listCol))))) ;62 = ACI color
((= (type listCol) 'LIST)
(setq tmpCol listCol))
);c.cond
(if tmpCol
(setq LEnt (vl-remove-if
(function (lambda (x) (Member (car x) '(62 420 430)))) ;62 = ACI color, 420 = OLECOLOR, 430 = color de Libros de color
(entget Ent))
LEnt (append LEnt tmpCol)
LEnt (entmod LEnt))
);c.if
);c.defun
(defun jlgg-Set_Col (Ent listCol)(jlgg-Ch_Col Ent listCol))

;;------------------------------ RGB & ACI -----------------------------------
;; RGB -> ACI - Lee Mac
;; Args: r,g,b - [int] Red, Green, Blue values
(defun RGB->ACI ( r g b / c o )
(if (setq o (vla-getinterfaceobject (vlax-get-acad-object) (strcat "autocad.accmcolor." (substr (getvar 'acadver) 1 2))))
(progn
(setq c (vl-catch-all-apply '(lambda ( ) (vla-setrgb o r g b) (vla-get-colorindex o))))
(vlax-release-object o)
(if (vl-catch-all-error-p c)
(prompt (strcat "\nError: " (vl-catch-all-error-message c)))
c
)
)
)
)

;; ACI -> RGB - Lee Mac
;; Args: c - [int] ACI (AutoCAD Colour Index) Colour (1<=cRGB ( c / o r )
(if (setq o (vla-getinterfaceobject (vlax-get-acad-object) (strcat "autocad.accmcolor." (substr (getvar 'acadver) 1 2))))
(progn
(setq r
(vl-catch-all-apply
'(lambda ( )
(vla-put-colorindex o c)
(list (vla-get-red o) (vla-get-green o) (vla-get-blue o))
)
)
)
(vlax-release-object o)
(if (vl-catch-all-error-p r)
(prompt (strcat "\nError: " (vl-catch-all-error-message r)))
r
)
)
)
)
;;------------------------------ True & ACI -----------------------------------
;; True -> ACI - Lee Mac
;; Args: c - [int] True Colour
(defun True->ACI ( c / o r )
(apply 'RGB->ACI (True->RGB c))
)
;; ACI -> True - Lee Mac
;; Args: c - [int] ACI (AutoCAD Colour Index) Colour (1<=cTrue ( c / o r )
(apply 'RGB->True (ACI->RGB c))
)

;;------------------------------ RGB & True -----------------------------------
;; RGB -> True - Lee Mac
;; Args: r,g,b - [int] Red, Green, Blue values
(defun RGB->True ( r g b )
(logior (lsh (fix r) 16) (lsh (fix g) 8) (fix b))
)

;; True -> RGB - Lee Mac
;; Args: c - [int] True Colour
(defun True->RGB ( c )
(mapcar '(lambda ( x ) (lsh (lsh (fix c) x) -24)) '(8 16 24))
)

;; RGB -> OLE - Lee Mac
;; Args: r,g,b - [int] Red, Green, Blue values
(defun RGB->OLE ( r g b )
(logior (fix r) (lsh (fix g) 8) (lsh (fix b) 16))
)

;; OLE -> RGB - Lee Mac
;; Args: c - [int] OLE Colour
(defun OLE->RGB ( c )
(mapcar '(lambda ( x ) (lsh (lsh (fix c) x) -24)) '(24 16 8))
)

;;Nombre de color
;Argumento LCol= Lista, Numero o Cadena
(defun jlgg-NameCol (LCol / TmpCol )
(defun GetStrRGB (NumTrueColor / StrCol RGB)
(setq RGB (True->RGB NumTrueColor)
StrCol (strcat "R:" (itoa (car RGB)) ",G:" (itoa (cadr RGB)) ",B:" (itoa (last RGB))))
);c.defun
;;-------- MAIN ----------------------
(if (= (type LCol) 'LIST)
(progn
(setq TmpCol (cdr (nth (1- (length LCol)) LCol)))
(cond
((= (length LCol) 3)
(setq LCol (last (str2lst TmpCol "$")))
)
((= (length LCol) 2)
(setq LCol (GetStrRGB TmpCol))
)
(T (setq LCol TmpCol))
);c.cond
);c.prg
);c.if
(Setq LCol
(cond
((member (type LCol) (list 'REAL 'INT))
(cond ((= LCol 0) "PorBloque")
((= LCol 1) "Rojo")
((= LCol 2) "Amarillo")
((= LCol 3) "Verde")
((= LCol 4) "Ciano")
((= LCol 5) "Azul")
((= LCol 6) "Magenta")
((= LCol 7) "Blanco")
((= LCol 256) "PorCapa")
(t
(if (> LCol 256)
(GetStrRGB LCol)
(jlgg-rtos LCol 2 0)
)
)
)
)
((= (type LCol) 'STR) LCol)
(T nil)
);c.cond
);c.setq
);c.defun

;;; __ __ __ ;;;
;;; / /\ |__) /\ (_ ;;;
;;; \__/--\| /--\__) ;;;
;;; ;;;

;-------------------------- jlgg-GetOrNewLayer ---------------------------
; Obtener o crear una capa por su nombre
;-------------------------------------------------------------------------
(defun jlgg-GetOrNewLayer (LayerName)
(vla-add
(vla-get-layers
(jlgg-ActDoc)) LayerName)
)

;-------------------------- jlgg-Chg_Cap ---------------------------------
; cambiar la capa de una entidad (ENAME o VLA-OBJECT)
;-------------------------------------------------------------------------
(defun jlgg-Chg_Cap (ent LayerName / )
(jlgg-GetOrNewLayer LayerName)
(vla-put-Layer (jlgg-GetVLA-Obj ent) LayerName)
)
;; *********************FIN - FUNCIONES DE CAPAS *************************

;;; __ __ __ _____ __ __ ;;;
;;; |__)|_ / _ |(_ | |__)/ \ ;;;
;;; | \ |__\__)|__) | | \ \__/ ;;;
;;; ;;;

(defun jlgg-LispApps-product-key (/ Comun)
(setq Comun "HKEY_CURRENT_USER\\SOFTWARE\\")
(cond
((and (vl-doc-ref '**NameJLGGGlobal**) (vl-doc-ref '**NameJLGGVersion**))
(strcat Comun (vl-doc-ref '**NameJLGGGlobal**) "\\" (vl-doc-ref '**NameJLGGVersion**) "\\")
)
( **NameJLGGVersion**
(strcat Comun (vl-doc-ref '**NameJLGGVersion**) "\\")
)
(T Comun)
);c.cond
)
;;___________________________________________________________________
(DEFUN jlgg-List-Registry-Command (NameApp Valores?)
(if NameApp
(if Valores?
(vl-registry-descendents (strcat (jlgg-LispApps-product-key) "\\" NameApp) "*") ;Valores
(vl-registry-descendents (strcat (jlgg-LispApps-product-key) "\\" NameApp)) ;subdir
);c.if
(if Valores?
(vl-registry-descendents (jlgg-LispApps-product-key) "*") ;Valores
(vl-registry-descendents (jlgg-LispApps-product-key)) ;Subdir
);c.if
);c.if
);c.defun

;;___________________________________________________________________
(DEFUN jlgg-Delete-Registry-Command (NameApp Key)
(cond
((and NameApp Key)
(vl-registry-delete (strcat (jlgg-LispApps-product-key) "\\" NameApp) key))
(key
(vl-registry-delete (jlgg-LispApps-product-key) key))
(NameApp
(vl-registry-delete (strcat (jlgg-LispApps-product-key) "\\" NameApp)))
);c.cond
);c.defun

;;___________________________________________________________________
(DEFUN jlgg-Read-Registry-Command (NameApp Key)
(cond
((and NameApp Key)
(vl-registry-read (strcat (jlgg-LispApps-product-key) "\\" NameApp) key))
((and key)
(vl-registry-read (jlgg-LispApps-product-key) key))
);c.cond
);c.defun
;;___________________________________________________________________
(DEFUN jlgg-Write-Registry-Command (NameApp Key Value)
(cond
((and NameApp Key Value)
(vl-registry-write (strcat (jlgg-LispApps-product-key) "\\" NameApp) key Value))
((and Key Value)
(vl-registry-write (jlgg-LispApps-product-key) Key Value))
((and NameApp (null Key) (null Value))
(vl-registry-write (strcat (jlgg-LispApps-product-key) "\\" NameApp)))
);c.cond
);c.defun

;;--------------------------------- jlgg-GetVal_Reg_Command ---------------------------------------
;; Datos de usuario obtenidos y guardados en el registro de Windows
;; Ejemplo: (setq RetVal (jlgg-GetVal_Reg_Command LisVal "RotCarp"))
;;-------------------------------------------------------------------------------------------------
(defun jlgg-GetVal_Reg_Command (LisVal sCommand / RetVal)
(setq RetVal
(mapcar (function (lambda (key-val)
(if (caddr key-val) ;;Force Write registry
(progn
(jlgg-Write-Registry-Command sCommand (car key-val) (cadr key-val))
(list (car key-val) (cadr key-val))
);c.prg
;;else
(if (setq ValTmp (jlgg-Read-Registry-Command sCommand (car key-val)))
(list (car key-val) ValTmp)
(progn
(jlgg-Write-Registry-Command sCommand (car key-val) (cadr key-val))
key-val
)
);c.if
);c.if
)) LisVal);c.mapcar
);c.setq
);c.defun

;;; ___ __ __ ;;;
;;; / \ | || |_ (_ ;;;
;;; \__/ | ||__|____) ;;;
;;; ;;;

(defun IsBricsCAD ()
(vl-string-search "BRICSCAD" (strcase (getvar 'acadver)))
)
;------------------------------ jlgg-dxf ---------------------------------
(defun jlgg-dxf (code elist) (cdr (assoc code elist)))

;;----------------------- jlgg-GetBlockName ------------------------------
;; Nombre real de un Bloque
;;------------------------------------------------------------------------
(defun jlgg-GetBlockName (obj)
(setq obj (jlgg-GetVLA-Obj obj))
(if (= (vla-get-ObjectName obj) "AcDbBlockReference")
(vlax-get-property obj
(if (vlax-property-available-p obj 'EffectiveName)
'EffectiveName 'Name
)
)
);c.if
)
;;-------------------------- jlgg-SSToList -------------------------------
;; conjunto de seleccion a lista de entidades
;;------------------------------------------------------------------------
(defun jlgg-SSToList (ss / ssl n)
(if (and ss (= (type ss) 'PICKSET))
(repeat (setq n (sslength ss))
(setq ssl (cons (ssname ss (setq n (1- n))) ssl))))
);c.defun

;;------------------------- jlgg-ListToSS --------------------------------
;; lista de entidades (ENAMEs o VLA-OBJECTs) a conjunto de seleccion
;;------------------------------------------------------------------------
(defun jlgg-ListToSS (ListEnt / ssA)
(setq ssA (ssadd))
(cond
((and ListEnt
(= (type ListEnt) 'LIST))
(setq ListEnt (vl-remove-if 'NULL
(mapcar (function jlgg-GetENAM-Obj) ListEnt)))
(mapcar (function (lambda (ent) (setq ssA (ssadd ent ssA)))) ListEnt)
)
);c.cond
ssA
);c.defun

;;------------------------- jlgg-GetVLA-Obj ------------------------------
;;Obtiene la identidad de un objeto como VLA-OBJECT
;;------------------------------------------------------------------------
(defun jlgg-GetVLA-Obj (Entity / )
(cond
((= (Type Entity) 'ENAME) (vlax-ename->vla-object Entity))
((= (Type Entity) 'VLA-OBJECT) Entity)
(T nil)
)
)
;;------------------------- jlgg-GetENAM-Obj -----------------------------
;;Obtiene la identidad de un objeto como ENAME
;;------------------------------------------------------------------------
(defun jlgg-GetENAM-Obj (Entity / )
(cond
((= (Type Entity) 'VLA-OBJECT) (vlax-vla-object->ename Entity))
((= (Type Entity) 'ENAME) Entity)
(T nil)
)
)

;;-------------------- jlgg-release-object ------------------------------
;; release object o multiple releaseobject
;; (jlgg-release-object oVLA-OBJECT)
;; (jlgg-release-object (list oVLA-OBJECT1 oVLA-OBJECT2 .. oVLA-OBJECTn)
;;-----------------------------------------------------------------------
(defun jlgg-release-object (ListObj /)
(if (/= (type ListObj) 'LIST)
(setq ListObj (list ListObj)))
(mapcar (function
(lambda (obj) (vl-catch-all-apply 'vlax-release-object (list obj))))
ListObj)
)

;;; ========== valor de osmode para pasarlo a initvars ==================
;;;
;;;(setvar "OSMODE" (boole 7 (getvar "OSMODE") 16384))
;;;Turns running object snap off
;;;(setvar "OSMODE" (boole 2 (getvar "OSMODE") 16384))
;;;Turns running object snap on
;;;
;;usar: (BtnRefent T) => Activar Boton Refent
;;usar: (BtnRefent nil) => Desactivar Boton Refent
(defun BtnRefent (Activate)
(setvar "OSMODE"
(boole (if Activate 2 7)
(getvar "OSMODE")
16384))
)
;;Funcion para usar con Initvars y ResVars
(defun osmodeOFF()
(if (null (= 16384 (logand 16384 (getvar "OSMODE"))))
(+ (getvar "OSMODE") 16384)
(getvar "OSMODE"))
);c.defun

;;;-------------------- jlgg-Init_Vars --------------------------------
;;; Inicializa variables
;;;--------------------------------------------------------------------
(defun jlgg-Init_Vars (ListVarTmp / j $list_vars$)
(setq $list_vars$ nil)
(if (= (type ListVarTmp) 'LIST)
(mapcar (function (lambda (lVar)
(if (getvar (car lVar))
(progn
(setq $list_vars$ (cons (list (car lVar) (getvar (car lVar))) $list_vars$))
;;(setvar (car lVar) (last lVar))
(vl-catch-all-apply (function setvar) (list (car lVar) (last lVar)))
);c.prg
);c.fi
)) ListVarTmp)
);c.if
(vl-doc-set '*Tmp_ListVars* $list_vars$)
);c.defun

;;;-------------------- jlgg-Res_Vars ---------------------------------
;;; restaura variables
;;;--------------------------------------------------------------------
(defun jlgg-Res_Vars ( / j $list_vars$)
(if (setq $list_vars$ (vl-doc-ref '*Tmp_ListVars*))
(mapcar (function (lambda (j)
(vl-catch-all-apply (function setvar) (list (car j) (last j)))
;;(setvar (car j) (last j))
)) $list_vars$)
);c.if
(vl-doc-set '*Tmp_ListVars* nil)
);c.defun

;;;--------------------------- jlgg-aux_tabla ----------------------------------
;;; (jlgg-aux_tabla )
;;;
;;; Returns a list of items in the specified table. The bit values have the
;;; following meaning:
;;; 0 List all items in the specified table.
;;; 1 Do not list Layer 0 and Linetype CONTINUOUS.
;;; 2 Do not list anonymous blocks or anonymous groups.
;;; A check against the 70 flag for the following bit:
;;; 1 anonymous block/group
;;; 4 Do not list externally dependant items.
;;; A check against the 70 flag is made for any of the following
;;; bits, which add up to 48:
;;; 16 externally dependant
;;; 32 resolved external or dependant
;;; 8 Do not list Xrefs.
;;; A check against the 70 flag for the following bit:
;;; 4 external reference
;;; 16 Add BYBLOCK and BYLAYER items to list.
;;;-----------------------------------------------------------------------------
(defun jlgg-aux_tabla (table_name bit / tbldata table_list just_name)
(setq tbldata nil)
(setq table_list '())
(setq table_name (xstrcase table_name))
(while (setq tbldata (tblnext table_name (not tbldata)))
(setq just_name (cdr (assoc 2 tbldata)))
(cond
((= "" just_name)) ; Never return null Shape names.
((and (= 1 (logand bit 1))
(or (and (= table_name "LAYER") (= just_name "0"))
(and (= table_name "LAYER") (= (strcase just_name) "DEFPOINTS"))
(and (= table_name "LTYPE")
(= (strcase just_name) "CONTINUOUS")
)
)
))
((and (= 2 (logand bit 2))
(= table_name "BLOCK")
(= 1 (logand 1 (cdr (assoc 70 tbldata))))
))
((and (= 4 (logand bit 4))
;; Check for Xref dependents only.
(zerop (logand 4 (cdr (assoc 70 tbldata))))
(not (zerop (logand 48 (cdr (assoc 70 tbldata)))))

))
((and (= 8 (logand bit 8))
(not (zerop (logand 4 (cdr (assoc 70 tbldata)))))
))
;; Vports tables can have similar names, only display one.
((member just_name table_list)
)
(T (setq table_list (cons just_name table_list)))
)
)
(cond
((and (= 16 (logand bit 16))
(= table_name "LTYPE") ) (setq table_list (cons "BYBLOCK"
(cons "BYLAYER" table_list))) )
(t)
)
(setq table_list table_list)
);c.defun

;;; __ __ __ _____ __ ;;;
;;; / _ |_ / \|\/||_ | |__)| /\ ;;;
;;; \__)|__\__/| ||__ | | \ |/--\ ;;;
;;; ;;;

;;***************************** WCS, UCS, OCS ****************************
;; transformacion de Angulos, y coordenadas en los sistemas de coordenadas
;;************************************************************************

;;------------------------------ UcsChgOrg ----------------------------
;;; Obtiene el Objeto ucs activo si este tiene nombre
;;---------------------------------------------------------------------
(defun GetActiveUCSObj ()
(cond
((= (getvar 'WORLDUCS) 1) "*WORLD*""*UNIVERSAL*")
((= (getvar 'UCSNAME) "") nil)
((vla-get-ActiveUCS (jlgg-ActDoc)))
)
)
;;------------------------------ UcsChgOrg ----------------------------
;;; El nombre del ucs activo y sus datos
;;---------------------------------------------------------------------
(defun GetActiveUCS ( / dataUCS nameUCS)
(setq dataUCS (list (getvar "ucsorg")
(getvar "ucsxdir")
(getvar "ucsydir")))
(cond
((= (getvar 'WORLDUCS) 1) "*WORLD*" ;"*UNIVERSAL*"
(setq dataUCS (cons "*WORLD*" dataUCS))
)
((= (setq nameUCS (getvar 'UCSNAME)) "")
(setq dataUCS (cons "*UNNAMED*" dataUCS))
)
(T ;;Ucs con nombre
(setq dataUCS (cons nameUCS dataUCS))
;(setq dataUCS (append dataUCS (list (vla-get-ActiveUCS (jlgg-ActDoc)))))
)
)
)

;;-------------------------------- UscGetOrSet -------------------------------
;;;Parametros :-
;;; NewUcsName :
;;; Origin : in world
;;; XAxis : translated from world points
;;; YAxis : translated from world points
;;; Activate : Set as ActiveUCS
;;;
;;;Returns : or nil.
;;----------------------------------------------------------------------------
(defun UscGetOrSet (NewUcsName Origin XAxis YAxis Activate / objUCS ActD UCSs)
(setq ActD (jlgg-ActDoc))
(setq UCSs (vla-get-UserCoordinateSystems ActD))
(or NewUcsName (setq NewUcsName "_UCSTemp"))
(or Origin (setq Origin (getvar "ucsorg"))) ; 3D WCS coordinates
(or XAxis (setq XAxis (getvar "ucsxdir"))) ; 3D WCS coordinates specifying a point on the positive X axis of the UCS
(or YAxis (setq YAxis (getvar "ucsydir"))) ; 3D WCS coordinates specifying a point on the positive Y axis of the UCS.
;;
(setq objUCS (vla-add UCSs
(vlax-3d-point '(0.0 0.0 0.0)) ;origin
(vlax-3d-point XAxis) ;x-axis
(vlax-3d-point YAxis) ;y-axis
NewUcsName
)
)
(vla-put-origin objUCS (vlax-3d-point Origin))
(if Activate
(vla-put-activeucs ActD objUCS)
)
objUCS
)
;;

;;------------------------------UcsChgOrg -----------------------------
;;; PtOrg : punto en coordenadas Universales (WCS)
;;; Ejemplo: (setq a (UcsChgOrg (trans (getpoint) 1 0)))
;;---------------------------------------------------------------------
(defun UcsChgOrg (PtOrg / NameUcs AngVecX UcsTmp VectX VectY)
(if (= (setq NameUcs (getvar 'UCSNAME)) "")
(setq NameUcs nil)
)
(setq UcsTmp (UscGetOrSet NameUcs PtOrg nil nil T))
);c.defun

;;------------------------------ Ucs2P -----------------------------------
;;; PtOrg : punto en coordenadas Universales (WCS)
;;; PtDirX : punto de direcciףn X en coordenadas Universales (WCS)
;;; Activate: Activa el nuevo ucs
;;; Ejemplo :
;;; (defun c:Pru_Ucs2P (/ p1 pX)
;;; (cond
;;; ((not (setq p1 (aux:Getpoint nil nil "\nPunto de Origen: "))))
;;; ((not (setq pX (aux:Getpoint '(32) p1 "\nDirecciףn X: "))))
;;; ;(T (Ucs2P nil (trans p1 1 0) (trans pX 1 0) t))
;;; ;;or
;;; (T (Ucs2P "UCSPepe" (trans p1 1 0) (trans pX 1 0) t))
;;; )
;;; )
;;------------------------------------------------------------------------
(defun Ucs2P (NameUcs PtOrg PtDirX Activate / UcsTmp)
(cond
(NameUcs)
((= (setq NameUcs (getvar 'UCSNAME)) "")
(setq NameUcs nil)
)
)
(setq PtDirY (polar '(0 0 0) (+ (angle PtOrg PtDirX)(/ pi 2.0)) 1.0))
(setq PtDirX (polar '(0 0 0) (angle PtOrg PtDirX) 1.0))
(setq UcsTmp (UscGetOrSet NameUcs PtOrg PtDirX PtDirY Activate))
);c.defun

;;----------------------- aux:Getpoint-------------------------------
;;; Initget : Lista de paremetro de initget : '( 6 "Opciones pUnto")
;;; PtRef: Punto de referencia para (getpoint Ptref "Mens: ")
;;; PrmpMens: Mensage para getpoint.
;;-------------------------------------------------------------------
(defun aux:Getpoint (Initg PtRef PrmpMens / lstArg pt)
(if (not PrmpMens)(setq PrmpMens "\nIndique punto:"))
(if (not initg) (setq initg (list 0)))
(cond
((not PtRef)
(setq lstArg (list PrmpMens))
)
(T
(setq lstArg (list PtRef PrmpMens))
)
)
(apply (function initget) initg)
(if (vl-catch-all-error-p
(setq pt (vl-catch-all-apply (function getpoint) lstArg)))
nil
pt
)
)

;;____________________________________________
;convert angle from UCS to WCS
(defun WcsAng (ang)
(angle
(trans '(0 0 0) 1 0)
(trans (polar '(0 0 0) ang 1.0) 1 0)
)
)
(defun Ang2Wcs (ang) (WcsAng ang))

;;____________________________________________
;convert angle from WCS to UCS
(defun UcsAng (ang)
(angle
(trans '(0 0 0) 0 1)
(trans (polar '(0 0 0) ang 1.0) 0 1)
)
)
(defun Ang2Ucs (ang)(UcsAng ang))

;;--------------------------------------------------------------------
;;Convierte angulos de un sistema de coordenadas a otro
;;--------------------------------------------------------------------
(defun CvtEntCode210 (Arg)
(cond ((= (type Arg) 'LIST) Arg)
((= (type Arg) 'ENAME) Arg)
((= (Type Arg) 'VLA-OBJECT) (vlax-vla-object->ename Arg))
(T nil)
);c.cond
);c.defun

;convert angle from OBJ to WCS
;(Cod210 = ENAME, VLA-OBJECT or List de codigo 210 de entidad (x y z))
(defun AngObj2Wcs (ang Cod210)
(if (setq Cod210 (CvtEntCode210 Cod210))
(angle
(trans '(0 0 0) Cod210 0)
(trans (polar '(0 0 0) ang 1.0) Cod210 0)
)
);c.if
);c.defun

;convert angle from WCS to OBJ
;(Cod210 = ENAME, VLA-OBJECT or List de codigo 210 de entidad (x y z))
(defun AngWcs2Obj (ang Cod210)
(if (setq Cod210 (CvtEntCode210 Cod210))
(angle
(trans '(0 0 0) 0 Cod210)
(trans (polar '(0 0 0) ang 1.0) 0 Cod210)
)
);c.if
);c.defun

;convert angle from OBJ to UCS
;(Cod210 = ENAME, VLA-OBJECT or List de codigo 210 de entidad (x y z))
(defun AngObj2Ucs (ang Cod210)
(if (setq Cod210 (CvtEntCode210 Cod210))
(angle
(trans '(0 0 0) Cod210 1)
(trans (polar '(0 0 0) ang 1.0) Cod210 1)
)
);c.if
);c.defun

;convert angle from UCS to OBJ
;(Cod210 = ENAME, VLA-OBJECT or List de codigo 210 de entidad (x y z))
(defun AngUcs2Obj (ang Cod210)
(if (setq Cod210 (CvtEntCode210 Cod210))
(angle
(trans '(0 0 0) 1 Cod210)
(trans (polar '(0 0 0) ang 1.0) 1 Cod210)
)
);c.if
);c.defun

;; ------------------ Coordenadas y Puntos -----------------------------------------------------
;;Traslacion de coordenadas del objeto a traves del codigo de vector normal o de extrusion (210)
;;o la entidad. (Cod210 = ENAME, VLA-OBJECT or List de codigo 210 de entidad (x y z))
(defun TransPtEntToUCS (pt Cod210)
(if (setq Cod210 (CvtEntCode210 Cod210)) (trans pt Cod210 1))
)
(defun TransPtEntToWCS (pt Cod210)
(if (setq Cod210 (CvtEntCode210 Cod210))(trans pt Cod210 0))
)
;------------------------------------------------------
(defun TransPtUCSToEnt (pt Cod210)
(if (setq Cod210 (CvtEntCode210 Cod210)) (trans pt 1 Cod210))
)
(defun TransPtWCSToEnt (pt Cod210)
(if (setq Cod210 (CvtEntCode210 Cod210))(trans pt 0 Cod210))
)
;;--------------------------------------------------------------------
;;Traslada una lista de puntos al sistema de coordenadas de usuario
;;--------------------------------------------------------------------
(defun TransLPtsUCS (LisPts) (mapcar ' (lambda (x) (trans x 0 1)) LisPts))
;;--------------------------------------------------------------------
;;Traslada una lista de puntos al sistema de coordenadas UNIVERSAL
;;--------------------------------------------------------------------
(defun TransLPtsWCS (LisPts) (mapcar ' (lambda (x) (trans x 1 0)) LisPts))

;;*************** FIN Utiles UCS *************************************

;;; ___ __ ___ __ __ ;;;
;;; | |_ \_/ | / \(_ ;;;
;;; | |__/ \ | \__/__) ;;;
;;; ;;;

;;------------------------- jlgg-SetStyTxt ---------------------------------------
;; Josי Luis Garcםa G. 23 Julio, 04
;;Crea (si no existe) un estilo de texto
;;y o modifica las las propiedades (Font, Height, Width) si se indican
;; Ejemplos:
;; (jlgg-SetStyTxt "pepe34" nil nil nil nil)
;; (jlgg-SetStyTxt "pepe344" "ARIAL.TTF" 0.15 1 nil)
;; (jlgg-SetStyTxt "MiStilo02" "stylu.ttf" 0.0 1.0 nil)
;; (jlgg-SetStyTxt "pepe34" "styl.ttf" 0.0 1.0 t) = Error con aviso
;;Nota: siempre devueve el estilo de texto (se haya modificado o no)
;;--------------------------------------------------------------------------------
(defun jlgg-SetStyTxt (TxTStyle Font Height Width MsgError / col_Sty_txt Txt_Sty Font$)
(if (setq Txt_Sty (vla-add (vla-get-TextStyles (jlgg-ActDoc)) TxTStyle))
(progn
(if Font ;;Fuente
(cond
((setq Font$ (findfile Font))
(vl-catch-all-apply 'vla-put-FontFile (list Txt_Sty Font$)))
((setq Font$ (findfile (strcat (getenv "Windir") "\\fonts\\" Font)))
(vl-catch-all-apply 'vla-put-FontFile (list Txt_Sty Font$)))
(T (if MsgError (alert (strcat "Tipo de Fuente: \n\n \"" Font "\"\n\nNo encontrada o No Valida....."))))
);c.cond
);c.if
(vl-catch-all-apply 'vla-put-Height (list Txt_Sty Height))
(vl-catch-all-apply 'vla-put-Width (list Txt_Sty Width))
(vl-catch-all-apply 'vla-put-ObliqueAngle (list Txt_Sty 0.0))
(vl-catch-all-apply 'vla-put-TextGenerationFlag (list Txt_Sty 0))
(vl-catch-all-apply 'vla-put-Backward (list Txt_Sty :vlax-false))
(vl-catch-all-apply 'vla-put-UpsideDown (list Txt_Sty :vlax-false))
);c.prg
);c.if
(vlax-vla-object->ename Txt_Sty)
);c.defun

;;------------------------ cad_div --------------------------------------
;;ESTA RUTINA RECOGE una CADENA DE texto y un simbolo de separacion
;;ejemp.- cadena="*jose*luis*" simbolo="*" y lo combierte en una lista
;;con cadenas separadas ("jose" "luis")
;;-----------------------------------------------------------------------
(defun cad_div (str pat / i j n lst chr1)
(if str
(cond
((/= (type str)(type pat) 'STR))
((= (strlen str) 0)'(""))
((= (strlen pat) 0) (list str))
((= str pat)'(""))
(T
(setq i 0 n (strlen pat))
(while (setq j (vl-string-search pat str i))
(setq chr1 (substr str (1+ i)(- j i)))
(if (> (strlen chr1) 0)(setq lst (cons chr1 lst)) )
(setq i (+ j n))
)
(setq chr1 (substr str (1+ i)))
(if (> (strlen chr1) 0)
(setq lst (cons chr1 lst))
)
(if lst (reverse lst) '(""))
)
)
)
)
;;Otro modo;
;;_______________________________________________________
(defun str2lst (str pat / pos )
(if (setq pos (vl-string-search pat str))
(vl-remove "" (cons (substr str 1 pos)
(str2lst (substr str (+ pos 1 (strlen pat))) pat)
))
(list str)
)
)

;;------------------------ Cad_Join ------------------------------------------
;; Esta rutina recoge una lista de cadena de texto y un simbolo de separacion
;; y lo une en una sola cadena separada por el separador indicado
;; ejemplo.- (Cad_Join '("VA*" "VC*" "BA*" "BC*") "|")
;; Resultado: "VA*|VC*|BA*|BC*"
;;----------------------------------------------------------------------------
(defun Cad_Join (LisStr Sep / ValTmp)
(setq ValTmp "")
(mapcar (function (lambda (Str)
(setq ValTmp (strcat ValTmp Str Sep))
)) LisStr)
(setq ValTmp (vl-string-right-trim Sep ValTmp))
)

;;;--------------------- Str2Lst_WithBlank --------------------------------------------------
;;; Divide una cadena en cadenas mas pequeסas de longitud maxima
;;; indicada en "MaxLenLine" y siempre haciendo la divisiףn en
;;; un espacio en blanco.
;;; ejemplo:
;;; (setq s (strcat "Lorem ipsum dolor sit amet, consectetur adipiscing elit. "
;;; "Morbi sed dictum quam. Morbi nisi augue, aliquam a ultricies sit amet, "
;;; "eleifend in metus. Donec odio tellus, egestas a risus maximus, "
;;; "tempor egestas eros."))
;;; (princ s)
;;; (Str2Lst_WithBlank s 50)
;;;Result:
;;; ("Lorem ipsum dolor sit amet, consectetur adipiscing "
;;; "elit. Morbi sed dictum quam. Morbi nisi augue, aliquam "
;;; "a ultricies sit amet, eleifend in metus. Donec odio "
;;; "tellus, egestas a risus maximus, tempor egestas eros."
;;; )
;;-------------------------------------------------------------------------------------------
(defun Str2Lst_WithBlank (s MaxLenLine / go i s1 s2 slen)
(setq slen (strlen s))
(while (> slen MaxLenLine)
;;search " "
(setq i 0 go T)
(while (and go i (< i MaxLenLine))
(if (setq i (VL-STRING-SEARCH " " s i))
(setq i (1+ i))
)
(if (not (and (setq i2 (VL-STRING-SEARCH " " s (1+ i)))
(< i2 MaxLenLine)))
(setq go nil)
)
)
(cond
(i
(setq s1 (substr s 1 i))
(setq s (substr s (1+ i)))
(setq s2 (cons s1 s2))
(setq slen (strlen s))
)
(T (setq slen (1- MaxLenLine))) ;;salir del bucle:
)
)
(if (/= s "")
(setq s2 (cons s s2))
)
(reverse s2)
)

;;;-------------------- jlgg-rtos -------------------------------------
;;; Rtos personalizado estable
;;;--------------------------------------------------------------------
(defun jlgg-rtos ( real units prec / dimzin result )
(if (not prec)(setq prec (getvar "luprec")))
(if (not units)(setq units (getvar "lunits")))
(setq dimzin (getvar "dimzin"))
(setvar "dimzin" 0)
(setq result (vl-catch-all-apply (function rtos) (list real units prec)))
(setvar "dimzin" dimzin)
(if (not (vl-catch-all-error-p result))
result
)
)

;;*************** FIN Utiles cadenas *************************************

(princ)

;;; __ __ __ __ __ __ __ __ __ __ __ ;;;
;;; / / \ /\ | \|__)/ \(_ | \|_ | \| /\ | / \/ _ / \ ;;;
;;; \__\__//--\|__/| \ \__/__) |__/|__ |__/|/--\|__\__/\__)\__/ ;;;
;;; ;;;

(setq *MaxLenLineDlg* 60)
(vl-doc-set '*MaxLenLineDlg* *MaxLenLineDlg*)

;;---------------------------------------------------- LispMsg ---------------------------------------------------------------------
;;;Mensaje en Lisp parecido a MessageBox en VB.NET
;;;MessageBox(prompt [buttons] [title])
;;;Constant ButtonType Description
;;;
;;;OKOnly 0 Display OK button only.
;;;OKCancel 1 Display OK and Cancel buttons.
;;;AbortRetryIgnore 2 Display Abort, Retry, and Ignore buttons.
;;;YesNoCancel 3 Display Yes, No, and Cancel buttons.
;;;YesNo 4 Display Yes and No buttons.
;;;RetryCancel 5 Display Retry and Cancel buttons.
;;;CancelTAgainContinue 6 Show Cancel, Try Again, and Continue buttons.
;;;Critical 16 Display Critical Message icon.
;;;Question 32 Display Warning Query icon.
;;;Exclamation 48 Display Warning Message icon.
;;;Information 64 Display Information Message icon.
;;;DefaultButton1 0 First button is default.
;;;DefaultButton2 256 Second button is default.
;;;DefaultButton3 512 Third button is default.
;;;SystemModal 4096 System modal; all applications are suspended until the user responds to the message box.
;;;RightJustified 524288 The text is right-justified.
;;;RightToLeft 1048576 The message and caption text display in right-to-left reading order, for some languages.
;;
;;;Return Values
;;;Constant Value
;;;OK 1
;;;Cancel 2
;;;Abort 3
;;;Retry 4
;;;Ignore 5
;;;Yes 6
;;;No 7
;;;Try Again 10
;;;Continue 11
;;;---------------------------------------------------------------------------------------------------------------------------------
(defun jlgg-LispMsg (Mensaje Buttons Titulo / Reponse WshShell)
(if (not Titulo) (setq Titulo "Mensage de Applicaciףn"))
(if (not Buttons) (setq Buttons 0))
(cond
((not (vl-catch-all-error-p
(setq WshShell
(vl-catch-all-apply
(function vla-getInterfaceObject)
(list (vlax-get-acad-object) "WScript.Shell")))))
;;Syntax:
;;intButton = object.Popup(strText,[nSecondsToWait],[strTitle],[nType])
(acad-push-dbmod)
(if (vl-catch-all-error-p
(setq Reponse (vl-catch-all-apply
(function vlax-invoke-method)
(list WshShell 'Popup
Mensaje
0
Titulo
(itoa Buttons)))))
(setq Reponse nil)
)
(vlax-release-object WshShell)
(acad-pop-dbmod)
)
)
Reponse
)

;;;------------------------------ jlgg-test_numr -------------------------------------
;;; Evaluacion de valores reales para DCL desde Lisp.
;;; Rango de valores:
;;; 0 - any numeric input OK
;;; 1 - reject positive
;;; 2 - reject zero
;;; 4 - reject negative
;;; 8 - force integer
;;;-----------------------------------------------------------------------------------
(defun jlgg-test_numr (value error_msg range / good_value index test val char)
(cond
;; is it a number
((not (setq good_value (distof value)))
(set_tile "error" (strcat error_msg " NO VALIDO"))
nil
)
;; is it positive
((and (= 1 (logand 1 range))
(= (abs good_value) good_value)
)
(set_tile "error" (strcat error_msg " no valido POSITIVO"))
nil
)
;; is it zero
((and (= 2 (logand 2 range))
(= 0.0 good_value)
)
(set_tile "error" (strcat error_msg " no valido VALOR 0"))
nil
)
;; is it negative
((and (= 4 (logand 4 range))
(/= (abs good_value) good_value))
(set_tile "error" (strcat error_msg " no valido NEGATIVO"))
nil
)
;; forzar entero
((and (= 8 (logand 8 range))
(not (setq good_value (Dlg_StrINT_check value))))
(set_tile "error" (strcat error_msg " no valido NO es ENTERO"))
nil
)
;;Ok
(T good_value)
)
)

;;________________________________________________________________________
;Inizializa lista en un cuadro de dialogo con LLAVE (a) y LIST (lst)
(defun jlgg-initlstDlg ( key lst /)
(start_list key)
(mapcar (function add_list) lst)
(end_list)
);defun initlst

;;------------------------- parseComment ----------------------------
;; Divide un comentario por "\n" y espacios en blanco y MaxLenLine
;;-------------------------------------------------------------------
(defun parseComment (sComent MaxLenLine / LComent sR)
(setq LTemp (str2lst sComent "\n"))
(mapcar (function (lambda (s / s$)
(if (setq s$ (Str2Lst_WithBlank s MaxLenLine))
(setq sR (append sR s$))
;else:
(setq sR s)
)
)) LTemp)
(setq a nil)
sR
)
;;;;------------------------------ GetDclWidth --------------------------------------
;;;; GetDclWidth - Obtener el ancho real de una cadena para cuadro de diבlogo(DCL).
;;;; Argumentos:
;;;; Str$ = (String) cadena para obtener su ancho en el dialogo.
;;;; Returns:
;;;; Ancho de cadena de diבlogo basado en la fuente MS Sans Serif
;;;; predeterminada de Windows.
;;;;---------------------------------------------------------------------------------
(defun GetDclWidth (Str$ / LChr sLen Get-ChrLen)
(defun Get-ChrLen (chr$)
(cond
((member chr$ (list "@" "W")) (/ 100.0 54.0))
((= chr$ "M") (/ 100.0 66.0))
((member chr$ (list "%" "D" "G" "H" "N" "ׁ" "O" "׃" "Q" "R" "U" "m" "w"))
(/ 100.0 74.0)
)
((member chr$ (list "#" "A" "B" "C" "E" "K" "P" "S" "T" "V" "X" "Y" "Z" "~"))
(/ 100.0 85.0)
)
((member chr$ (list "$" "&" "+" "0" "1" "2" "3" "4" "5" "6" "7" "8" "9"
"" "?" "F" "L" "^" "_" "a" "ב" "b" "c" "d"
"e" "י" "g" "h" "k" "n" "o" "ף" "p" "q" "u" "ת" "v"))
(/ 100.0 99.0)
)
((member chr$ (list (chr 34) "/" "J" (chr 92) "s" "x" "y" "z"))
(/ 100.0 119.0)
)
((member chr$ (list "*" "{" "}"))
(/ 100.0 149.0)
)
((member chr$ (list " " "!" "(" ")" "," "-" "." ":"
";" "I" "[" "]" "`" "f" "r" "t"))
(/ 100.0 199.0)
)
((member chr$ (list "'" "i" "ם" "j" "l" "|"))
(/ 100.0 299.0)
)
(t (/ 100.0 99)) ;valor por defecto para cualquier otro caracter
);cond
);c.defun
;;-------------------------------- MAIN -----------------------------
(setq sLen 0)
(cond
((/= (type Str$) 'STR))
(T
(setq LChr (mapcar (function chr)(vl-string->list Str$)))
(setq sLen (apply (function +) (mapcar (function Get-ChrLen) LChr)))
)
)
sLen
);defun GetDclWidth

;;------------------------------------------ InputBox -------------------------------------------------
;; Josי Luis Garcםa G. 05/2005
;; Programa para Pedir un texto tipo input de VB con aceptar o cancelar y posible password
;; Argumentos:
;; TxtMens: Texto Descriptivo de lo que se pide se le pueden dar retornos de carro con "\n"
;; Title : Titulo del cuadro de dialogo, si es nil se mostrara "Autocad Input Box"
;; TxtDef : Si no es nil se mostrara en edit_box
;; PassW : Si no es nil se mostrarבn ****** en edit_box
;;
;;Ejemplo:
;;; (setq TxtMens (strcat "Lorem ipsum dolor sit amet, consectetur adipiscing elit. "
;;; "Morbi sed dictum quam. \nMorbi nisi augue, aliquam a ultricies sit amet, "
;;; "eleifend in metus.))
;;; (InputBox TxtMens (strcat "Jose" " ® - Gestiףn") nil T)
;;-----------------------------------------------------------------------------------------------------
(defun InputBox (TxtMens Title TxtDef PassW / accion dcl_ID val RetVal ltxt j
c_dialog FichDlg LTxtMens maxLenStr i
;|functions|; Wrt_dialog)
;;_______________________________________________________
(defun Wrt_dialog ( / NameDlg dir sfile j file )
(setq NameDlg "$InputBox$.dcl")
(setq dir (getvar "TEMPPREFIX"))
(setq sfile (strcat dir NameDlg))
(setq file (open sfile "w"))
(write-line "inputbox : dialog { initial_focus=\"input\"; key = sn;" file)
(write-line ": column {" file)
;;Textos de Informaciףn
(cond
(TxtMens
(setq i 0)
(write-line ": paragraph {" file)
(foreach j LTxtMens
(write-line ": text_part {" file)
(write-line (strcat "key = \"txtm" (itoa (setq i (1+ i))) "\";") file)
(write-line (strcat "width = " (rtos maxLenStr 2 3) ";") file)
;;(write-line (strcat " label = \"" j "\";") file)
(write-line "}" file)
);c.foreach
(write-line "}" file)
(write-line ":spacer { height = 0.1; }" file)
)
)
(write-line "}" file)
(write-line "spacer;" file)
(write-line ":edit_box {key = \"input\";" file) ;fixed_width = true;
(write-line "allow_accept = true;" file)
(If PassW
(write-line "label = \"&Password:\";edit_width = 20;fixed_width = true;edit_limit = 12;password_char = \"*\";" file)
)
(write-line "}" file)
(write-line ":spacer { height = 0.5; }" file)
(write-line ":row { fixed_width = true; alignment = centered;" file)
(write-line ":spacer { width = 0.1; }" file)
(write-line ":button { label = \"&Aceptar\"; is_default = true; key = \"accept\"; width = 10; fixed_width = true;}" file)
(write-line ":spacer { width = 2; }" file)
(write-line ":button { label = \"&Cancelar\"; is_cancel = true; key = \"cancel\"; width = 10; fixed_width = true;}" file)
(write-line ":spacer { width = 0.1; }" file)
(write-line "}}" file)
(close file)
sfile
);c.defun
;;------------------------ MAIN -----------------------------------------
;;Comprobaciones
;; Titulo del cuadro de dialogo
(cond
((and (= (type Title) 'STR)
(/= (setq Title (vl-string-trim " " Title)) ""))
)
(T (setq Title "Autocad Input Box."))
);c.cond
;; Comentario
(cond
((not TxtMens))
((and (= (type TxtMens) 'STR)
(/= (setq TxtMens (vl-string-trim " " TxtMens)) ""))
(setq LTxtMens (parseComment TxtMens *MaxLenLineDlg*))
(setq maxLenStr (apply
(function max)
(mapcar (function GetDclWidth) LTxtMens)))
(setq maxLenStr (+ maxLenStr 0.5))
)
(t (setq TxtMens nil))
);c.cond
;;-------------- GO ---------------------------
(setq FichDlg (Wrt_dialog))
(setq dcl_ID (load_dialog FichDlg))
(cond
((not (new_dialog "inputbox" dcl_ID "" p_dia)))
(T
(cond
(TxtMens
(setq i 0)
(mapcar (function (lambda (s)
(set_tile (strcat "txtm" (itoa (setq i (1+ i)))) s)
)) LTxtMens)
)
)
(set_tile "sn" Title)
(if (and TxtDef (= (type TxtDef) 'STR)) (set_tile "input" TxtDef))
(action_tile "input" "(setq RetVal $value)")
;;________________________
(setq accion (start_dialog))
(unload_dialog dcl_ID)
(cond
((= accion 0)(setq RetVal nil))
((= accion 1)
(if (not (and RetVal (/= RetVal "")))
(setq RetVal nil)
);c.if
)
);c.cond
)
)
RetVal
);c.defun

;;----------------------------- DclMensExt --------------------------------------------
;;programa para mostrar informacion en cuadro de dialogo con opciףn de casilla de
;;verificaciףn de "No volver a mostrar este mensaje"
;;Argumentos:
;; tit.- Titulo del cuadro de dialogo, si es nil se mostrara !! Autocad Mensaje !!
;; txt.- Texto Descriptivo de lo que se pide se le pueden dar retornos de carro: "\n"
;; ButtonType .- Tipos de botones
;; OpcToggle .- Visualiza el toogle de "No volver a mostrar este mensaje" si se ha
;;
;;;Constant ButtonType Description
;;;
;;;OKOnly 0 Display OK button only.
;;;OKCancel 1 Display OK and Cancel buttons.
;;;AbortRetryIgnore 2 Display Abort, Retry, and Ignore buttons.
;;;YesNoCancel 4 Display Yes, No, and Cancel buttons.
;;;YesNo 8 Display Yes and No buttons.
;;;RetryCancel 16 Display Retry and Cancel buttons.
;;;DefaultButton1 0 First button is default.
;;;DefaultButton2 256 Second button is default.
;;;DefaultButton3 512 Third button is default.
;;;
;;;Return Values
;;;Constant Value Description
;;;OK 1 OK
;;;Cancel 2 Cancel
;;;Abort 3 Abort
;;;Retry 4 Retry
;;;Ignore 5 Ignore
;;;Yes 6 Yes
;;;No 7 No
;;;
;;;
;;;Ejemplo:
;;; (setq TxtMens (strcat "Lorem ipsum dolor sit amet, consectetur adipiscing elit. "
;;; "Morbi sed dictum quam."
;;; "\nMorbi nisi augue, aliquam a ultricies sit amet, "
;;; "eleifend in metus.))
;;; (DclMensExt "Titulo cuadro" TxtMens (+ 4 512) t)
;;-------------------------------------------------------------------------------------
(defun DclMensExt (Title TxtMens ButtonType OpcToggle
/
accion RetVal FichDlg Id_Dlg ValToggle ToggleMsg LTxtMens maxLenStr i
;|functions|; Wrt_dialog
)
;;_______________________________________________________
;;Funciףn de creaciףn del cuadro de dialogo
(defun Wrt_dialog ( / NameDlg dir sfile j file)
(setq NameDlg "$DclMensage$.dcl")
(setq dir (getvar "TEMPPREFIX"))
(setq sfile (strcat dir NameDlg))
(setq file (open sfile "w"))
(write-line "dclmensage : dialog {" file)
;;(write-line " label = \"Autocad Mensaje\";" file)
(write-line " key = \"sn\";" file)
(write-line " spacer;" file)
(write-line " : column {" file)
(write-line " spacer;" file)
(cond
(TxtMens
(setq i 0)
(write-line ": paragraph {" file)
(foreach j LTxtMens
(write-line ": text_part {" file)
(write-line (strcat "key = \"txmsg" (itoa (setq i (1+ i))) "\";") file)
(write-line (strcat "width = " (rtos maxLenStr 2 3) ";") file)
;;(write-line (strcat " label = \"" j "\";") file)
(write-line "}" file)
);c.foreach
(write-line "}" file)
(write-line ":spacer { height = 0.1; }" file)
)
)
(write-line "}" file)
(write-line ": spacer {height = 0.5;}" file)
(if OpcToggle
(write-line (strcat ": toggle {label = \"" ToggleMsg "\"; key = \"opcmsg\";}") file)
);c.if
(write-line " : spacer {height = 0.1;}" file)
(write-line " : row {" file)
(write-line " fixed_width = true;" file)
(write-line " alignment = centered;" file)
(cond
;;OKCancel
((= 1 (logand 1 ButtonType))
(write-line (strcat ": button {label = \"&Aceptar\"; key = \"accept\";"
" is_default = " (if (zerop (logand 256 ButtonType)) "true" "false") ";"
" width = 12; fixed_width = true;}") file)
(write-line ":spacer { width = 1; }" file)
(write-line (strcat ":button { label = \"&Cancelar\"; key = \"cancel\"; is_cancel = true;"
" is_default = " (if (zerop (logand 256 ButtonType)) "false" "true") ";"
" width = 12; fixed_width = true;}") file)
)
;;VbAbortRetryIgnore
((= 2 (logand 2 ButtonType))
(write-line (strcat ": button {label = \"&Abortar\"; key = \"abort\";"
" is_default = " (if (and (zerop (logand 256 ButtonType))
(zerop (logand 512 ButtonType))) "true" "false") ";"
" width = 12; fixed_width = true;}") file)
(write-line ":spacer { width = 1; }" file)
(write-line (strcat ":button { label = \"&Reintentar\"; key = \"retry\";"
" is_default = " (if (zerop (logand 256 ButtonType)) "false" "true") ";"
" width = 12; fixed_width = true;}") file)
(write-line ":spacer { width = 1; }" file)
(write-line (strcat ":button { label = \"&Ignorar\"; key = \"ignore\";"
" is_default = " (if (zerop (logand 512 ButtonType)) "false" "true") ";"
" width = 12; fixed_width = true;}") file)
)
;;YesNoCancel
((= 4 (logand 4 ButtonType))
(write-line (strcat ": button {label = \"&Si\"; key = \"yes\";"
" is_default = " (if (and (zerop (logand 256 ButtonType))
(zerop (logand 512 ButtonType))) "true" "false") ";"
" width = 12; fixed_width = true;}") file)
(write-line ":spacer { width = 1; }" file)
(write-line (strcat ":button { label = \"&No\"; key = \"no\";"
" is_default = " (if (zerop (logand 256 ButtonType)) "false" "true") ";"
" width = 12; fixed_width = true;}") file)
(write-line ":spacer { width = 4; }" file)
(write-line (strcat ":button { label = \"&Cancelar\"; key = \"cancel\"; is_cancel = true;"
" is_default = " (if (zerop (logand 512 ButtonType)) "false" "true") ";"
" width = 12; fixed_width = true;}") file)
)
;;YesNo
((= 8 (logand 8 ButtonType))
(write-line (strcat ": button {label = \"&Si\"; key = \"yes\";"
" is_default = " (if (zerop (logand 256 ButtonType)) "true" "false") ";"
" width = 12; fixed_width = true;}") file)
(write-line ":spacer { width = 1; }" file)
(write-line (strcat ":button { label = \"&No\"; key = \"no\";"
" is_default = " (if (zerop (logand 256 ButtonType)) "false" "true") ";"
" width = 12; fixed_width = true;}") file)
)
;;RetryCancel
((= 16 (logand 16 ButtonType))
(write-line (strcat ": button {label = \"&Reintentar\"; key = \"retry\";"
" is_default = " (if (zerop (logand 256 ButtonType)) "true" "false") ";"
" width = 12; fixed_width = true;}") file)
(write-line ":spacer { width = 1; }" file)
(write-line (strcat ":button { label = \"&Cancelar\"; key = \"cancel\"; is_cancel = true;"
" is_default = " (if (zerop (logand 256 ButtonType)) "false" "true") ";"
" width = 12; fixed_width = true;}") file)
)
(T ;;OKOnly
(write-line ": button {label = \"&Aceptar\"; key = \"accept\"; is_default = true; is_cancel = true; width = 10; fixed_width = true;}" file)
)
)
(write-line " }" file)
(write-line " }" file)
(Close file)
sfile
);c.defun

;--------------------------------- Main ---------------------------------------------------------------
;;Comprobaciones
;; Titulo del cuadro de dialogo:
(cond
((and (= (type Title) 'STR)
(/= (setq Title (vl-string-trim " " Title)) ""))
)
(T (setq Title "AutoCAD Mensaje."))
);c.cond
;;Tipo de boton:
(cond
((= (type ButtonType) 'INT))
(T (setq ButtonType 0))
);c.cond
;; Comentario / Mensaje
(cond
((not TxtMens))
((and (= (type TxtMens) 'STR)
(/= (setq TxtMens (vl-string-trim " " TxtMens)) ""))
(setq LTxtMens (parseComment TxtMens *MaxLenLineDlg*))
(setq maxLenStr (apply
(function max)
(mapcar (function GetDclWidth) LTxtMens)))
(setq maxLenStr (+ maxLenStr 0.5))
)
(t (setq TxtMens nil))
);c.cond
;; opcion Toogle de "No volver a mostrar este mensaje."
(if OpcToggle
(setq ValToggle 0
ToggleMsg "No volver a mostrar este mensaje.")
)
;;----------------------------- GO ---------------------------
(setq FichDlg (Wrt_dialog))
(setq Id_Dlg (load_dialog FichDlg))
(cond
((not (new_dialog "dclmensage" Id_Dlg "" p_dia_DclMx)))
(T
(set_tile "sn" Title)
(cond
(TxtMens
(setq i 0)
(mapcar (function (lambda (s)
(set_tile (strcat "txmsg" (itoa (setq i (1+ i)))) s)
)) LTxtMens)
)
)
;;Acciones
(action_tile "opcmsg" "(setq ValToggle (read $value))")
;;Butons:
(action_tile "accept" "(setq RetVal 1 p_dia_DclMx (done_dialog 1))")
(action_tile "cancel" "(setq RetVal 0 p_dia_DclMx (done_dialog 1))")
(action_tile "abort" "(setq RetVal 3 p_dia_DclMx (done_dialog 1))")
(action_tile "retry" "(setq RetVal 4 p_dia_DclMx (done_dialog 1))")
(action_tile "ignore" "(setq RetVal 5 p_dia_DclMx (done_dialog 1))")
(action_tile "yes" "(setq RetVal 6 p_dia_DclMx (done_dialog 1))")
(action_tile "no" "(setq RetVal 7 p_dia_DclMx (done_dialog 1))")
(setq accion (start_dialog))
(unload_dialog Id_Dlg)
(cond
((= accion 1)
(list RetVal ValToggle)
)
);c.cond
)
);c.cond
);c.defun

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; DD_RADIO_PICK ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Function: seleccion desde lista de opciones
;; Argumentos:
;;;Title ;; (string o nil) Dialog box Titulo
;;;LabelLBox ;; (string o nil) Texto superior de la ventana contenedora de opciones.
;;;TxtMens ;; (string o nil) Texto descriptivo (puede incluir "\n")
;;;ListItems ;; (list) Listado para seleccionar opciones
;;;Default ;; (string o nil) Elemento seleccionado por defecto en la lista al inicio
;;
;;Ejemplo:
;;; (setq TxtMens (strcat "Lorem ipsum dolor sit amet, consectetur adipiscing elit. "
;;; "Morbi sed dictum quam. \nMorbi nisi augue, aliquam a ultricies sit amet, "
;;; "eleifend in metus."))
;;; (DD_RADIO_PICK "Titulito" "Texto ventana de opciones:" TxtMens
;;; (list "pepe" "juan" "antonio" "manolo") nil)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun DD_RADIO_PICK (Title LabelLBox TxtMens ListItems Default
/
maxLenStr LTxtMens i j NameDlg Tmp FichDlg RetVal accion ItemLst dcl_ID
;|functions|; Wrt_dialog
)

;;_______________________________________________________
;;Funciףn de creaciףn del cuadro de dialogo
(defun Wrt_dialog ( / NameDlg dir sfile file j)
(setq NameDlg "$DD_RADIO_PICK$.dcl")
(setq dir (getvar "TEMPPREFIX"))
(setq sfile (strcat dir NameDlg))
(setq file (open sfile "w"))
(write-line "Dclradiopick : dialog {" file)
(write-line (STRCAT " label=\"" Title "\";") file)
(cond
(TxtMens
(setq i 0)
(write-line ": paragraph {" file)
(foreach j LTxtMens
(write-line ": text_part {" file)
(write-line (strcat "key = \"txtm" (itoa (setq i (1+ i))) "\";") file)
(write-line (strcat "width = " (rtos maxLenStr 2 3) ";") file)
;;(write-line (strcat " label = \"" j "\";") file)
(write-line "}" file)
);c.foreach
(write-line "}" file)
(write-line ":spacer { height = 0.1; }" file)
)
)
;;Texto de la ventana contenedora de opciones:
(cond
(LabelLBox
(write-line " : text {" file)
(write-line " vertical_margin = none;" file)
(write-line " key=\"labelbox\";" file)
(write-line (strcat "width = " (rtos maxLenStr 2 3) ";") file)
(write-line "}" file)
)
)
(write-line " : boxed_radio_column {" file)
(write-line " vertical_margin = none;" file)
(write-line " children_fixed_height=true;" file)
(write-line " key=\"temp0\";" file)
;;listado de opciones:
(foreach ItemLst ListItems
(write-line " : radio_button {" file)
(write-line " vertical_margin = none;" file)
(write-line (strcat " key = \"" ItemLst "\";") file)
(write-line (strcat " label=\"" ItemLst "\";") file)
(write-line " }" file)
);c.foreach
(write-line ":spacer { height = 0.1; }" file)
(write-line " }" file)
(write-line ":spacer { height = 0.1; }" file)
(write-line ": row {" file)
(write-line ":spacer { width = 1; }" file)
(write-line "ok_cancel;" file)
(write-line ":spacer { width = 1; }" file)
(write-line "}" file)
(write-line ":spacer { height = 0.1; }" file)
(write-line "}" file)
(setq file (close file))
sfile
)
;;---------------------------- MAIN -------------------------------------
;;Comprobaciones
;; Title del cuadro de dialogo
(cond
((and (= (type Title) 'STR)
(/= (setq Title (vl-string-trim " " Title)) ""))
)
(T (setq Title "Lista de opciones."))
);c.cond
;;Texto de cabecera encima de la lista de opciones:
(cond
((not LabelLBox))
((and (= (type LabelLBox) 'STR)
(/= (setq LabelLBox (vl-string-trim " " LabelLBox)) ""))
(setq Tmp (Str2Lst_WithBlank LabelLBox *MaxLenLineDlg*))
(if (> (length Tmp) 1)
(setq LabelLBox (strcat (car Tmp) "..."))
)
(setq maxLenStr (GetDclWidth LabelLBox))
(setq maxLenStr (+ maxLenStr 0.5))
)
(T (setq LabelLBox nil))
);c.cond
;; TxtMens
(cond
((not TxtMens))
((and (= (type TxtMens) 'STR)
(/= (setq TxtMens (vl-string-trim " " TxtMens)) ""))
(setq LTxtMens (parseComment TxtMens *MaxLenLineDlg*))
(setq Tmp (apply
(function max)
(mapcar (function GetDclWidth) LTxtMens)))
(if (> (setq Tmp (+ Tmp 0.5)) maxLenStr)
(setq maxLenStr Tmp)
)
)
(t (setq TxtMens nil))
);c.cond
;;Default :
(cond
((not Default) (setq Default (car ListItems)))
((and (= (type Default) 'STR)
(vl-position (setq Default (vl-string-trim " " Default)) ListItems))
)
(T (setq Default (car ListItems)))
)
;;-------------- GO ---------------------------
(setq FichDlg (Wrt_dialog))
(setq dcl_ID (load_dialog FichDlg))
(cond ((not (new_dialog "Dclradiopick" dcl_ID))
(prompt "\nDialog box loading error!")
(exit)
)
)
(cond
(TxtMens
(setq i 0)
(mapcar (function (lambda (s)
(set_tile (strcat "txtm" (itoa (setq i (1+ i)))) s)
)) LTxtMens)
)
)
(if LabelLBox (set_tile "labelbox" LabelLBox))
(set_tile "temp0" Default)
;;acciones
(action_tile "accept" "(setq RetVal (get_tile \"temp0\"))(done_dialog 1)")
;;initiate the dialog
(setq accion (start_dialog))
(unload_dialog dcl_ID)
(cond
((= accion 1)) ;;Accept
((= accion 0) ;;Cancel
(setq RetVal nil)
)
);c.cond
RetVal
);c.defun

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; DD_ChkOpts_PICK ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Function: seleccion desde lista de opciones toogle
;; Argumentos:
;;;Title ;; (string o nil) Dialog box Titulo
;;;LabelLBox ;; (string o nil) Texto superior de la ventana contenedora de opciones.
;;;TxtMens ;; (string o nil) Texto descriptivo (puede incluir "\n")
;;;ListItems ;; (list of pair) Listado para seleccionar opciones
;;
;;Ejemplo:
;;; (setq TxtMens (strcat "Lorem ipsum dolor sit amet, consectetur adipiscing elit. "
;;; "Morbi sed dictum quam. \nMorbi nisi augue, aliquam a ultricies sit amet, "
;;; "eleifend in metus."))
;;; (DD_ChkOpts_PICK "Titulito" "Texto ventana de opciones:" TxtMens
;;; (list '("pepe" . 1) '("juan" . 1) '("antonio" . 0) '("manolo" . 1)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun DD_ChkOpts_PICK (Title LabelLBox TxtMens ListItems
/
maxLenStr LTxtMens i j NameDlg Tmp FichDlg RetVal
accion ItemLst dcl_ID itemsKeysDlg
;|functions|; Wrt_dialog OK_Dialog do_btn_sel
)
;;_______________________________________________________
;;Accion de botones de seleccionar todo o nada
(defun do_btn_sel (iVal)
(mapcar (function (lambda (key)
(set_tile key (itoa iVal))
)) itemsKeysDlg)
)
;;_______________________________________________________
;;Accion de aceptar
(defun OK_Dialog ()
(setq RetVal
(mapcar (function (lambda (pair key)
(cons (car pair)
(atoi (get_tile key)))
)) ListItems itemsKeysDlg)
)
(done_dialog 1)
)
;;_______________________________________________________
;;Funciףn de creaciףn del cuadro de dialogo
(defun Wrt_dialog ( / NameDlg dir sfile file j)
(setq NameDlg "$DD_CHKOPTS_PICK$.dcl")
(setq dir (getvar "TEMPPREFIX"))
(setq sfile (strcat dir NameDlg))
(setq file (open sfile "w"))
(write-line "chkopts_pick : dialog {" file)
(write-line (STRCAT " label=\"" Title "\";") file)
(cond
(TxtMens
(setq i 0)
(write-line ": paragraph {" file)
(foreach j LTxtMens
(write-line ": text_part {" file)
(write-line (strcat "key = \"txtm" (itoa (setq i (1+ i))) "\";") file)
(write-line (strcat "width = " (rtos maxLenStr 2 3) ";") file)
;;(write-line (strcat " label = \"" j "\";") file)
(write-line "}" file)
);c.foreach
(write-line "}" file)
(write-line ":spacer { height = 0.1; }" file)
)
)
;;Texto de la ventana contenedora de opciones:
(cond
(LabelLBox
(write-line " : text {" file)
(write-line " vertical_margin = none;" file)
(write-line " key=\"labelbox\";" file)
(write-line (strcat "width = " (rtos maxLenStr 2 3) ";") file)
(write-line "}" file)
)
)
(write-line " : boxed_column {" file)
(write-line " vertical_margin = none;" file)
(write-line " children_fixed_height=true;" file)
(write-line " key=\"temp0\";" file)
;;(list '("pepe" . 1) '("juan" . 1) '("antonio" . 0) '("manolo" . 1))
(setq i 0)
(setq itemsKeysDlg
(mapcar (function (lambda (pair / key)
(setq key (strcat (itoa i) "_TmpKey"))
(write-line " : toggle {" file)
(write-line (strcat " key = \"" key "\";") file)
(write-line (strcat " label=\"" (car Pair) "\";") file)
(write-line (strcat " value=\"" (itoa (cdr Pair)) "\";") file)
(write-line " }" file)
(setq i (1+ i))
key
)) ListItems);c.mapcar
);c.setq
(write-line ":spacer { height = 0.1; }" file)
(write-line " }" file)

(write-line ": row {fixed_width = true;" file)
(write-line ": button {" file)
(write-line " label = \"Seleccionar todo\";" file)
(write-line " key = \"ssAll\";" file)
(write-line " width = 12; fixed_width = true;}" file)

(write-line ": button {" file)
(write-line " label = \"Deseleccionar\";" file)
(write-line " key = \"ssNone\";" file)
(write-line " width = 12; fixed_width = true;}" file)
(write-line "}" file)

(write-line ":spacer { height = 0.1; }" file)
(write-line ": row {" file)
(write-line ":spacer { width = 1; }" file)
(write-line "ok_cancel;" file)
(write-line ":spacer { width = 1; }" file)
(write-line "}" file)
(write-line ":spacer { height = 0.1; }" file)
(write-line "}" file)
(setq file (close file))
sfile
)
;;---------------------------- MAIN -------------------------------------
;;Comprobaciones
;; Title del cuadro de dialogo
(cond
((and (= (type Title) 'STR)
(/= (setq Title (vl-string-trim " " Title)) ""))
)
(T (setq Title "Lista de opciones."))
);c.cond
;;Texto de cabecera encima de la lista de opciones:
(cond
((not LabelLBox))
((and (= (type LabelLBox) 'STR)
(/= (setq LabelLBox (vl-string-trim " " LabelLBox)) ""))
(setq Tmp (Str2Lst_WithBlank LabelLBox *MaxLenLineDlg*))
(if (> (length Tmp) 1)
(setq LabelLBox (strcat (car Tmp) "..."))
)
(setq maxLenStr (GetDclWidth LabelLBox))
(setq maxLenStr (+ maxLenStr 0.5))
)
(T (setq LabelLBox nil))
);c.cond
;; TxtMens
(cond
((not TxtMens))
((and (= (type TxtMens) 'STR)
(/= (setq TxtMens (vl-string-trim " " TxtMens)) ""))
(setq LTxtMens (parseComment TxtMens *MaxLenLineDlg*))
(setq Tmp (apply
(function max)
(mapcar (function GetDclWidth) LTxtMens)))
(if (> (setq Tmp (+ Tmp 0.5)) maxLenStr)
(setq maxLenStr Tmp)
)
)
(t (setq TxtMens nil))
);c.cond

;;-------------- GO ---------------------------
(setq FichDlg (Wrt_dialog))
(setq dcl_ID (load_dialog FichDlg))
(cond ((not (new_dialog "chkopts_pick" dcl_ID))
(prompt "\nDialog box loading error!")
(exit)
)
)
(cond
(TxtMens
(setq i 0)
(mapcar (function (lambda (s)
(set_tile (strcat "txtm" (itoa (setq i (1+ i)))) s)
)) LTxtMens)
)
)
(if LabelLBox (set_tile "labelbox" LabelLBox))
;;acciones
(action_tile "ssNone" "(do_btn_sel 0)")
(action_tile "ssAll" "(do_btn_sel 1)")
(action_tile "accept" "(OK_Dialog)")
;;initiate the dialog
(setq accion (start_dialog))
(unload_dialog dcl_ID)
(cond
((= accion 1)) ;;Accept
((= accion 0) ;;Cancel
(setq RetVal nil)
)
);c.cond
RetVal
);c.defun

;;---------------------------------------- DD_SELECT --------------------------------------------------
;; Josי Luis Garcםa G. 05/2005
;; Argumentos:
;; Title ;; (string) Titulo del cuadro de dialogo o NIL
;; LabelLBox ;; (string) Texto de cabecera del list box o NIL
;; TxtMens ;; (string) Texto descriptivo, puede incluir "\n" o NIL
;; sList ;; (list) Lista de cadenas del list_box o NIL
;; MultiSel ;; (boolean) T = Multiple seleccion select, nil = Selecciףn simple.
;; Default ;; (string) Elemento por defecto seleccionado al inicio o NIL
;;
;;Notas:
;; (1) Si MultiSel es T y Default = "*" -> Todo seleccionado al inicio.
;; (2) Se recomienda no aסadir mas de 256 items a la lista en modo Multiselecciףn ya que DCL
;; tiene restricciones No implementadas por autodesk. (ver mensajes y comentarios en el codigo)
;;
;;Ejemplo:
;; (setq i 0 iList nil)(repeat 256 (setq iList (cons (strcat "Item_" (itoa (setq i (1+ i)))) iList)))
;; (setq iList (reverse iList))
;; (setq TxtMens (strcat "Lorem ipsum dolor sit amet, consectetur adipiscing elit. "
;; "Morbi sed dictum quam. \nMorbi nisi augue, aliquam a ultricies sit amet, "))
;; (DD_SELECT "Titulo dlg.." "pepe\tjuan" iList TxtMens T "Item_408")
;;-----------------------------------------------------------------------------------------------------
(defun DD_SELECT (Title LabelLBox TxtMens sList MultiSel Default
/
FichDlg accion Selection_List LComent j Tmp RetVal sel_all NameDlg Item
;|functions|; SetValAll List_Item_Select Wrt_dialog
)
;;--------------------------- Funciones auxiliares -----------------------------------------
;;_____________________________________________________________________
;;Escritura el cuadro de dialogo en un fichero del directorio temporal
(defun Wrt_dialog ( / NameDlg dir sfile j file )
(setq NameDlg "$DD_Select$2.dcl")
(setq dir (getvar "TEMPPREFIX"))
(setq sfile (strcat dir NameDlg))
(setq file (open sfile "w"))

(write-line "ddselect : dialog {" file)
(write-line (strcat "label=\"" Title "\";") file)
(write-line "width=35;fixed_width= true;" file)
(cond
(TxtMens
(setq i 0)
(write-line ": paragraph {" file)
(foreach j LTxtMens
(write-line ": text_part {" file)
(write-line (strcat "key = \"txtm" (itoa (setq i (1+ i))) "\";") file)
(write-line (strcat "width = " (rtos maxLenStr 2 3) ";") file)
;;(write-line (strcat " label = \"" j "\";") file)
(write-line "}" file)
);c.foreach
(write-line "}" file)
(write-line ":spacer { height = 0.1; }" file)
)
)
;;Texto de la ventana contenedora de opciones:
(cond
(LabelLBox
(write-line " : text {" file)
(write-line " vertical_margin = none;" file)
(write-line " key=\"labelbox\";" file)
(write-line (strcat "width = " (rtos maxLenStr 2 3) ";") file)
;;(write-line (strcat " label=\"" (vl-string-trim " " LabelLBox) "\";" ) file)
(write-line "}" file)
)
)
(write-line (strcat ":list_box {") file)
(write-line (strcat "key=\"listBox\";" ) file)
(write-line "height=15; " file)
(write-line "fixed_height= true; " file)
;;(write-line "fixed_width_font = true; " file)
(if MultiSel
(progn
(princ "multiple_select=true;}" file)
(write-line ":toggle {label = \"&Seleccionar todo\"; key = \"sel_all\";}" file)
);c.prg
(write-line "allow_accept=true; multiple_select=false;}" file)
);c.if
(write-line "spacer;" file)
(write-line "ok_cancel_err;" file)
(write-line "}" file)
(setq file (close file))
sfile
);c.defun
;;______________________________________________________________________________
(defun List_Item_Select (Key Value / Item)
(set_tile "error" "")
(cond
(MultiSel
(set_tile "sel_all" "0")
(setq sel_all "0")
)
)
;;Si se seleccionan mas de 256 items en la lista get-tile genera un error:
;;Value = "0 1 2 3 4 5 6 7 8 9 ..... 251 252 253 254 255 256"
;;(Error No implementado por autodesk)
(if (not (setq Item (get_tile Key))) ;campo de list_box demasiado largo
(progn
(setq Item Value)
(set_tile "error" "No se pueden seleccionar mas de 256 elementos.")
(set_tile "listBox" "")
(set_tile "listBox" Item)
)
);c.if
(cond
(MultiSel
(set_tile "sel_all" "0")
(setq sel_all "0")
)
)
(setq Selection_List (read (strcat "(" Item ")" )))
);c.defun
;;______________________________________________________________________________
(defun SetValAll ( / LNum Err)
(set_tile "error" "")
(setq LNum "")
(cond
((= sel_all "1")
(mapcar (function (lambda (x)
;;IMPORTANTISIMO: 2010 Maxima Longitud de campo para un "list_box" (no implementado por autodesk)
(if ( (length Tmp) 1)
(setq LabelLBox (strcat (car Tmp) "..."))
)
(setq maxLenStr (GetDclWidth LabelLBox))
(setq maxLenStr (+ maxLenStr 0.5))
)
(T (setq LabelLBox nil))
);c.cond
;; TxtMens
(cond
((not TxtMens))
((and (= (type TxtMens) 'STR)
(/= (setq TxtMens (vl-string-trim " " TxtMens)) ""))
(setq LTxtMens (parseComment TxtMens *MaxLenLineDlg*))
(setq Tmp (apply
(function max)
(mapcar (function GetDclWidth) LTxtMens)))
(if (> (setq Tmp (+ Tmp 0.5)) maxLenStr)
(setq maxLenStr Tmp)
)
)
(t (setq TxtMens nil))
);c.cond
;;Default :
(cond
((not Default) (setq Default (car sList)))
((= (type Default) 'STR)
(setq Default (vl-string-trim " " Default))
(cond
((= Default "*"))
((vl-position Default sList))
(T (setq Default (car sList)))
)
)
(T (setq Default (car sList)))
)
;;-------------- GO DCL ---------------------------
(setq FichDlg (Wrt_dialog))
(setq dcl_ID (load_dialog FichDlg))
(cond
((not (new_dialog "ddselect" dcl_ID "" p_dia)))
(T
(cond
(TxtMens
(setq i 0)
(mapcar (function (lambda (s)
(set_tile (strcat "txtm" (itoa (setq i (1+ i)))) s)
)) LTxtMens)
)
)
(if LabelLBox (set_tile "labelbox" LabelLBox))
(start_list "listBox")
(mapcar 'add_list sList)
(end_list)
(if Default
(cond
((and MultiSel (= Default "*"))
(setq sel_all "1")
(set_tile "sel_all" sel_all)
(SetValAll)
)
((setq Item (vl-position Default sList))
(set_tile "listBox" (itoa Item))
(setq Selection_List (list Item))
)
);c.cond
);c.if

(action_tile "listBox" "(List_Item_Select $key $value)")
(action_tile "sel_all" "(setq sel_all $value)(SetValAll)")

(setq accion (start_dialog))
(unload_dialog dcl_ID)
(if (and (= accion 1) Selection_List)
(if (= sel_all "1")
(setq RetVal sList)
(if sList
(setq RetVal (mapcar '(lambda (X) (nth X sList)) Selection_List))
)
);c.if
);c.if
);c.prg
);c.if
RetVal
);c.defun

;;; __ __ __ __ ;;;
;;; |_ | |_ / |__| /\ (_ ;;;
;;; | |__|__\__| |/--\__) ;;;
;;; ;;;

;;------------------------------ GetListFlechasTipo -----------------------------;;
;; listado de tipos de terminaciones de lםnea (flechas) para cotas, directrices ;;
;; y directices multiples para usar con los cuadros de dialogo ;;
;;-------------------------------------------------------------------------------;;
(defun GetListFlechasTipo ()
(list
(cons 1 '("Cerrado y Relleno" "."))
(cons 2 '("Cerrado" "_CLOSED"))
(cons 3 '("Punto" "_DOT"))
(cons 4 '("Cerrado en Blanco" "_CLOSEDBLANK"))
(cons 5 '("Oblicuo" "_OBLIQUE"))
(cons 6 '("Oblicuo grueso" "_ARCHTICK"))
(cons 7 '("Abierto" "_OPEN"))
(cons 8 '("Indicaciףn origen" "_ORIGIN"))
(cons 9 '("Angulo recto" "_OPEN90"))
(cons 10 '("Abrir a 30 Grados" "_OPEN30"))
(cons 11 '("Punto en Blanco" "_DOTBLANK"))
(cons 12 '("Punto pequeסo" "_DOTSMALL"))
(cons 13 '("Cuadrado Relleno" "_BOXFILLED"))
(cons 14 '("Cuadrado" "_BOXBLANK"))
(cons 15 '("Triangulo Referencia relleno" "_DATUMFILLED"))
(cons 16 '("Triangulo Referencia" "_DATUMBLANK"))
(cons 17 '("Integral" "_INTEGRAL"))
)
)
;;______________________________________________________________________________________
;; Vectores de imagen para tipos de terminaciones de cota y directrices creados con el
;; programa GetVectors (directorio DCL de programaciףn)
;; Rectangulo 80x46 (ver dibujo "Dibujo 25-11-07.dwg" en el mismo directorio)
;;______________________________________________________________________________________
;;Imagen de flecha FL_1 ("Cerrado y Relleno" ".")
(defun vectors_FL_1 ()
(mapcar 'vector_image; Color 7
(list 33 27 21 15 9 8 14 20 26 32 5 36 5 36)
(list 18 19 20 21 22 23 24 25 26 27 23 18 23 23)
(list 36 36 36 36 36 36 36 36 36 36 36 36 36 75)
(list 18 19 20 21 22 23 24 25 26 27 18 28 28 23)
(list 7 7 7 7 7 7 7 7 7 7 7 7 7 7)
);mapcar
)
;;Imagen de flecha FL_2 ("Cerrado" "_CLOSED")
(defun vectors_FL_2 ()
(mapcar 'vector_image; Color 7
(list 5 5 36 36 5 36 36)
(list 23 23 18 18 23 23 23)
(list 36 36 36 36 36 36 75)
(list 28 18 28 18 23 23 23)
(list 7 7 7 7 7 7 7)
);mapcar
)
;;Imagen de flecha FL_3 ("Punto" "_DOT")
(defun vectors_FL_3 ()
(mapcar 'vector_image; Color 7
(list 31 18 14 11 10 9 8 7 7 7 6 6 6 5 5 6 6 6 6 7 7 8 9 10 11 13 17 29 24 18 12 7 5 5 7 12 18 24 29 43)
(list 23 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 17 12 10 12 17 23 23 29 34 36 34 29 23)
(list 43 18 22 25 26 27 28 29 29 29 30 30 30 30 31 30 30 30 29 29 29 28 27 26 25 23 19 31 29 24 18 12 7 7 12 18 24 29 31 75)
(list 23 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 23 17 12 10 12 17 29 34 36 34 29 23 23)
(list 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7)
);mapcar
)
;;Imagen de flecha FL_4 ("Cerrado en Blanco" "_CLOSEDBLANK")
(defun vectors_FL_4 ()
(mapcar 'vector_image; Color 7
(list 5 5 36 36 36)
(list 23 23 18 18 23)
(list 36 36 36 36 75)
(list 28 18 28 18 23)
(list 7 7 7 7 7)
);mapcar
)
;;Imagen de flecha FL_5 ("Oblicuo" "_OBLIQUE")
(defun vectors_FL_5 ()
(mapcar 'vector_image; Color 7
(list 18 5)
(list 23 36)
(list 75 31)
(list 23 10)
(list 7 7)
);mapcar
)
;;Imagen de flecha FL_6 ("Oblicuo grueso" "_ARCHTICK")
(defun vectors_FL_6 ()
(mapcar 'vector_image; Color 7
(list 20 5 6 7 30 5 5 8)
(list 23 34 35 36 9 34 34 37)
(list 75 12 31 32 33 30 8 33)
(list 23 28 10 11 12 9 37 12)
(list 7 7 7 7 7 7 7 7)
);mapcar
)
;;Imagen de flecha FL_7 ("Abierto" "_OPEN")
(defun vectors_FL_7 ()
(mapcar 'vector_image; Color 7
(list 5 5 5)
(list 23 23 23)
(list 75 36 36)
(list 23 28 18)
(list 7 7 7)
);mapcar
)
;;Imagen de flecha FL_8 ("Indicaciףn origen" "_ORIGIN")
(defun vectors_FL_8 ()
(mapcar 'vector_image; Color 7
(list 18 29 24 18 12 7 5 5 7 12 18 24 29)
(list 23 17 12 10 12 17 23 23 29 34 36 34 29)
(list 75 31 29 24 18 12 7 7 12 18 24 29 31)
(list 23 23 17 12 10 12 17 29 34 36 34 29 23)
(list 7 7 7 7 7 7 7 7 7 7 7 7 7)
);mapcar
)
;;Imagen de flecha FL_9 ("Angulo recto" "_OPEN90")
(defun vectors_FL_9 ()
(mapcar 'vector_image; Color 7
(list 5 5 5)
(list 23 23 23)
(list 75 21 21)
(list 23 38 8)
(list 7 7 7)
);mapcar
)
;;Imagen de flecha FL_10 ("Abrir a 30 Grados" "_OPEN30")
(defun vectors_FL_10 ()
(mapcar 'vector_image; Color 7
(list 5 5 5)
(list 23 23 23)
(list 75 36 36)
(list 23 31 15)
(list 7 7 7)
);mapcar
)
;;Imagen de flecha FL_11 ("Punto en Blanco" "_DOTBLANK")
(defun vectors_FL_11 ()
(mapcar 'vector_image; Color 7
(list 31 29 24 18 12 7 5 5 7 12 18 24 29 31)
(list 23 17 12 10 12 17 23 23 29 34 36 34 29 23)
(list 75 31 29 24 18 12 7 7 12 18 24 29 31 31)
(list 23 23 17 12 10 12 17 29 34 36 34 29 23 23)
(list 7 7 7 7 7 7 7 7 7 7 7 7 7 7)
);mapcar
)
;;Imagen de flecha FL_12 ("Punto pequeסo" "_DOTSMALL")
(defun vectors_FL_12 ()
(mapcar 'vector_image; Color 7
(list 13 12 9 6 5 5 6 9 12 7 6 6 5 6 6 7)
(list 23 20 19 20 23 23 26 27 26 20 21 22 23 24 25 26)
(list 75 13 12 9 6 6 9 12 13 11 12 12 13 12 12 11)
(list 23 23 20 19 20 26 27 26 23 20 21 22 23 24 25 26)
(list 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7)
);mapcar
)
;;Imagen de flecha FL_13 ("Cuadrado Relleno" "_BOXFILLED")
(defun vectors_FL_13 ()
(mapcar 'vector_image; Color 7
(list 31 43 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 31 5 5 5 5 5 43)
(list 23 23 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 10 10 36 36 10 10 23)
(list 43 43 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 5 5 31 31 5 75)
(list 23 23 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 36 36 36 10 10 23)
(list 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7)
);mapcar
)
;;Imagen de flecha FL_14 ("Cuadrado" "_BOXBLANK")
(defun vectors_FL_14 ()
(mapcar 'vector_image; Color 7
(list 31 31 31 5 5 5 31 5 5)
(list 23 10 10 10 36 36 36 10 10)
(list 75 31 31 5 5 31 31 31 5)
(list 23 36 10 36 36 36 36 10 10)
(list 7 7 7 7 7 7 7 7 7)
);mapcar
)
;;Imagen de flecha FL_15 ("Triangulo Referencia relleno" "_DATUMFILLED")
(defun vectors_FL_15 ()
(mapcar 'vector_image; Color 7
(list 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 36)
(list 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 5 41 5 23)
(list 7 8 10 12 14 15 17 19 20 22 24 26 27 29 31 33 34 36 35 33 31 30 28 26 24 23 21 19 18 16 14 12 11 9 7 5 36 36 5 75)
(list 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 23 23 41 23)
(list 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7)
);mapcar
)
;;Imagen de flecha FL_16 ("Triangulo Referencia" "_DATUMBLANK")
(defun vectors_FL_16 ()
(mapcar 'vector_image; Color 7
(list 36 5 5 5)
(list 23 41 5 5)
(list 75 36 5 36)
(list 23 23 41 23)
(list 7 7 7 7)
);mapcar
)
;;Imagen de flecha FL_17 ("Integral" "_INTEGRAL")
(defun vectors_FL_17 ()
(mapcar 'vector_image; Color 7
(list 15 5 11 18)
(list 23 32 29 17)
(list 75 11 18 24)
(list 23 29 17 14)
(list 7 7 7 7)
);mapcar
)

;;; __ __ __ __ __ __ ;;;
;;; /\ / |_ |__)/ /\ | \|_ ;;;
;;; /--\\__|__| \ \__/--\ |__/|__ ;;;
;;; ;;;
(defun Acerca_de ( / AcercaDe DCL_IDX FIL FP LIN X Y LST
;|functions|; MakeDCL_Acerca_de do_img_logo logo logoHispacad
logoPano LogoText LogoTextR AcercaDeJose
)

;;-------------------------------------------------------------------------------
;; LogoText# - image Text
;; Text: "Designed and Created by Jose L. Garcia Galan"
;;-------------------------------------------------------------------------------
(defun LogoText ( / key X# Y#)
(setq key "LogoText")
(start_image key)
(setq X# (dimx_tile key))
(setq Y# (dimy_tile key))
(fill_image 1 0 X# Y# -15)
(mapcar (function (lambda (l)(apply 'vector_image l)))
(list '(25 7 25 15 253) '(25 15 28 15 253) '(25 7 28 7 253) '(30 9 30 13 253) '(29 14 29 14 253) '(29 8 29 8 253) '(33 12 37 12 253) '(33 11 33 14 253) '(34 15 36 15 253) '(34 10 36 10 253) '(37 14 37 14 253)
'(37 11 37 11 253) '(39 11 42 14 253) '(39 14 39 14 253) '(40 15 41 15 253) '(40 10 41 10 253) '(42 11 42 11 253) '(44 15 44 10 253) '(44 7 44 7 253) '(47 10 50 10 253) '(47 15 50 15 253)
'(46 11 46 14 253) '(49 17 46 17 253) '(50 10 50 16 253) '(52 15 52 10 253) '(53 11 53 11 253) '(54 10 55 10 253) '(56 11 56 15 253) '(58 12 62 12 253) '(58 11 58 14 253) '(59 15 61 15 253)
'(59 10 61 10 253) '(62 14 62 14 253) '(62 11 62 11 253) '(65 10 68 10 253) '(65 15 68 15 253) '(64 11 64 14 253) '(68 15 68 7 253) '(74 12 77 12 253) '(77 15 74 15 253) '(73 14 73 13 253)
'(76 10 74 10 253) '(77 15 77 11 253) '(79 15 79 10 253) '(80 11 80 11 253) '(81 10 82 10 253) '(83 11 83 15 253) '(86 10 89 10 253) '(86 15 89 15 253) '(85 11 85 14 253) '(89 15 89 7 253)
'(95 15 98 15 253) '(95 7 98 7 253) '(94 8 94 14 253) '(99 14 99 14 253) '(99 8 99 8 253) '(101 15 101 10 253) '(102 10 102 10 253) '(104 12 108 12 253) '(104 11 104 14 253) '(105 15 107 15 253)
'(105 10 107 10 253) '(108 14 108 14 253) '(108 11 108 11 253) '(111 12 114 12 253) '(114 15 111 15 253) '(110 14 110 13 253) '(113 10 111 10 253) '(114 15 114 11 253) '(116 7 116 14 253)
'(117 15 117 15 253) '(117 10 117 10 253) '(119 12 123 12 253) '(119 11 119 14 253) '(120 15 122 15 253) '(120 10 122 10 253) '(123 14 123 14 253) '(123 11 123 11 253) '(126 10 129 10 253)
'(126 15 129 15 253) '(125 11 125 14 253) '(129 15 129 7 253) '(134 7 134 15 253) '(134 15 137 15 253) '(134 10 137 10 253) '(138 11 138 14 253) '(143 10 143 13 253) '(140 10 140 13 253)
'(140 17 139 17 253) '(141 14 141 16 253) '(142 14 142 14 253) '(150 14 150 7 253) '(148 15 149 15 253) '(147 13 147 14 253) '(153 11 153 14 253) '(154 15 156 15 253) '(154 10 156 10 253)
'(157 14 157 11 253) '(159 11 162 14 253) '(159 14 159 14 253) '(160 15 161 15 253) '(160 10 161 10 253) '(162 11 162 11 253) '(164 12 168 12 253) '(164 11 164 14 253) '(165 15 167 15 253)
'(165 10 167 10 253) '(168 14 168 14 253) '(168 11 168 11 253) '(173 15 177 15 253) '(173 7 173 15 253) '(179 15 179 15 253) '(188 11 190 11 253) '(186 7 189 7 253) '(185 8 185 14 253) '(188 15 186 15 253)
'(190 11 190 15 253) '(189 14 189 14 253) '(190 8 190 8 253) '(194 12 197 12 253) '(197 15 194 15 253) '(193 14 193 13 253) '(196 10 194 10 253) '(197 15 197 11 253) '(199 15 199 10 253)
'(200 10 200 10 253) '(202 11 202 14 253) '(203 15 205 15 253) '(203 10 205 10 253) '(206 14 206 14 253) '(206 11 206 11 253) '(208 15 208 10 253) '(208 7 208 7 253) '(211 12 214 12 253)
'(214 15 211 15 253) '(210 14 210 13 253) '(213 10 211 10 253) '(214 15 214 11 253) '(222 11 224 11 253) '(220 7 223 7 253) '(219 8 219 14 253) '(222 15 220 15 253) '(224 11 224 15 253) '(223 14 223 14 253)
'(224 8 224 8 253) '(228 12 231 12 253) '(231 15 228 15 253) '(227 14 227 13 253) '(230 10 228 10 253) '(231 15 231 11 253) '(233 7 233 15 253) '(236 12 239 12 253) '(239 15 236 15 253) '(235 14 235 13 253)
'(238 10 236 10 253) '(239 15 239 11 253) '(241 15 241 10 253) '(242 11 242 11 253) '(243 10 244 10 253) '(245 11 245 15 253)
)
)
(mapcar (function (lambda (l)(apply 'vector_image l)))
(list '(24 7 24 15 253) '(24 15 27 15 253) '(24 7 27 7 253) '(29 9 29 13 253) '(28 14 28 14 253) '(28 8 28 8 253) '(32 12 36 12 253) '(32 11 32 14 253) '(33 15 35 15 253) '(33 10 35 10 253) '(36 14 36 14 253)
'(36 11 36 11 253) '(38 11 41 14 253) '(38 14 38 14 253) '(39 15 40 15 253) '(39 10 40 10 253) '(41 11 41 11 253) '(43 15 43 10 253) '(43 7 43 7 253) '(46 10 49 10 253) '(46 15 49 15 253)
'(45 11 45 14 253) '(48 17 45 17 253) '(49 10 49 16 253) '(51 15 51 10 253) '(52 11 52 11 253) '(53 10 54 10 253) '(55 11 55 15 253) '(57 12 61 12 253) '(57 11 57 14 253) '(58 15 60 15 253)
'(58 10 60 10 253) '(61 14 61 14 253) '(61 11 61 11 253) '(64 10 67 10 253) '(64 15 67 15 253) '(63 11 63 14 253) '(67 15 67 7 253) '(73 12 76 12 253) '(76 15 73 15 253) '(72 14 72 13 253)
'(75 10 73 10 253) '(76 15 76 11 253) '(78 15 78 10 253) '(79 11 79 11 253) '(80 10 81 10 253) '(82 11 82 15 253) '(85 10 88 10 253) '(85 15 88 15 253) '(84 11 84 14 253) '(88 15 88 7 253)
'(94 15 97 15 253) '(94 7 97 7 253) '(93 8 93 14 253) '(98 14 98 14 253) '(98 8 98 8 253) '(100 15 100 10 253) '(101 10 101 10 253) '(103 12 107 12 253) '(103 11 103 14 253) '(104 15 106 15 253)
'(104 10 106 10 253) '(107 14 107 14 253) '(107 11 107 11 253) '(110 12 113 12 253) '(113 15 110 15 253) '(109 14 109 13 253) '(112 10 110 10 253) '(113 15 113 11 253) '(115 7 115 14 253)
'(116 15 116 15 253) '(116 10 116 10 253) '(118 12 122 12 253) '(118 11 118 14 253) '(119 15 121 15 253) '(119 10 121 10 253) '(122 14 122 14 253) '(122 11 122 11 253) '(125 10 128 10 253)
'(125 15 128 15 253) '(124 11 124 14 253) '(128 15 128 7 253) '(133 7 133 15 253) '(133 15 136 15 253) '(133 10 136 10 253) '(137 11 137 14 253) '(142 10 142 13 253) '(139 10 139 13 253)
'(139 17 138 17 253) '(140 14 140 16 253) '(141 14 141 14 253) '(149 14 149 7 253) '(147 15 148 15 253) '(146 13 146 14 253) '(152 11 152 14 253) '(153 15 155 15 253) '(153 10 155 10 253)
'(156 14 156 11 253) '(158 11 161 14 253) '(158 14 158 14 253) '(159 15 160 15 253) '(159 10 160 10 253) '(161 11 161 11 253) '(163 12 167 12 253) '(163 11 163 14 253) '(164 15 166 15 253)
'(164 10 166 10 253) '(167 14 167 14 253) '(167 11 167 11 253) '(172 15 176 15 253) '(172 7 172 15 253) '(178 15 178 15 253) '(187 11 189 11 253) '(185 7 188 7 253) '(184 8 184 14 253) '(187 15 185 15 253)
'(189 11 189 15 253) '(188 14 188 14 253) '(189 8 189 8 253) '(193 12 196 12 253) '(196 15 193 15 253) '(192 14 192 13 253) '(195 10 193 10 253) '(196 15 196 11 253) '(198 15 198 10 253)
'(199 10 199 10 253) '(201 11 201 14 253) '(202 15 204 15 253) '(202 10 204 10 253) '(205 14 205 14 253) '(205 11 205 11 253) '(207 15 207 10 253) '(207 7 207 7 253) '(210 12 213 12 253)
'(213 15 210 15 253) '(209 14 209 13 253) '(212 10 210 10 253) '(213 15 213 11 253) '(221 11 223 11 253) '(219 7 222 7 253) '(218 8 218 14 253) '(221 15 219 15 253) '(223 11 223 15 253) '(222 14 222 14 253)
'(223 8 223 8 253) '(227 12 230 12 253) '(230 15 227 15 253) '(226 14 226 13 253) '(229 10 227 10 253) '(230 15 230 11 253) '(232 7 232 15 253) '(235 12 238 12 253) '(238 15 235 15 253) '(234 14 234 13 253)
'(237 10 235 10 253) '(238 15 238 11 253) '(240 15 240 10 253) '(241 11 241 11 253) '(242 10 243 10 253) '(244 11 244 15 253)
)
)
(mapcar (function (lambda (l)(apply 'vector_image l)))
(list '(24 6 24 14 253) '(24 14 27 14 253) '(24 6 27 6 253) '(29 8 29 12 253) '(28 13 28 13 253) '(28 7 28 7 253) '(32 11 36 11 253) '(32 10 32 13 253) '(33 14 35 14 253) '(33 9 35 9 253) '(36 13 36 13 253)
'(36 10 36 10 253) '(38 10 41 13 253) '(38 13 38 13 253) '(39 14 40 14 253) '(39 9 40 9 253) '(41 10 41 10 253) '(43 14 43 9 253) '(43 6 43 6 253) '(46 9 49 9 253) '(46 14 49 14 253) '(45 10 45 13 253)
'(48 16 45 16 253) '(49 9 49 15 253) '(51 14 51 9 253) '(52 10 52 10 253) '(53 9 54 9 253) '(55 10 55 14 253) '(57 11 61 11 253) '(57 10 57 13 253) '(58 14 60 14 253) '(58 9 60 9 253) '(61 13 61 13 253)
'(61 10 61 10 253) '(64 9 67 9 253) '(64 14 67 14 253) '(63 10 63 13 253) '(67 14 67 6 253) '(73 11 76 11 253) '(76 14 73 14 253) '(72 13 72 12 253) '(75 9 73 9 253) '(76 14 76 10 253) '(78 14 78 9 253)
'(79 10 79 10 253) '(80 9 81 9 253) '(82 10 82 14 253) '(85 9 88 9 253) '(85 14 88 14 253) '(84 10 84 13 253) '(88 14 88 6 253) '(94 14 97 14 253) '(94 6 97 6 253) '(93 7 93 13 253) '(98 13 98 13 253)
'(98 7 98 7 253) '(100 14 100 9 253) '(101 9 101 9 253) '(103 11 107 11 253) '(103 10 103 13 253) '(104 14 106 14 253) '(104 9 106 9 253) '(107 13 107 13 253) '(107 10 107 10 253) '(110 11 113 11 253)
'(113 14 110 14 253) '(109 13 109 12 253) '(112 9 110 9 253) '(113 14 113 10 253) '(115 6 115 13 253) '(116 14 116 14 253) '(116 9 116 9 253) '(118 11 122 11 253) '(118 10 118 13 253) '(119 14 121 14 253)
'(119 9 121 9 253) '(122 13 122 13 253) '(122 10 122 10 253) '(125 9 128 9 253) '(125 14 128 14 253) '(124 10 124 13 253) '(128 14 128 6 253) '(133 6 133 14 253) '(133 14 136 14 253) '(133 9 136 9 253)
'(137 10 137 13 253) '(142 9 142 12 253) '(139 9 139 12 253) '(139 16 138 16 253) '(140 13 140 15 253) '(141 13 141 13 253) '(149 13 149 6 253) '(147 14 148 14 253) '(146 12 146 13 253) '(152 10 152 13 253)
'(153 14 155 14 253) '(153 9 155 9 253) '(156 13 156 10 253) '(158 10 161 13 253) '(158 13 158 13 253) '(159 14 160 14 253) '(159 9 160 9 253) '(161 10 161 10 253) '(163 11 167 11 253) '(163 10 163 13 253)
'(164 14 166 14 253) '(164 9 166 9 253) '(167 13 167 13 253) '(167 10 167 10 253) '(172 14 176 14 253) '(172 6 172 14 253) '(178 14 178 14 253) '(187 10 189 10 253) '(185 6 188 6 253) '(184 7 184 13 253)
'(187 14 185 14 253) '(189 10 189 14 253) '(188 13 188 13 253) '(189 7 189 7 253) '(193 11 196 11 253) '(196 14 193 14 253) '(192 13 192 12 253) '(195 9 193 9 253) '(196 14 196 10 253) '(198 14 198 9 253)
'(199 9 199 9 253) '(201 10 201 13 253) '(202 14 204 14 253) '(202 9 204 9 253) '(205 13 205 13 253) '(205 10 205 10 253) '(207 14 207 9 253) '(207 6 207 6 253) '(210 11 213 11 253) '(213 14 210 14 253)
'(209 13 209 12 253) '(212 9 210 9 253) '(213 14 213 10 253) '(221 10 223 10 253) '(219 6 222 6 253) '(218 7 218 13 253) '(221 14 219 14 253) '(223 10 223 14 253) '(222 13 222 13 253) '(223 7 223 7 253)
'(227 11 230 11 253) '(230 14 227 14 253) '(226 13 226 12 253) '(229 9 227 9 253) '(230 14 230 10 253) '(232 6 232 14 253) '(235 11 238 11 253) '(238 14 235 14 253) '(234 13 234 12 253) '(237 9 235 9 253)
'(238 14 238 10 253) '(240 14 240 9 253) '(241 10 241 10 253) '(242 9 243 9 253) '(244 10 244 14 253)
)
)
(mapcar (function (lambda (l)(apply 'vector_image l)))
(list
'(25 6 25 14 164) '(25 14 28 14 164) '(25 6 28 6 164) '(30 8 30 12 164) '(29 13 29 13 164) '(29 7 29 7 164) '(33 11 37 11 164) '(33 10 33 13 164) '(34 14 36 14 164) '(34 9 36 9 164) '(37 13 37 13 164)
'(37 10 37 10 164) '(39 10 42 13 164) '(39 13 39 13 164) '(40 14 41 14 164) '(40 9 41 9 164) '(42 10 42 10 164) '(44 14 44 9 164) '(44 6 44 6 164) '(47 9 50 9 164) '(47 14 50 14 164) '(46 10 46 13 164)
'(49 16 46 16 164) '(50 9 50 15 164) '(52 14 52 9 164) '(53 10 53 10 164) '(54 9 55 9 164) '(56 10 56 14 164) '(58 11 62 11 164) '(58 10 58 13 164) '(59 14 61 14 164) '(59 9 61 9 164) '(62 13 62 13 164)
'(62 10 62 10 164) '(65 9 68 9 164) '(65 14 68 14 164) '(64 10 64 13 164) '(68 14 68 6 164) '(74 11 77 11 164) '(77 14 74 14 164) '(73 13 73 12 164) '(76 9 74 9 164) '(77 14 77 10 164) '(79 14 79 9 164)
'(80 10 80 10 164) '(81 9 82 9 164) '(83 10 83 14 164) '(86 9 89 9 164) '(86 14 89 14 164) '(85 10 85 13 164) '(89 14 89 6 164) '(95 14 98 14 164) '(95 6 98 6 164) '(94 7 94 13 164) '(99 13 99 13 164)
'(99 7 99 7 164) '(101 14 101 9 164) '(102 9 102 9 164) '(104 11 108 11 164) '(104 10 104 13 164) '(105 14 107 14 164) '(105 9 107 9 164) '(108 13 108 13 164) '(108 10 108 10 164) '(111 11 114 11 164)
'(114 14 111 14 164) '(110 13 110 12 164) '(113 9 111 9 164) '(114 14 114 10 164) '(116 6 116 13 164) '(117 14 117 14 164) '(117 9 117 9 164) '(119 11 123 11 164) '(119 10 119 13 164) '(120 14 122 14 164)
'(120 9 122 9 164) '(123 13 123 13 164) '(123 10 123 10 164) '(126 9 129 9 164) '(126 14 129 14 164) '(125 10 125 13 164) '(129 14 129 6 164) '(134 6 134 14 164) '(134 14 137 14 164) '(134 9 137 9 164)
'(138 10 138 13 164) '(143 9 143 12 164) '(140 9 140 12 164) '(140 16 139 16 164) '(141 13 141 15 164) '(142 13 142 13 164) '(150 13 150 6 164) '(148 14 149 14 164) '(147 12 147 13 164) '(153 10 153 13 164)
'(154 14 156 14 164) '(154 9 156 9 164) '(157 13 157 10 164) '(159 10 162 13 164) '(159 13 159 13 164) '(160 14 161 14 164) '(160 9 161 9 164) '(162 10 162 10 164) '(164 11 168 11 164) '(164 10 164 13 164)
'(165 14 167 14 164) '(165 9 167 9 164) '(168 13 168 13 164) '(168 10 168 10 164) '(173 14 177 14 164) '(173 6 173 14 164) '(179 14 179 14 164) '(188 10 190 10 164) '(186 6 189 6 164) '(185 7 185 13 164)
'(188 14 186 14 164) '(190 10 190 14 164) '(189 13 189 13 164) '(190 7 190 7 164) '(194 11 197 11 164) '(197 14 194 14 164) '(193 13 193 12 164) '(196 9 194 9 164) '(197 14 197 10 164) '(199 14 199 9 164)
'(200 9 200 9 164) '(202 10 202 13 164) '(203 14 205 14 164) '(203 9 205 9 164) '(206 13 206 13 164) '(206 10 206 10 164) '(208 14 208 9 164) '(208 6 208 6 164) '(211 11 214 11 164) '(214 14 211 14 164)
'(210 13 210 12 164) '(213 9 211 9 164) '(214 14 214 10 164) '(222 10 224 10 164) '(220 6 223 6 164) '(219 7 219 13 164) '(222 14 220 14 164) '(224 10 224 14 164) '(223 13 223 13 164) '(224 7 224 7 164)
'(228 11 231 11 164) '(231 14 228 14 164) '(227 13 227 12 164) '(230 9 228 9 164) '(231 14 231 10 164) '(233 6 233 14 164) '(236 11 239 11 164) '(239 14 236 14 164) '(235 13 235 12 164) '(238 9 236 9 164)
'(239 14 239 10 164) '(241 14 241 9 164) '(242 10 242 10 164) '(243 9 244 9 164) '(245 10 245 14 164)
)
)
(end_image)
);defun Logo

(defun do_img_logo ( Num / long alto ImgKey)
(setq ImgKey
(cond
((= Num 0) "imgInfo")
((= Num 1) "imgInfo2")
((= Num 2) "LogoMarmita")
((= Num 3) "LogoPano")

)
)
(start_image ImgKey)
(setq long (dimx_tile ImgKey)
alto (dimy_tile ImgKey))
(fill_image 0 0 long alto -15)
(cond
((= Num 0) (logo))
((= Num 1) (logoHispacad))
((= Num 2) (logoMarmita))
((= Num 3) (LogoPano))
)
(end_image)
)
(defun LogoPano ()
(mapcar 'vector_image; Color 251
(list 41 42 43 43 44 45 46 47 48 48 48 49 49 49 50 50 50 50 51 51 51 51 52 52 52 52 53 53 53 53 54 54 54 55 55 55 56 56 56 57 57 57 57 58 58 58 59 59 59 60 60 60 61 61 62 62 62 63 63 63 63
64 64 64 64 64 65 65 65 65 65 66 66 66 66 66 66 66 67 67 67 67 67 67 67 68 68 68 68 68 68 68 68 68 68 68 69 69 69 69 69 69 69 69 69 69 69 69 69 70 70 70 70 70 70 70 70 70 70 70 70 70
70 70 70 71 71 71 71 71 71 71 71 71 71 71 71 71 72 72 72 72 72 72 72 72 72 72 72 72 73 73 73 73 73 73 73 73 73 74 74 74 74 74 74 74 74 75 75 75 75 75 75 75 75 75 75 76 76 76 76 76 76
76 76 76 76 76 76 76 76 76 77 77 77 77 77 77 77 77 78 78 78 78 78 78 78 78 78 79 79 79 79 79 79 79 79 79 80 80 80 80 80 80 80 80 80 81 81 81 81 81 81 81 81 82 82 82 82 82 82 82 82 82
83 83 83 83 83 83 83 83 83 83 83 84 84 84 84 84 84 84 84 84 84 84 85 85 85 85 85 85 85 85 85 85 86 86 86 86 86 86 86 86 86 86 86 86 87 87 87 87 87 87 87 87 87 87 87 88 88 88 88 88 88
88 88 88 88 88 89 89 89 89 89 89 89 89 89 89 89 89 90 90 90 90 90 90 90 90 90 91 91 91 91 91 91 91 91 91 92 92 92 92 92 92 92 92 92 93 93 93 93 93 93 93 93 93 93 93 93 94 94 94 94 94
94 94 94 94 94 94 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 96 96 96 96 96 96 96 96 96 96 96 96 96 97 97 97 97 97 97 97 97 97 97 97 97 97 97 98 98 98 98
98 98 98 98 98 98 98 98 98 98 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 101 101 101 101 101 101 101
101 101 101 101 101 101 101 101 101 101 102 102 102 102 102 102 102 102 102 102 102 102 102 102 102 102 103 103 103 103 103 103 103 103 103 103 103 103 103 103 103 103 104 104 104
104 104 104 104 104 104 104 104 104 104 104 104 105 105 105 105 105 105 105 105 105 105 105 105 105 105 105 105 105 105 105 106 106 106 106 106 106 106 106 106 106 106 106 106 106
106 106 106 106 106 106 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 108 108 108 108 108 108 108 108 108 108 108 108 108 108 108 108 108 108 109 109 109 109 109
109 109 109 109 109 109 109 109 109 109 109 109 109 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 111 111 111 111 111 111 111 111 111 111 111 111 111
111 111 111 112 112 112 112 112 112 112 112 112 112 112 112 112 112 112 112 112 112 112 113 113 113 113 113 113 113 113 113 113 113 113 113 113 113 113 113 114 114 114 114 114 114
114 114 114 114 114 114 114 114 114 114 114 114 114 114 114 114 114 114 114 114 114 114 114 114 114 114 114 114 114 114 114 115 115 115 115 115 115 115 115 115 115 115 115 115 115
115 115 115 115 115 115 115 115 115 115 115 116 116 116 116 116 116 116 116 116 116 116 116 116 116 116 116 116 116 116 116 116 116 116 117 117 117 117 117 117 117 117 117 117 117
117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 118 118 118 118 118 118 118 118 118 118 118 118 118 118 118 118 118 118 118 118 118 118 118 119 119 119 119 119 119
119 119 119 119 119 119 119 119 119 119 119 119 119 119 119 119 119 119 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 121 121
121 121 121 121 121 121 121 121 121 121 121 121 121 121 121 121 121 121 121 121 121 121 121 121 121 122 122 122 122 122 122 122 122 122 122 122 122 122 122 122 122 122 122 122 122
122 122 122 122 122 122 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 124 124 124 124 124 124 124 124 124 124 124 124 124
124 124 124 124 124 124 124 124 124 124 124 125 125 125 125 125 125 125 125 125 125 125 125 125 125 125 125 125 125 125 125 125 125 125 125 125 125 126 126 126 126 126 126 126 126
126 126 126 126 126 126 126 126 126 126 126 126 126 126 126 126 126 127 127 127 127 127 127 127 127 127 127 127 127 127 127 127 127 127 127 127 127 127 127 127 127 127 127 127 128
128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 129 129 129 129 129 129 129 129 129 129 129 129 129 129 129 129 129 129 129
129 129 129 129 129 129 129 129 129 129 130 130 130 130 130 130 130 130 130 130 130 130 130 130 130 130 130 130 130 130 130 130 130 130 131 131 131 131 131 131 131 131 131 131 131
131 131 131 131 131 131 131 131 131 131 131 131 131 131 131 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 133 133 133 133
133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133
133 134 134 134 134 134 134 134 134 134 134 134 134 134 134 134 134 134 134 134 134 135 135 135 135 135 135 135 135 135 135 135 135 135 135 135 135 135 135 135 135 135 136 136 136
136 136 136 136 136 136 136 136 136 136 136 136 136 136 136 136 137 137 137 137 137 137 137 137 137 137 137 137 137 137 137 137 137 137 137 138 138 138 138 138 138 138 138 138 138
138 138 138 138 138 138 138 138 138 138 139 139 139 139 139 139 139 139 139 139 139 139 139 139 139 139 139 139 139 139 139 139 139 140 140 140 140 140 140 140 140 140 140 140 140
140 140 140 140 140 140 140 140 140 140 141 141 141 141 141 141 141 141 141 141 141 141 141 141 141 141 141 141 141 141 141 142 142 142 142 142 142 142 142 142 142 142 142 142 142
142 142 142 142 143 143 143 143 143 143 143 143 143 143 143 143 143 143 143 143 143 143 144 144 144 144 144 144 144 144 144 144 144 144 144 144 144 144 145 145 145 145 145 145 145
145 145 145 145 145 145 146 146 146 146 146 146 146 146 146 146 146 146 147 147 147 147 147 147 147 147 147 147 147 147 147 148 148 148 148 148 148 148 148 148 148 148 148 148 148
148 149 149 149 149 149 149 149 149 149 149 149 149 149 149 149 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 151 151 151 151 151 151 151 151 151 151 151 151 151 151
151 152 152 152 152 152 152 152 152 152 152 152 152 152 152 152 152 152 152 152 152 152 152 152 152 152 152 152 153 153 153 153 153 153 153 153 153 153 153 153 153 153 153 154 154
154 154 154 154 154 154 154 154 154 154 154 155 155 155 155 155 155 155 155 155 155 155 155 155 156 156 156 156 156 156 156 156 156 157 157 157 157 157 157 157 157 157 158 158 158
158 158 158 158 158 158 159 159 159 159 159 159 159 159 160 160 160 160 160 160 160 160 160 161 161 161 161 161 162 162 162 162 162 162 163 163 163 163 164 164 164 164 165 165 165
165 166 166 166 166 167 167 167 167 168 168 168 168 169 169 169 170 170 170 171 171
)
(list 229 229 229 228 228 227 226 226 229 215 225 228 216 224 227 217 225 224 226 218 224 223 224 207 222 218 224 205 222 219 223 203 219 223 202 220 222 200 220 199 227 199 220 226 198
220 226 197 220 225 197 220 220 196 220 196 208 227 196 220 208 226 132 220 195 208 225 128 220 195 209 223 125 220 136 209 182 195 223 122 220 138 210 182 195 228 112 222 116 220
120 211 129 194 140 182 227 105 222 111 220 115 211 119 194 123 181 127 141 226 104 223 110 221 115 220 118 212 122 194 125 180 126 142 132 223 99 220 103 214 109 194 121 178 125 142
131 138 223 93 220 97 215 102 194 109 181 135 176 141 222 92 220 97 194 101 180 144 173 222 91 220 149 194 152 179 169 224 87 221 90 219 98 194 148 178 165 223 86 221 90 153 177 160
223 85 220 97 219 154 194 176 223 84 219 97 194 157 175 163 222 83 219 96 194 99 174 157 159 222 82 219 96 194 98 174 158 167 225 80 221 95 218 97 194 162 172 224 77 221 94 218 97
194 167 223 73 220 92 218 96 194 172 179 224 71 222 93 219 95 217 171 194 175 183 224 69 221 92 217 94 194 171 191 174 181 223 66 219 67 217 92 191 93 186 174 223 61 219 63 216 65
193 91 189 92 184 162 225 59 223 62 218 64 216 91 194 161 189 225 58 222 61 218 63 215 90 195 169 188 225 58 221 60 217 62 215 89 196 168 192 177 224 58 220 61 217 88 214 193 196 224
55 220 57 215 61 214 87 192 223 55 220 60 219 86 215 197 213 222 55 220 60 218 67 216 85 214 168 213 199 220 55 216 58 214 70 212 83 199 164 194 227 55 56 219 216 82 213 148 193 160
187 226 54 222 72 219 81 215 146 212 159 211 186 200 224 53 222 73 218 80 215 183 212 192 210 198 201 221 47 218 73 214 79 212 153 211 178 209 183 201 199 224 42 221 50 217 73 212 78
209 155 202 173 200 178 224 39 221 43 216 49 214 73 212 77 209 154 208 172 202 188 200 224 38 220 45 216 48 214 73 211 75 209 168 207 173 202 176 201 189 225 37 223 44 220 48 217 73
215 173 214 189 211 201 208 203 206 223 37 219 44 217 47 213 73 210 163 208 174 206 190 203 201 223 37 218 44 216 46 213 73 210 158 207 169 203 174 201 191 222 38 216 43 212 46 209
73 207 161 204 169 202 174 192 226 38 222 43 219 46 216 72 212 93 210 157 208 169 207 174 204 193 202 225 39 221 41 218 46 215 72 211 96 209 151 208 159 207 169 204 174 202 193 225
40 220 71 218 99 214 150 210 169 209 174 207 194 204 202 224 31 219 40 218 45 214 71 211 102 209 146 207 169 204 173 202 195 224 30 223 40 221 46 218 70 213 104 211 145 209 169 204
173 201 195 226 33 224 39 221 46 217 69 212 105 211 135 208 146 204 169 201 173 196 224 30 220 37 217 46 211 68 208 106 204 136 201 169 197 173 223 27 220 37 216 45 213 47 210 66 207
102 204 131 201 137 197 168 173 223 26 220 44 215 47 213 64 210 104 207 130 204 168 201 172 198 227 24 31 219 33 214 43 213 47 61 102 108 200 131 198 172 227 23 222 29 218 36 216 42
213 46 209 56 207 104 204 111 199 124 172 129 168 226 22 221 27 219 30 216 36 212 42 208 46 207 50 204 58 199 64 171 99 168 109 134 112 123 222 21 219 26 215 29 212 36 209 41 206 45
204 49 199 51 171 58 167 65 113 93 110 228 20 225 24 222 35 219 41 215 43 212 47 209 50 206 52 204 58 201 65 199 70 171 86 167 114 123 225 19 222 23 218 26 215 35 211 40 209 46 206
49 203 53 199 57 170 65 167 74 115 225 19 221 22 218 27 214 35 210 39 209 48 205 53 203 57 198 65 170 77 166 105 125 121 229 18 224 21 221 24 217 36 213 47 211 53 210 57 209 65 205
76 203 104 198 121 169 125 166 228 18 224 20 220 24 216 36 212 46 211 52 208 57 205 65 203 75 200 96 198 113 168 116 165 121 124 227 18 223 23 219 26 211 35 208 36 205 39 202 45 199
52 197 57 167 65 165 74 118 92 112 102 226 18 217 22 214 27 211 33 207 36 205 38 202 41 198 50 197 57 165 63 120 72 112 90 102 96 221 17 217 21 213 29 210 35 207 37 205 42 202 44 198
52 197 63 164 70 124 90 111 101 226 17 223 21 220 29 217 33 213 36 210 42 206 52 205 54 201 64 197 68 164 84 127 97 110 100 226 16 223 20 220 29 216 33 213 35 209 42 206 52 204 54
201 66 198 76 196 98 163 109 131 226 16 223 20 219 29 216 32 212 35 208 43 205 52 205 54 204 64 200 84 197 98 196 108 162 134 144 226 15 222 20 218 29 215 34 211 36 208 44 204 49 200
52 197 54 195 61 162 68 144 84 137 98 107 225 14 221 20 216 29 214 34 213 35 211 36 207 45 204 59 199 65 196 74 195 80 161 83 148 98 144 107 139 225 14 220 19 216 30 214 37 202 47
198 58 196 63 194 74 160 79 149 82 144 99 139 106 225 13 219 19 216 30 213 37 206 46 198 57 195 62 193 66 158 73 150 77 144 81 140 100 107 105 224 12 222 19 219 31 216 37 209 45 200
57 197 61 195 64 193 72 150 76 144 80 140 101 109 104 224 12 222 19 219 215 38 211 43 202 57 197 63 194 71 192 75 160 79 150 81 102 107 112 110 222 11 219 20 212 32 196 38 193 51 192
62 161 70 155 74 150 78 144 88 141 103 113 108 112 224 11 222 20 218 33 214 48 201 61 196 69 191 78 162 90 149 109 144 142 224 10 222 20 219 34 215 48 201 58 195 60 191 69 164 77 148
91 144 109 115 224 10 221 20 216 35 201 58 195 60 190 68 166 77 148 92 117 103 110 216 10 201 21 194 36 190 48 183 58 167 60 147 68 119 77 110 93 103 217 10 200 21 193 37 188 47 185
57 167 59 147 68 124 76 121 93 110 103 222 10 206 22 203 38 200 44 192 57 188 59 185 67 167 76 146 93 126 102 122 105 111 229 10 206 22 203 32 199 57 197 60 191 68 186 75 166 93 145
102 127 105 123 111 232 10 207 24 204 33 198 41 187 56 166 60 144 68 129 74 125 93 111 102 105 234 11 207 35 205 56 198 61 188 73 166 93 142 102 131 105 126 111 235 45 207 52 206 56
199 62 166 72 137 93 132 93 127 102 111 105 236 42 207 51 199 55 166 63 138 92 133 94 129 102 110 105 237 39 200 50 165 55 135 64 130 91 110 101 105 238 28 200 48 165 49 131 54 110
90 105 101 239 27 201 45 165 49 140 53 132 89 110 101 105 240 28 229 43 201 48 165 52 140 88 133 91 109 100 104 241 30 229 40 202 47 165 51 141 87 135 90 109 100 104 241 32 229 46
228 50 202 85 166 89 143 99 136 104 108 241 45 230 48 228 71 203 82 166 88 144 99 137 103 108 9 44 228 71 203 87 98 146 103 138 107 241 8 230 39 229 67 204 73 166 84 148 84 139 97
107 103 241 9 230 36 229 41 205 67 166 81 150 96 141 102 107 241 9 231 33 229 40 205 68 167 95 153 101 142 241 11 231 25 230 38 206 70 167 94 155 100 143 241 15 230 36 207 93 158 99
144 241 34 231 71 207 91 161 98 146 240 31 231 72 208 88 165 96 147 240 29 233 74 209 95 168 148 239 26 234 78 210 94 198 150 173 239 16 210 151 177 238 16 211 152 197 186 237 153
212 196 235 155 213 195 234 156 215 193 233 158 216 192 232 160 217 191 229 162 218 189 220 164 187 225 166 182 170 174
)
(list 41 42 43 43 44 45 46 47 48 48 48 49 49 49 50 50 50 50 51 51 51 51 52 52 52 52 53 53 53 53 54 54 54 55 55 55 56 56 56 57 57 57 57 58 58 58 59 59 59 60 60 60 61 61 62 62 62 63 63 63 63
64 64 64 64 64 65 65 65 65 65 66 66 66 66 66 66 66 67 67 67 67 67 67 67 68 68 68 68 68 68 68 68 68 68 68 69 69 69 69 69 69 69 69 69 69 69 69 69 70 70 70 70 70 70 70 70 70 70 70 70 70
70 70 70 71 71 71 71 71 71 71 71 71 71 71 71 71 72 72 72 72 72 72 72 72 72 72 72 72 73 73 73 73 73 73 73 73 73 74 74 74 74 74 74 74 74 75 75 75 75 75 75 75 75 75 75 76 76 76 76 76 76
76 76 76 76 76 76 76 76 76 77 77 77 77 77 77 77 77 78 78 78 78 78 78 78 78 78 79 79 79 79 79 79 79 79 79 80 80 80 80 80 80 80 80 80 81 81 81 81 81 81 81 81 82 82 82 82 82 82 82 82 82
83 83 83 83 83 83 83 83 83 83 83 84 84 84 84 84 84 84 84 84 84 84 85 85 85 85 85 85 85 85 85 85 86 86 86 86 86 86 86 86 86 86 86 86 87 87 87 87 87 87 87 87 87 87 87 88 88 88 88 88 88
88 88 88 88 88 89 89 89 89 89 89 89 89 89 89 89 89 90 90 90 90 90 90 90 90 90 91 91 91 91 91 91 91 91 91 92 92 92 92 92 92 92 92 92 93 93 93 93 93 93 93 93 93 93 93 93 94 94 94 94 94
94 94 94 94 94 94 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 96 96 96 96 96 96 96 96 96 96 96 96 96 97 97 97 97 97 97 97 97 97 97 97 97 97 97 98 98 98 98
98 98 98 98 98 98 98 98 98 98 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 101 101 101 101 101 101 101
101 101 101 101 101 101 101 101 101 101 102 102 102 102 102 102 102 102 102 102 102 102 102 102 102 102 103 103 103 103 103 103 103 103 103 103 103 103 103 103 103 103 104 104 104
104 104 104 104 104 104 104 104 104 104 104 104 105 105 105 105 105 105 105 105 105 105 105 105 105 105 105 105 105 105 105 106 106 106 106 106 106 106 106 106 106 106 106 106 106
106 106 106 106 106 106 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 107 108 108 108 108 108 108 108 108 108 108 108 108 108 108 108 108 108 108 109 109 109 109 109
109 109 109 109 109 109 109 109 109 109 109 109 109 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 111 111 111 111 111 111 111 111 111 111 111 111 111
111 111 111 112 112 112 112 112 112 112 112 112 112 112 112 112 112 112 112 112 112 112 113 113 113 113 113 113 113 113 113 113 113 113 113 113 113 113 113 114 114 114 114 114 114
114 114 114 114 114 114 114 114 114 114 114 114 114 114 114 114 114 114 114 114 114 114 114 114 114 114 114 114 114 114 114 115 115 115 115 115 115 115 115 115 115 115 115 115 115
115 115 115 115 115 115 115 115 115 115 115 116 116 116 116 116 116 116 116 116 116 116 116 116 116 116 116 116 116 116 116 116 116 116 117 117 117 117 117 117 117 117 117 117 117
117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 118 118 118 118 118 118 118 118 118 118 118 118 118 118 118 118 118 118 118 118 118 118 118 119 119 119 119 119 119
119 119 119 119 119 119 119 119 119 119 119 119 119 119 119 119 119 119 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 121 121
121 121 121 121 121 121 121 121 121 121 121 121 121 121 121 121 121 121 121 121 121 121 121 121 121 122 122 122 122 122 122 122 122 122 122 122 122 122 122 122 122 122 122 122 122
122 122 122 122 122 122 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 124 124 124 124 124 124 124 124 124 124 124 124 124
124 124 124 124 124 124 124 124 124 124 124 125 125 125 125 125 125 125 125 125 125 125 125 125 125 125 125 125 125 125 125 125 125 125 125 125 125 126 126 126 126 126 126 126 126
126 126 126 126 126 126 126 126 126 126 126 126 126 126 126 126 126 127 127 127 127 127 127 127 127 127 127 127 127 127 127 127 127 127 127 127 127 127 127 127 127 127 127 127 128
128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 129 129 129 129 129 129 129 129 129 129 129 129 129 129 129 129 129 129 129
129 129 129 129 129 129 129 129 129 129 130 130 130 130 130 130 130 130 130 130 130 130 130 130 130 130 130 130 130 130 130 130 130 130 131 131 131 131 131 131 131 131 131 131 131
131 131 131 131 131 131 131 131 131 131 131 131 131 131 131 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 133 133 133 133
133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133
133 134 134 134 134 134 134 134 134 134 134 134 134 134 134 134 134 134 134 134 134 135 135 135 135 135 135 135 135 135 135 135 135 135 135 135 135 135 135 135 135 135 136 136 136
136 136 136 136 136 136 136 136 136 136 136 136 136 136 136 136 137 137 137 137 137 137 137 137 137 137 137 137 137 137 137 137 137 137 137 138 138 138 138 138 138 138 138 138 138
138 138 138 138 138 138 138 138 138 138 139 139 139 139 139 139 139 139 139 139 139 139 139 139 139 139 139 139 139 139 139 139 139 140 140 140 140 140 140 140 140 140 140 140 140
140 140 140 140 140 140 140 140 140 140 141 141 141 141 141 141 141 141 141 141 141 141 141 141 141 141 141 141 141 141 141 142 142 142 142 142 142 142 142 142 142 142 142 142 142
142 142 142 142 143 143 143 143 143 143 143 143 143 143 143 143 143 143 143 143 143 143 144 144 144 144 144 144 144 144 144 144 144 144 144 144 144 144 145 145 145 145 145 145 145
145 145 145 145 145 145 146 146 146 146 146 146 146 146 146 146 146 146 147 147 147 147 147 147 147 147 147 147 147 147 147 148 148 148 148 148 148 148 148 148 148 148 148 148 148
148 149 149 149 149 149 149 149 149 149 149 149 149 149 149 149 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 151 151 151 151 151 151 151 151 151 151 151 151 151 151
151 152 152 152 152 152 152 152 152 152 152 152 152 152 152 152 152 152 152 152 152 152 152 152 152 152 152 152 153 153 153 153 153 153 153 153 153 153 153 153 153 153 153 154 154
154 154 154 154 154 154 154 154 154 154 154 155 155 155 155 155 155 155 155 155 155 155 155 155 156 156 156 156 156 156 156 156 156 157 157 157 157 157 157 157 157 157 158 158 158
158 158 158 158 158 158 159 159 159 159 159 159 159 159 160 160 160 160 160 160 160 160 160 161 161 161 161 161 162 162 162 162 162 162 163 163 163 163 164 164 164 164 165 165 165
165 166 166 166 166 167 167 167 167 168 168 168 168 169 169 169 170 170 170 171 171
)
(list 229 229 230 228 229 229 228 227 230 216 227 229 217 226 228 218 225 225 228 219 225 224 227 207 223 219 227 206 222 220 229 205 220 228 203 221 227 202 221 201 229 200 226 228 199
225 228 198 225 227 197 224 226 197 226 196 208 228 196 225 209 228 138 225 196 209 227 140 225 195 210 227 128 222 141 210 183 195 226 126 222 142 211 183 195 229 114 226 118 221
122 212 130 195 143 183 228 108 225 113 221 117 212 120 195 126 183 130 144 228 106 225 112 223 115 221 119 213 123 195 125 183 127 145 134 227 100 222 105 214 110 194 122 183 126
145 132 141 227 95 222 99 215 103 194 109 182 139 179 146 226 94 221 98 194 101 182 151 178 226 93 221 150 194 155 181 176 225 88 223 92 220 98 194 155 180 172 225 88 223 91 155 179
168 226 87 222 98 220 163 194 178 225 86 222 98 194 160 177 167 225 84 221 98 194 100 176 158 166 224 83 220 97 194 99 175 160 170 226 91 223 97 220 99 194 167 174 225 93 222 96 220
98 194 174 225 80 222 96 219 98 194 174 180 225 76 224 95 221 97 219 173 194 181 184 225 73 223 94 221 96 194 173 193 179 183 225 66 222 71 219 93 194 95 188 176 224 61 221 65 218 69
194 92 191 94 187 167 226 61 224 63 221 68 217 93 195 162 193 226 60 223 62 220 66 217 92 196 173 193 226 60 223 61 219 65 216 90 197 171 193 179 226 59 222 64 219 89 216 195 198 225
56 222 58 218 63 215 88 199 225 56 221 70 220 87 218 199 214 224 55 221 65 219 72 218 86 216 170 213 200 224 55 218 61 215 73 212 85 201 167 196 228 55 58 222 218 84 215 149 201 160
189 227 57 223 74 221 83 217 149 214 159 211 200 202 226 55 223 74 220 82 216 186 214 193 211 200 202 226 54 220 75 216 81 213 155 212 181 211 188 202 200 225 49 224 52 219 75 215 80
211 157 203 176 201 183 224 42 223 48 219 51 215 75 213 79 210 156 209 178 203 189 201 224 40 222 47 218 50 215 75 213 78 210 169 208 174 204 179 202 190 226 39 224 46 222 49 218 76
216 175 215 191 212 202 209 204 208 225 38 221 46 218 48 215 75 212 169 209 176 207 192 204 202 225 38 221 45 217 48 215 91 211 163 208 169 206 175 203 192 224 38 220 45 214 48 211
94 208 165 206 170 203 174 193 226 39 223 44 220 47 218 73 214 97 211 159 209 170 208 174 206 194 203 226 41 223 44 220 47 218 72 213 99 210 154 208 160 208 170 206 174 203 194 226
43 223 72 219 101 217 153 213 170 210 174 208 195 206 203 225 33 222 42 219 46 216 72 212 103 211 151 207 170 206 174 203 196 225 35 224 41 222 47 220 71 216 105 212 148 210 170 206
174 203 196 227 37 226 40 223 48 220 70 215 106 212 138 210 147 206 170 202 174 197 226 33 222 39 219 48 215 69 209 108 206 140 202 170 198 174 225 31 222 38 218 46 214 48 213 67 209
109 206 131 202 140 198 169 173 225 28 221 45 218 48 214 66 212 110 208 140 206 169 201 173 199 228 26 32 221 38 217 45 214 47 65 106 111 201 136 200 173 227 25 224 34 221 38 217 44
216 47 211 65 208 109 206 112 201 128 172 135 169 227 24 223 29 220 32 219 37 215 43 210 47 208 52 206 59 201 68 172 104 168 110 134 113 128 226 22 222 28 218 30 214 36 210 43 209 46
206 50 201 54 171 58 168 71 114 96 111 228 21 226 29 225 36 221 42 217 45 213 48 209 52 208 55 205 58 201 67 200 78 171 92 168 114 126 227 21 224 25 220 29 217 36 213 43 209 47 207
50 205 55 199 58 170 67 167 87 120 227 20 223 25 220 28 216 36 213 41 209 49 207 55 205 58 199 67 170 78 167 107 127 122 229 19 226 22 223 26 219 36 216 48 212 54 211 58 209 67 206
76 205 117 199 123 169 127 167 229 19 226 21 222 26 219 39 215 47 212 54 210 58 206 67 204 76 200 109 198 115 169 120 167 123 126 229 20 225 24 222 27 219 36 210 38 206 40 204 46 199
54 198 57 168 67 166 75 125 100 114 105 228 19 224 23 216 28 213 35 209 37 206 39 204 43 199 53 197 57 167 69 135 73 113 94 103 97 228 19 220 22 216 33 212 35 208 38 205 43 203 49
198 53 197 68 167 72 138 99 112 102 228 17 226 22 222 29 219 34 215 37 212 43 207 53 205 54 203 66 198 70 166 90 141 100 111 101 228 17 225 21 222 30 218 33 215 37 211 44 206 53 205
54 203 68 198 87 197 100 165 110 143 228 16 225 21 221 30 218 32 214 36 210 44 206 53 205 55 205 65 202 86 198 100 196 110 164 140 146 228 16 224 21 221 31 218 35 214 37 210 45 205
50 202 53 198 55 196 62 164 78 147 86 141 99 109 228 15 224 21 221 31 216 34 214 36 212 38 209 49 206 60 201 72 197 76 195 80 163 85 149 100 145 109 142 227 15 223 21 219 32 215 38
211 49 201 60 197 69 194 75 162 80 151 84 146 101 143 110 227 14 223 21 218 32 215 38 212 48 203 59 196 64 194 68 161 74 152 79 146 84 143 102 113 107 227 14 223 21 221 33 218 38 214
47 203 59 200 61 195 66 193 73 161 79 146 86 143 104 115 107 226 13 223 21 221 217 39 214 46 204 58 199 65 194 73 193 77 163 80 158 90 106 110 117 112 226 13 220 21 216 34 198 44 194
54 192 64 166 72 156 75 151 79 145 91 143 105 119 112 113 226 12 224 21 220 35 216 49 201 63 198 74 193 79 175 92 150 121 145 142 226 12 223 21 220 36 219 51 202 59 197 62 192 73 184
78 150 93 145 112 123 227 12 223 22 219 37 202 59 196 61 191 73 186 78 150 94 125 103 113 228 12 202 22 196 38 190 51 188 59 175 61 149 72 126 78 113 94 103 231 11 205 23 197 40 190
48 186 58 169 61 149 72 128 77 122 94 113 103 233 11 207 24 204 43 201 46 198 58 190 61 187 71 169 77 148 94 130 103 124 105 113 235 11 207 24 204 43 200 58 198 61 193 71 188 76 168
94 148 103 131 105 125 113 236 11 208 24 205 37 199 45 191 57 168 62 147 70 133 76 126 94 113 103 105 237 11 208 41 205 57 199 63 190 75 168 94 146 103 135 106 127 113 238 45 208 52
207 57 200 65 168 74 145 93 136 94 129 103 113 106 239 44 208 51 200 56 168 72 143 92 137 94 130 102 112 106 240 42 201 51 167 56 139 71 131 92 112 102 106 240 38 201 48 167 51 133
55 112 91 106 102 241 34 202 47 167 50 140 55 134 90 111 102 106 242 31 230 45 203 49 167 54 142 89 135 92 111 101 106 242 34 230 43 203 48 167 53 144 89 136 91 111 101 105 242 39
231 48 228 52 204 87 167 91 146 101 138 105 110 243 47 231 51 229 77 204 86 167 90 148 100 139 105 110 9 49 229 84 205 88 100 151 105 140 109 243 10 231 40 229 68 206 82 167 84 153
87 142 99 108 104 243 11 231 38 229 43 206 71 167 85 156 98 143 104 107 243 13 232 36 230 42 207 83 168 98 159 103 144 243 19 232 32 230 40 208 79 168 97 163 103 146 243 26 232 39
209 96 168 102 147 243 37 233 72 209 95 170 101 148 242 35 233 76 210 93 174 100 150 242 33 234 91 211 99 178 151 242 31 235 87 212 96 200 153 187 241 28 213 154 200 240 24 214 156
199 193 239 157 215 199 238 159 216 198 237 161 217 197 235 163 219 196 233 165 221 195 232 168 224 193 229 171 192 225 176 190 188 184
)
(list 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251
251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251
251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251
251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251
251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251
251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251
251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251
251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251
251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251
251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251
251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251
251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251
251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251
251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251
251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251
251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251
251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251
251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251
251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251
251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251
251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251
251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251
251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251
251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251
251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251
251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251
251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251
251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251
251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251
251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251
251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251
251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251
251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251
251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251
251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251
251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251
251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251
251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251
251 251 251 251 251
)
);mapcar
)
(defun logoMarmita ()
(mapcar 'vector_image; Color 250
(list 178 178 178 178 178 183 183 54 54 39 39 39 39 39 44 44 44 44 183 182 180 178 177 177 178 179 181 183 209 209 211 213 214 215 216 216 215 213 211 209 207 205 203 202 201 201 201 201 202
204 206 208 210 211 211 209 207 205 203 203 203 203 205 207 209 210 211 211 209 207 206 206 206 206 207 122 122 124 126 127 129 129 129 128 126 124 122 120 118 117 115 114 114 114 115
116 117 119 121 123 125 124 122 120 118 116 116 116 116 118 120 122 123 125 125 122 120 119 119 119 119 120 64 64 66 68 70 71 72 72 71 69 67 65 63 61 59 58 57 57 57 57 58 60 62 64 66 67
66 65 63 61 59 59 58 58 60 62 65 66 67 67 64 62 62 62 62 62 63 91 98 104 109 109 109 110 110 106 105 99 96 90 90 84 84 85 86 86 86 86 143 141 139 139 134 134 134 136 138 140 142 144 145
145 158 158 157 155 154 154 148 148 148 149 151 153 154 156 158 161 162 164 166 168 170 171 172 173 173 168 168 167 165 163 163 163 158 187 193 193 199 193 193 193 193 195 197 199 197
195 193 191 190 188 188 188 187
)
(list 239 239 221 221 221 221 221 234 239 239 239 215 215 215 215 215 234 234 216 218 219 218 216 216 214 213 213 214 220 220 220 221 222 224 225 227 238 239 239 239 239 239 238 237 235 233
231 231 229 228 228 228 228 227 225 225 225 225 225 223 221 221 221 220 235 235 232 231 231 232 232 232 233 234 235 220 220 220 221 222 224 225 227 238 239 239 239 239 239 238 237 235
233 233 231 229 228 228 228 228 227 225 225 225 225 225 223 221 221 221 220 235 235 232 231 231 232 232 232 233 234 235 220 220 220 221 222 224 225 227 238 239 239 239 239 239 238 237
235 233 231 231 229 228 228 228 228 227 225 225 225 225 225 223 221 221 221 220 235 235 232 231 231 232 232 232 233 234 235 215 229 215 215 217 219 220 222 239 223 236 236 223 223 239
239 222 218 216 215 215 225 225 225 225 239 222 222 221 221 221 220 221 223 223 229 227 225 225 225 225 239 223 223 221 221 221 220 220 221 222 221 221 220 221 221 222 224 226 228 239
227 225 225 225 225 227 239 216 216 221 221 225 225 232 234 235 235 234 239 239 239 239 238 236 234 232 216
)
(list 183 178 178 178 183 183 183 54 54 54 39 39 39 44 44 44 44 54 183 183 182 180 178 178 179 181 183 183 209 211 213 214 215 216 216 216 216 215 213 211 209 207 205 203 202 201 201 202 204
206 208 210 211 211 211 211 209 207 205 203 203 205 207 209 210 211 211 211 211 209 207 206 206 207 209 122 124 126 127 129 129 129 130 130 128 126 124 122 120 118 117 115 114 115 116
117 119 121 123 125 125 125 124 122 120 118 116 116 118 120 122 123 125 125 125 125 122 120 119 119 120 122 64 66 68 70 71 72 72 72 72 71 69 67 65 63 61 59 58 57 57 58 60 62 64 66 67 67
67 66 65 63 61 59 59 60 62 64 66 67 67 67 67 64 62 62 62 63 65 98 104 109 109 109 110 110 111 111 106 105 99 96 90 90 85 86 86 86 86 91 145 143 141 139 139 134 136 138 140 142 144 146
146 145 158 158 158 157 155 154 154 148 149 151 153 154 156 158 161 162 164 166 168 170 171 172 173 173 173 173 168 168 167 165 163 163 163 193 193 199 199 199 193 193 195 197 199 199
199 197 195 193 191 190 188 188 188
)
(list 239 239 239 221 221 221 239 239 239 239 239 239 215 215 215 234 234 234 217 217 218 219 218 214 213 213 214 216 220 220 221 222 224 225 227 238 238 238 239 239 239 239 239 238 237 235
233 229 228 228 228 228 228 228 227 225 225 225 225 225 223 221 220 220 235 235 235 232 231 231 232 233 234 235 235 220 220 221 222 224 225 227 238 238 238 239 239 239 239 239 238 237
235 231 229 228 228 228 228 228 228 227 225 225 225 225 225 223 221 220 220 235 235 235 232 231 231 232 233 234 235 235 220 220 221 222 224 225 227 238 238 238 239 239 239 239 239 238
237 235 233 229 228 228 228 228 228 228 227 225 225 225 225 225 223 221 220 220 235 235 235 232 231 231 232 233 234 235 235 229 215 215 217 219 220 222 239 239 239 223 236 236 239 239
222 220 220 218 216 215 225 225 225 239 239 239 221 221 221 220 221 221 221 225 239 229 227 225 225 239 239 239 221 221 221 220 220 221 222 221 221 220 221 221 222 224 226 228 239 239
239 227 225 225 227 239 239 216 221 221 225 225 232 234 235 235 234 238 238 239 239 239 239 238 236 234 232
)
(list 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250
250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250
250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250
250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250
250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250
250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250
)
);mapcar
(mapcar 'vector_image; Color 251
(list 26 27 27 28 28 29 29 29 29 29 30 30 30 30 30 31 31 31 31 31 32 32 32 33 33 33 34 34 34 34 35 35 35 35 36 36 36 36 36 37 37 37 37 38 38 38 38 38 39 39 39 39 39 40 40 40 40 40 41 41 41 41
42 42 42 42 43 43 43 44 44 44 44 45 45 45 45 46 46 46 46 47 47 47 47 47 48 48 48 48 49 49 49 49 50 50 50 50 51 51 51 51 51 52 52 52 52 52 53 53 53 53 53 54 54 54 54 54 54 55 55 55 55 55
55 56 56 56 56 56 56 56 57 57 57 57 57 57 57 58 58 58 58 58 58 58 59 59 59 59 59 60 60 60 60 60 60 61 61 61 61 61 61 61 61 62 62 62 62 62 62 62 62 62 62 62 63 63 63 63 63 63 63 63 63 63
63 63 63 63 64 64 64 64 64 64 64 64 64 64 64 64 64 64 64 64 64 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 67 67 67 67 67
67 67 67 67 67 67 67 67 67 67 67 67 67 68 68 68 68 68 68 68 68 68 68 68 68 68 68 68 68 68 69 69 69 69 69 69 69 69 69 69 69 69 69 69 69 69 69 69 69 69 70 70 70 70 70 70 70 70 70 70 70 70
70 70 70 70 70 70 70 70 71 71 71 71 71 71 71 71 71 71 71 71 71 71 71 71 71 71 71 71 71 72 72 72 72 72 72 72 72 72 72 72 72 72 72 72 72 72 72 72 72 72 72 72 73 73 73 73 73 73 73 73 73 73
73 73 73 73 73 73 73 73 73 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 76 76 76 76 76 76 76
76 76 76 76 76 76 76 76 76 76 76 76 76 76 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 79 79 79 79
79 79 79 79 79 79 79 79 79 79 79 79 79 79 79 79 79 79 79 79 79 79 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 81 81 81 81 81 81 81 81 81 81 81
81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 82 82 82 82 82 82 82 82 82 82 82 82 82 82 82 82 82 82 82 82 82 82 82 82 82 82 83 83 83 83 83 83 83 83 83 83 83 83 83 83 83 83 83 83
83 83 83 83 83 83 83 83 83 83 83 83 83 84 84 84 84 84 84 84 84 84 84 84 84 84 84 84 84 84 84 84 84 84 84 84 84 84 84 84 84 84 84 84 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85
85 85 85 85 85 85 85 85 85 85 85 85 85 85 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 87 87 87 87 87 87 87 87 87 87 87 87 87 87 87 87 87 87
87 87 87 87 87 87 87 87 87 87 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 89 89 89 89 89 89 89 89 89 89 89 89 89 89 89 89 89 89 89 89 89 89 90 90 90
90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 91 91 91 91 91 91 91 91 91 91 91 91 91 91 91 91 91 91 91 91 91 91 91 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92
92 92 92 92 92 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 95 95 95 95 95 95
95 95 95 95 95 95 95 95 95 95 95 95 95 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 97 97 97 97 97 97 97 97 97 97 97 97 97 97 97 97 97 97 98 98 98 98 98 98 98 98 98 98 98
98 98 98 98 98 98 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 101 101 101 101 101
101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 102 102 102 102 102 102 102 102 102 102 102 102 102 102 102 102 102 102 102 103 103 103 103 103 103 103 103 103 103
103 103 103 103 103 103 103 103 103 103 103 104 104 104 104 104 104 104 104 104 104 104 104 104 104 104 104 104 104 104 104 104 104 104 105 105 105 105 105 105 105 105 105 105 105 105
105 105 105 105 105 105 105 105 105 106 106 106 106 106 106 106 106 106 106 106 106 106 106 106 106 106 106 106 106 106 106 106 107 107 107 107 107 107 107 107 107 107 107 107 107 107
107 107 107 107 107 108 108 108 108 108 108 108 108 108 108 108 108 108 108 108 108 108 108 108 109 109 109 109 109 109 109 109 109 109 109 109 109 109 109 109 109 109 109 109 110 110
110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111 112 112 112 112 112 112 112 112 112
112 112 112 112 112 112 112 112 113 113 113 113 113 113 113 113 113 113 113 113 113 113 113 113 113 114 114 114 114 114 114 114 114 114 114 114 114 114 114 114 114 114 114 114 115 115
115 115 115 115 115 115 115 115 115 115 115 115 115 115 116 116 116 116 116 116 116 116 116 116 116 116 116 116 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 118 118
118 118 118 118 118 118 118 118 118 118 118 118 118 118 118 119 119 119 119 119 119 119 119 119 119 119 119 119 119 119 119 119 120 120 120 120 120 120 120 120 120 120 120 120 120 120
120 120 120 120 120 121 121 121 121 121 121 121 121 121 121 121 121 121 121 121 121 121 122 122 122 122 122 122 122 122 122 122 122 122 122 122 122 122 122 122 123 123 123 123 123 123
123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 124 124 124 124 124 124 124 124 124 124 124 124 124 124 124 124 124 124 124 124 124 124 124 124 125 125 125 125 125
125 125 125 125 125 125 125 125 125 125 125 125 125 125 125 125 125 125 125 125 126 126 126 126 126 126 126 126 126 126 126 126 126 126 126 126 126 126 126 126 126 126 126 126 127 127
127 127 127 127 127 127 127 127 127 127 127 127 127 127 127 127 127 127 127 127 127 127 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128
128 129 129 129 129 129 129 129 129 129 129 129 129 129 129 129 129 129 129 129 129 129 129 129 129 129 130 130 130 130 130 130 130 130 130 130 130 130 130 130 130 130 130 130 130 130
130 130 130 130 130 130 130 130 130 130 130 131 131 131 131 131 131 131 131 131 131 131 131 131 131 131 131 131 131 131 131 131 131 131 131 131 131 131 132 132 132 132 132 132 132 132
132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 134 134
134 134 134 134 134 134 134 134 134 134 134 134 134 134 134 134 134 134 134 134 135 135 135 135 135 135 135 135 135 135 135 135 135 135 135 135 135 135 135 135 135 136 136 136 136 136
136 136 136 136 136 136 136 136 136 136 136 136 136 136 136 137 137 137 137 137 137 137 137 137 137 137 137 137 137 137 137 137 137 137 138 138 138 138 138 138 138 138 138 138 138 138
138 138 138 138 138 139 139 139 139 139 139 139 139 139 139 139 139 139 139 139 140 140 140 140 140 140 140 140 140 140 140 140 140 140 140 140 140 140 140 141 141 141 141 141 141 141
141 141 141 141 141 141 141 141 141 141 141 141 142 142 142 142 142 142 142 142 142 142 142 142 142 142 142 142 142 142 142 143 143 143 143 143 143 143 143 143 143 143 143 143 143 143
143 143 143 144 144 144 144 144 144 144 144 144 144 144 144 144 144 144 144 144 144 145 145 145 145 145 145 145 145 145 145 145 145 145 145 145 145 145 145 146 146 146 146 146 146 146
146 146 146 146 146 146 147 147 147 147 147 147 147 147 147 147 147 147 147 148 148 148 148 148 148 148 148 148 148 148 148 148 148 149 149 149 149 149 149 149 149 149 149 149 149 149
149 149 149 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 151 151 151 151 151 151 151 151 151 151 151 151 151 151 151 151 152 152 152 152 152 152 152 152 152 152
152 152 152 152 152 152 153 153 153 153 153 153 153 153 153 153 153 153 153 153 153 153 154 154 154 154 154 154 154 154 154 154 154 154 154 154 154 154 154 154 154 154 155 155 155 155
155 155 155 155 155 155 155 155 155 155 155 155 155 155 155 156 156 156 156 156 156 156 156 156 156 156 156 156 156 156 156 156 156 156 157 157 157 157 157 157 157 157 157 157 157 157
157 157 157 157 157 158 158 158 158 158 158 158 158 158 158 158 158 158 158 158 158 158 158 158 158 158 159 159 159 159 159 159 159 159 159 159 159 159 159 159 159 159 159 159 159 159
159 159 159 160 160 160 160 160 160 160 160 160 160 160 160 160 160 160 160 160 160 160 160 161 161 161 161 161 161 161 161 161 161 161 161 161 161 161 161 161 161 161 161 161 161 162
162 162 162 162 162 162 162 162 162 162 162 162 162 162 162 162 162 162 162 162 163 163 163 163 163 163 163 163 163 163 163 163 163 163 163 163 163 163 163 163 164 164 164 164 164 164
164 164 164 164 164 164 164 164 164 165 165 165 165 165 165 165 165 165 165 165 165 165 165 166 166 166 166 166 166 166 166 166 166 166 166 167 167 167 167 167 167 167 167 167 167 167
167 167 167 168 168 168 168 168 168 168 168 168 168 168 168 168 168 168 168 169 169 169 169 169 169 169 169 169 169 169 169 169 169 169 170 170 170 170 170 170 170 170 170 170 170 170
170 170 170 171 171 171 171 171 171 171 171 171 171 171 171 171 171 171 171 171 172 172 172 172 172 172 172 172 172 172 172 172 172 172 172 172 172 173 173 173 173 173 173 173 173 173
173 173 173 173 173 173 173 174 174 174 174 174 174 174 174 174 174 174 174 174 174 174 174 174 174 175 175 175 175 175 175 175 175 175 175 175 175 175 175 175 175 175 176 176 176 176
176 176 176 176 176 176 176 176 176 176 176 176 176 176 176 176 177 177 177 177 177 177 177 177 177 177 177 177 177 177 177 177 177 177 177 177 177 178 178 178 178 178 178 178 178 178
178 178 178 178 178 178 178 178 178 178 178 178 178 179 179 179 179 179 179 179 179 179 179 179 179 179 179 179 179 179 179 179 180 180 180 180 180 180 180 180 180 180 180 180 180 180
180 180 180 180 180 180 180 181 181 181 181 181 181 181 181 181 181 181 181 181 181 181 181 181 181 181 181 182 182 182 182 182 182 182 182 182 182 182 182 182 182 182 182 182 182 183
183 183 183 183 183 183 183 183 183 183 183 183 183 183 184 184 184 184 184 184 184 184 184 184 184 184 184 184 184 185 185 185 185 185 185 185 185 185 185 185 185 186 186 186 186 186
186 186 186 186 186 186 187 187 187 187 187 187 187 187 188 188 188 188 188 188 188 188 189 189 189 189 189 189 189 189 189 190 190 190 190 190 190 190 190 191 191 191 191 191 191 191
191 192 192 192 192 192 192 192 192 193 193 193 193 193 193 193 194 194 194 194 194 194 194 194 195 195 195 195 195 195 195 196 196 196 196 196 196 196 197 197 197 197 197 197 197 197
197 198 198 198 198 198 198 198 199 199 199 199 199 199 200 200 200 200 200 200 200 201 201 201 201 201 202 202 202 202 202 202 203 203 203 203 204 204 204 204 204 205 205 205 205 205
205 206 206 206 206 206 207 207 207 207 207 208 208 208 208 209 209 209 209 210 210 210 210 210 211 211 211 211 211 212 212 212 213 213 213 214 214 214 215 215 215 215 216 216 216 216
217 217 217 217 218 218 218 218 219 219 219 219 220 220 220 221 221 222
)
(list 178 182 175 188 173 189 172 184 178 183 190 171 187 175 183 191 170 187 174 182 192 178 188 181 169 176 188 170 181 175 184 169 180 177 188 168 183 172 176 191 167 183 176 192 166 185
176 181 191 166 183 172 177 190 166 182 171 179 189 166 179 172 188 165 177 172 187 165 177 187 165 186 177 187 165 184 176 186 165 182 175 185 165 179 167 175 184 165 178 169 184 165
182 174 183 124 174 165 181 120 174 132 165 182 125 173 134 165 181 128 171 136 164 179 113 173 130 164 137 180 105 171 131 164 138 180 102 172 115 164 133 138 179 100 172 122 169 136
164 178 98 172 126 171 164 166 176 97 171 129 163 171 95 163 117 141 131 170 41 162 94 142 114 133 119 173 40 170 93 166 112 164 121 162 134 143 178 39 172 44 166 58 162 66 144 92 135
111 130 118 177 38 168 45 162 57 149 60 144 65 136 68 130 90 127 109 113 176 38 169 46 161 51 150 56 145 61 133 64 125 68 108 89 180 37 176 40 172 46 169 51 161 56 151 61 145 64 139 67
135 88 124 107 180 37 175 41 172 47 170 51 165 56 151 61 145 65 137 75 123 87 180 37 175 41 171 47 158 56 152 59 138 74 122 78 117 85 114 180 36 175 40 169 48 159 53 152 64 141 73 121 78
117 84 114 98 112 108 180 36 174 39 163 48 159 52 153 58 121 62 116 67 109 71 106 78 97 82 180 36 175 38 174 43 164 49 159 58 153 62 120 68 112 78 108 81 104 95 99 180 36 174 38 171 44
159 49 153 59 124 61 118 68 115 72 111 77 107 79 103 94 98 180 34 174 47 171 50 159 59 153 68 127 72 122 93 115 96 110 101 104 180 33 173 46 170 50 159 58 153 62 129 68 119 71 110 87 105
91 100 95 179 32 172 37 169 43 158 45 153 48 148 51 130 57 114 62 106 67 104 70 98 86 95 90 93 92 179 32 168 38 158 41 154 46 149 51 131 61 106 85 103 87 97 88 94 91 92 175 32 168 38 158
46 154 51 149 58 131 80 105 84 101 86 97 87 95 90 93 91 174 32 168 38 158 43 154 46 150 49 130 56 104 79 101 82 98 85 96 89 93 92 177 32 172 37 167 43 164 51 157 55 154 61 151 72 138 77
126 79 103 81 100 84 98 88 95 92 177 31 171 37 157 42 154 47 151 53 141 62 136 65 127 69 101 71 99 73 97 75 93 76 91 79 87 80 84 176 29 170 36 157 41 155 47 152 53 144 63 135 65 128 67
102 69 99 71 95 72 92 74 90 78 86 80 83 175 27 168 36 155 41 152 47 147 53 144 63 135 71 128 74 101 77 98 79 95 81 94 85 91 89 194 27 190 36 175 40 167 47 156 53 153 63 148 69 145 70 134
73 128 76 100 79 97 80 95 82 93 84 91 88 90 195 26 193 33 188 40 175 50 172 63 166 69 157 73 153 75 149 78 141 81 134 83 128 84 99 86 96 89 94 91 92 199 26 195 32 191 37 186 40 174 49
172 56 171 62 164 69 156 74 149 78 142 81 134 82 127 84 98 85 95 87 93 90 201 25 195 31 191 38 184 41 174 48 172 57 168 60 163 68 149 70 134 75 125 77 97 80 96 83 93 84 89 86 202 25 194
30 191 41 185 47 183 58 172 63 168 67 162 69 151 72 142 77 135 80 123 83 95 85 92 88 202 25 194 30 191 42 185 46 182 58 176 65 174 69 169 72 161 80 144 83 141 85 135 88 120 91 94 202 25
191 30 184 38 181 43 174 58 169 69 167 71 159 87 146 91 141 94 136 119 201 25 191 30 183 38 179 49 173 57 166 63 158 69 147 86 142 90 136 93 119 201 25 191 30 183 37 177 48 173 52 171 56
168 64 165 89 157 90 147 92 137 102 118 203 26 192 30 189 37 182 47 178 54 176 65 173 77 168 88 161 90 155 91 147 94 138 100 117 104 204 27 195 31 191 37 188 46 182 54 178 65 174 77 173
79 170 89 167 92 161 93 154 98 146 106 139 115 204 30 195 37 191 45 187 55 181 65 177 79 173 89 170 91 169 97 161 108 152 140 144 204 30 195 37 190 45 186 55 181 59 176 77 170 84 164 89
150 91 95 203 30 195 38 190 45 186 54 181 56 176 63 170 65 167 85 149 88 93 91 203 31 191 38 186 44 180 52 175 55 174 64 171 68 166 86 162 108 203 33 189 39 185 51 180 54 173 61 166 65
162 69 112 86 104 203 33 190 43 188 54 185 60 181 65 176 70 173 87 172 101 166 113 163 202 33 191 43 188 54 187 60 185 65 181 70 175 76 173 87 172 93 170 98 166 114 156 202 32 188 33 186
43 181 53 175 60 173 65 172 70 165 74 160 89 156 91 114 94 201 31 195 34 187 42 183 51 172 56 168 65 165 70 160 73 114 78 89 201 31 195 35 186 41 180 50 168 57 159 64 114 69 95 72 94 78
92 89 91 200 31 195 37 186 41 177 49 168 58 165 63 159 68 118 71 114 78 94 78 91 89 90 199 31 195 35 166 41 159 49 124 58 115 61 113 71 94 76 93 78 90 81 89 195 31 186 35 179 40 166 46
163 48 159 58 125 64 112 71 93 76 92 78 90 81 88 195 31 186 35 163 39 125 45 111 46 92 48 90 58 82 62 77 71 75 195 31 187 35 166 38 162 40 125 47 110 49 92 58 89 60 82 63 71 182 31 166
35 162 42 157 50 131 53 125 59 109 64 93 73 91 82 89 84 169 31 165 35 162 37 156 51 124 54 92 59 91 63 89 76 85 81 84 183 31 179 34 169 36 166 45 157 49 156 56 135 59 124 77 92 85 91 88
183 31 176 34 172 36 168 45 136 47 92 49 90 57 88 59 72 180 25 171 31 168 33 137 36 91 45 90 48 88 57 72 59 70 188 25 179 31 175 33 171 36 168 48 165 57 138 59 91 70 90 73 88 192 26 186
31 175 33 171 36 138 48 116 57 90 59 89 70 193 14 187 32 175 36 171 48 138 55 113 59 91 89 193 14 187 17 175 31 157 36 138 46 120 53 112 59 90 89 193 14 187 16 174 30 160 36 156 45 138
49 119 59 110 89 90 193 14 187 16 172 30 161 35 155 44 138 54 117 60 109 89 90 193 23 187 30 175 35 171 37 161 43 154 54 137 60 116 89 108 90 92 192 21 186 25 175 30 170 34 162 39 154 54
136 60 115 92 107 188 21 186 26 175 30 169 33 162 44 153 50 135 60 114 91 106 94 194 21 191 26 187 30 185 33 178 41 175 44 169 48 162 53 153 60 134 91 112 93 102 195 21 192 25 187 31 184
40 180 45 177 54 175 59 168 77 162 91 152 93 135 100 126 109 194 21 192 24 186 31 184 33 180 39 177 46 175 54 170 59 168 72 162 91 152 92 136 102 124 192 21 188 31 186 33 183 39 180 46
176 54 175 60 170 70 168 90 162 92 152 122 136 129 193 31 188 34 185 37 183 46 180 54 175 60 167 68 162 77 151 84 135 90 128 92 121 94 195 31 193 34 187 43 184 46 182 54 180 60 174 67
167 79 161 83 151 90 135 91 127 93 120 195 15 193 30 187 38 184 42 181 47 180 54 174 59 167 67 151 80 134 84 126 90 119 91 93 195 14 193 19 186 29 183 33 181 38 180 41 175 47 167 53 160
54 151 59 133 66 125 74 119 81 93 83 91 85 90 196 13 193 21 185 28 183 34 179 39 167 48 159 55 152 60 131 65 123 72 118 77 92 82 90 86 89 193 13 185 21 182 27 179 40 167 47 158 50 152 55
129 60 121 65 117 71 92 73 91 76 90 80 86 193 12 184 21 181 27 179 40 167 46 156 49 153 55 127 60 119 64 116 70 91 72 90 76 86 193 12 184 21 181 27 179 40 167 45 125 50 117 55 115 59 91
64 90 69 86 72 193 12 183 20 180 26 179 40 167 45 124 50 114 55 91 59 90 64 85 68 72 193 13 183 19 180 26 167 40 123 45 111 49 91 55 89 60 85 64 72 68 193 13 182 26 179 39 167 44 123 53
112 60 91 63 89 68 84 68 72 193 26 184 38 182 42 179 54 167 60 122 63 91 68 89 73 82 192 26 183 37 181 43 179 55 168 60 121 63 91 69 89 194 27 191 36 184 42 183 56 181 60 179 64 168 75
130 81 121 89 91 195 24 191 27 184 36 183 42 180 56 169 60 133 64 128 81 124 90 120 195 23 190 28 182 36 180 42 170 56 133 60 126 64 122 74 120 82 90 190 23 182 29 180 41 171 56 154 59
134 65 126 73 120 76 90 83 190 22 184 29 181 35 170 41 157 56 153 59 134 66 120 77 90 83 190 22 183 29 181 35 171 41 157 55 153 59 133 69 121 78 90 84 190 22 171 29 152 35 133 42 91 55
84 59 79 195 22 190 29 172 36 152 42 132 55 91 80 85 195 22 190 29 172 36 152 43 131 55 91 59 86 80 194 22 191 30 188 36 176 43 172 59 157 81 152 86 131 91 194 22 180 30 176 37 172 42
156 46 152 53 130 59 91 82 87 183 22 180 32 178 38 171 41 155 52 152 58 129 82 91 88 186 23 180 39 178 42 171 52 161 57 153 62 143 83 128 88 186 23 181 30 177 42 171 51 160 53 141 62 126
66 89 84 186 24 181 30 170 36 164 37 159 43 146 51 139 53 125 62 89 65 84 68 189 26 186 35 170 43 164 50 159 54 147 56 138 62 123 64 90 69 85 189 30 186 35 170 45 165 54 158 56 147 61
137 63 111 70 90 74 85 187 30 169 49 160 54 157 57 147 63 136 70 109 72 91 75 86 178 29 169 31 162 35 157 49 146 54 136 58 111 63 108 66 92 69 87 71 76 177 29 168 34 163 38 156 47 145 53
135 55 131 66 113 68 108 72 107 75 92 78 87 168 29 163 34 156 38 144 42 134 46 129 48 115 53 106 64 93 73 88 78 171 29 167 34 163 38 156 41 143 45 134 50 132 58 128 65 117 73 105 78 93
88 173 29 164 35 162 41 157 45 155 50 142 51 131 59 127 65 118 73 105 89 94 175 29 166 35 163 40 162 45 157 49 155 51 142 60 131 65 120 72 94 89 176 30 166 35 163 46 160 51 155 59 131 66
95 71 90 178 31 165 37 163 41 161 51 155 59 145 67 95 90 179 37 165 41 163 51 160 58 155 91 142 96 181 38 165 41 163 48 158 50 156 57 147 91 140 96 182 38 172 40 164 42 163 47 156 50 149
52 147 69 96 92 184 39 169 40 164 43 163 50 150 53 146 57 97 64 92 185 39 164 45 163 50 150 53 145 57 139 62 97 75 93 186 40 178 47 166 50 164 56 162 60 150 77 148 93 144 98 138 187 40
180 46 167 52 164 56 162 58 150 78 147 93 143 98 139 187 41 181 52 171 56 164 57 162 78 150 85 147 94 139 98 188 40 181 42 170 48 163 52 161 55 150 79 146 84 140 87 99 94 188 40 181 48
165 51 163 55 161 79 150 84 145 89 115 95 99 188 41 182 49 173 55 166 65 163 80 161 85 150 90 144 95 134 99 119 113 188 41 182 50 174 54 170 64 163 68 160 81 149 86 142 92 133 95 121 100
112 189 42 182 48 179 54 173 63 169 68 163 82 160 87 149 94 141 96 131 100 123 111 189 42 182 48 172 53 164 62 159 68 149 71 139 83 126 88 110 96 100 188 43 183 46 173 53 165 62 164 67
159 70 148 74 138 84 128 89 113 96 101 188 43 183 52 177 62 171 65 164 69 158 74 148 84 136 89 126 96 115 101 188 44 184 51 177 63 166 69 164 73 151 85 147 90 134 97 117 101 185 44 177
50 167 70 164 86 149 91 147 97 132 101 120 186 45 175 60 172 87 168 92 165 97 164 102 148 129 147 166 48 164 59 147 61 126 88 105 94 102 97 178 59 174 90 167 95 163 102 146 107 122 178
90 172 96 163 102 145 110 178 92 168 96 163 102 145 115 180 93 178 96 172 102 169 144 163 180 94 177 102 172 137 163 143 180 95 177 102 173 136 163 143 180 97 176 101 172 135 163 143 180
98 175 134 172 142 163 180 133 177 142 174 163 172 167 180 118 177 131 172 163 169 180 116 177 122 176 163 166 181 114 178 125 174 130 173 163 165 181 112 178 129 172 163 165 182 111 178
127 166 163 182 110 178 125 172 163 167 182 109 178 162 172 182 109 177 117 172 162 183 162 177 171 184 162 178 172 175 185 162 184 167 177 172 185 162 184 167 179 186 162 185 171 179
186 162 179 173 186 162 178 173 187 162 179 164 174 180 161 179 165 172 181 161 165 181 161 167 181 161 169 182 162 175 173 182 162 175 173 181 163 175 173 181 165 175 173 179 166 173
173 175 167 173 175 169 170
)
(list 26 27 27 28 28 29 29 29 29 29 30 30 30 30 30 31 31 31 31 31 32 32 32 33 33 33 34 34 34 34 35 35 35 35 36 36 36 36 36 37 37 37 37 38 38 38 38 38 39 39 39 39 39 40 40 40 40 40 41 41 41 41
42 42 42 42 43 43 43 44 44 44 44 45 45 45 45 46 46 46 46 47 47 47 47 47 48 48 48 48 49 49 49 49 50 50 50 50 51 51 51 51 51 52 52 52 52 52 53 53 53 53 53 54 54 54 54 54 54 55 55 55 55 55
55 56 56 56 56 56 56 56 57 57 57 57 57 57 57 58 58 58 58 58 58 58 59 59 59 59 59 60 60 60 60 60 60 61 61 61 61 61 61 61 61 62 62 62 62 62 62 62 62 62 62 62 63 63 63 63 63 63 63 63 63 63
63 63 63 63 64 64 64 64 64 64 64 64 64 64 64 64 64 64 64 64 64 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 65 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 67 67 67 67 67
67 67 67 67 67 67 67 67 67 67 67 67 67 68 68 68 68 68 68 68 68 68 68 68 68 68 68 68 68 68 69 69 69 69 69 69 69 69 69 69 69 69 69 69 69 69 69 69 69 69 70 70 70 70 70 70 70 70 70 70 70 70
70 70 70 70 70 70 70 70 71 71 71 71 71 71 71 71 71 71 71 71 71 71 71 71 71 71 71 71 71 72 72 72 72 72 72 72 72 72 72 72 72 72 72 72 72 72 72 72 72 72 72 72 73 73 73 73 73 73 73 73 73 73
73 73 73 73 73 73 73 73 73 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 74 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 75 76 76 76 76 76 76 76
76 76 76 76 76 76 76 76 76 76 76 76 76 76 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 79 79 79 79
79 79 79 79 79 79 79 79 79 79 79 79 79 79 79 79 79 79 79 79 79 79 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 81 81 81 81 81 81 81 81 81 81 81
81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 81 82 82 82 82 82 82 82 82 82 82 82 82 82 82 82 82 82 82 82 82 82 82 82 82 82 82 83 83 83 83 83 83 83 83 83 83 83 83 83 83 83 83 83 83
83 83 83 83 83 83 83 83 83 83 83 83 83 84 84 84 84 84 84 84 84 84 84 84 84 84 84 84 84 84 84 84 84 84 84 84 84 84 84 84 84 84 84 84 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85
85 85 85 85 85 85 85 85 85 85 85 85 85 85 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 87 87 87 87 87 87 87 87 87 87 87 87 87 87 87 87 87 87
87 87 87 87 87 87 87 87 87 87 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88 89 89 89 89 89 89 89 89 89 89 89 89 89 89 89 89 89 89 89 89 89 89 90 90 90
90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 91 91 91 91 91 91 91 91 91 91 91 91 91 91 91 91 91 91 91 91 91 91 91 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92 92
92 92 92 92 92 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 93 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 95 95 95 95 95 95
95 95 95 95 95 95 95 95 95 95 95 95 95 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 97 97 97 97 97 97 97 97 97 97 97 97 97 97 97 97 97 97 98 98 98 98 98 98 98 98 98 98 98
98 98 98 98 98 98 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 101 101 101 101 101
101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 102 102 102 102 102 102 102 102 102 102 102 102 102 102 102 102 102 102 102 103 103 103 103 103 103 103 103 103 103
103 103 103 103 103 103 103 103 103 103 103 104 104 104 104 104 104 104 104 104 104 104 104 104 104 104 104 104 104 104 104 104 104 104 105 105 105 105 105 105 105 105 105 105 105 105
105 105 105 105 105 105 105 105 105 106 106 106 106 106 106 106 106 106 106 106 106 106 106 106 106 106 106 106 106 106 106 106 107 107 107 107 107 107 107 107 107 107 107 107 107 107
107 107 107 107 107 108 108 108 108 108 108 108 108 108 108 108 108 108 108 108 108 108 108 108 109 109 109 109 109 109 109 109 109 109 109 109 109 109 109 109 109 109 109 109 110 110
110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111 112 112 112 112 112 112 112 112 112
112 112 112 112 112 112 112 112 113 113 113 113 113 113 113 113 113 113 113 113 113 113 113 113 113 114 114 114 114 114 114 114 114 114 114 114 114 114 114 114 114 114 114 114 115 115
115 115 115 115 115 115 115 115 115 115 115 115 115 115 116 116 116 116 116 116 116 116 116 116 116 116 116 116 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 118 118
118 118 118 118 118 118 118 118 118 118 118 118 118 118 118 119 119 119 119 119 119 119 119 119 119 119 119 119 119 119 119 119 120 120 120 120 120 120 120 120 120 120 120 120 120 120
120 120 120 120 120 121 121 121 121 121 121 121 121 121 121 121 121 121 121 121 121 121 122 122 122 122 122 122 122 122 122 122 122 122 122 122 122 122 122 122 123 123 123 123 123 123
123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 124 124 124 124 124 124 124 124 124 124 124 124 124 124 124 124 124 124 124 124 124 124 124 124 125 125 125 125 125
125 125 125 125 125 125 125 125 125 125 125 125 125 125 125 125 125 125 125 125 126 126 126 126 126 126 126 126 126 126 126 126 126 126 126 126 126 126 126 126 126 126 126 126 127 127
127 127 127 127 127 127 127 127 127 127 127 127 127 127 127 127 127 127 127 127 127 127 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128
128 129 129 129 129 129 129 129 129 129 129 129 129 129 129 129 129 129 129 129 129 129 129 129 129 129 130 130 130 130 130 130 130 130 130 130 130 130 130 130 130 130 130 130 130 130
130 130 130 130 130 130 130 130 130 130 130 131 131 131 131 131 131 131 131 131 131 131 131 131 131 131 131 131 131 131 131 131 131 131 131 131 131 131 132 132 132 132 132 132 132 132
132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 133 134 134
134 134 134 134 134 134 134 134 134 134 134 134 134 134 134 134 134 134 134 134 135 135 135 135 135 135 135 135 135 135 135 135 135 135 135 135 135 135 135 135 135 136 136 136 136 136
136 136 136 136 136 136 136 136 136 136 136 136 136 136 136 137 137 137 137 137 137 137 137 137 137 137 137 137 137 137 137 137 137 137 138 138 138 138 138 138 138 138 138 138 138 138
138 138 138 138 138 139 139 139 139 139 139 139 139 139 139 139 139 139 139 139 140 140 140 140 140 140 140 140 140 140 140 140 140 140 140 140 140 140 140 141 141 141 141 141 141 141
141 141 141 141 141 141 141 141 141 141 141 141 142 142 142 142 142 142 142 142 142 142 142 142 142 142 142 142 142 142 142 143 143 143 143 143 143 143 143 143 143 143 143 143 143 143
143 143 143 144 144 144 144 144 144 144 144 144 144 144 144 144 144 144 144 144 144 145 145 145 145 145 145 145 145 145 145 145 145 145 145 145 145 145 145 146 146 146 146 146 146 146
146 146 146 146 146 146 147 147 147 147 147 147 147 147 147 147 147 147 147 148 148 148 148 148 148 148 148 148 148 148 148 148 148 149 149 149 149 149 149 149 149 149 149 149 149 149
149 149 149 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 151 151 151 151 151 151 151 151 151 151 151 151 151 151 151 151 152 152 152 152 152 152 152 152 152 152
152 152 152 152 152 152 153 153 153 153 153 153 153 153 153 153 153 153 153 153 153 153 154 154 154 154 154 154 154 154 154 154 154 154 154 154 154 154 154 154 154 154 155 155 155 155
155 155 155 155 155 155 155 155 155 155 155 155 155 155 155 156 156 156 156 156 156 156 156 156 156 156 156 156 156 156 156 156 156 156 157 157 157 157 157 157 157 157 157 157 157 157
157 157 157 157 157 158 158 158 158 158 158 158 158 158 158 158 158 158 158 158 158 158 158 158 158 158 159 159 159 159 159 159 159 159 159 159 159 159 159 159 159 159 159 159 159 159
159 159 159 160 160 160 160 160 160 160 160 160 160 160 160 160 160 160 160 160 160 160 160 161 161 161 161 161 161 161 161 161 161 161 161 161 161 161 161 161 161 161 161 161 161 162
162 162 162 162 162 162 162 162 162 162 162 162 162 162 162 162 162 162 162 162 163 163 163 163 163 163 163 163 163 163 163 163 163 163 163 163 163 163 163 163 164 164 164 164 164 164
164 164 164 164 164 164 164 164 164 165 165 165 165 165 165 165 165 165 165 165 165 165 165 166 166 166 166 166 166 166 166 166 166 166 166 167 167 167 167 167 167 167 167 167 167 167
167 167 167 168 168 168 168 168 168 168 168 168 168 168 168 168 168 168 168 169 169 169 169 169 169 169 169 169 169 169 169 169 169 169 170 170 170 170 170 170 170 170 170 170 170 170
170 170 170 171 171 171 171 171 171 171 171 171 171 171 171 171 171 171 171 171 172 172 172 172 172 172 172 172 172 172 172 172 172 172 172 172 172 173 173 173 173 173 173 173 173 173
173 173 173 173 173 173 173 174 174 174 174 174 174 174 174 174 174 174 174 174 174 174 174 174 174 175 175 175 175 175 175 175 175 175 175 175 175 175 175 175 175 175 176 176 176 176
176 176 176 176 176 176 176 176 176 176 176 176 176 176 176 176 177 177 177 177 177 177 177 177 177 177 177 177 177 177 177 177 177 177 177 177 177 178 178 178 178 178 178 178 178 178
178 178 178 178 178 178 178 178 178 178 178 178 178 179 179 179 179 179 179 179 179 179 179 179 179 179 179 179 179 179 179 179 180 180 180 180 180 180 180 180 180 180 180 180 180 180
180 180 180 180 180 180 180 181 181 181 181 181 181 181 181 181 181 181 181 181 181 181 181 181 181 181 181 182 182 182 182 182 182 182 182 182 182 182 182 182 182 182 182 182 182 183
183 183 183 183 183 183 183 183 183 183 183 183 183 183 184 184 184 184 184 184 184 184 184 184 184 184 184 184 184 185 185 185 185 185 185 185 185 185 185 185 185 186 186 186 186 186
186 186 186 186 186 186 187 187 187 187 187 187 187 187 188 188 188 188 188 188 188 188 189 189 189 189 189 189 189 189 189 190 190 190 190 190 190 190 190 191 191 191 191 191 191 191
191 192 192 192 192 192 192 192 192 193 193 193 193 193 193 193 194 194 194 194 194 194 194 194 195 195 195 195 195 195 195 196 196 196 196 196 196 196 197 197 197 197 197 197 197 197
197 198 198 198 198 198 198 198 199 199 199 199 199 199 200 200 200 200 200 200 200 201 201 201 201 201 202 202 202 202 202 202 203 203 203 203 204 204 204 204 204 205 205 205 205 205
205 206 206 206 206 206 207 207 207 207 207 208 208 208 208 209 209 209 209 210 210 210 210 210 211 211 211 211 211 212 212 212 213 213 213 214 214 214 215 215 215 215 216 216 216 216
217 217 217 217 218 218 218 218 219 219 219 219 220 220 220 221 221 222
)
(list 184 189 178 191 175 192 173 186 179 183 192 172 187 176 183 193 171 188 175 182 193 182 188 181 171 177 191 174 181 176 188 175 181 178 192 169 185 176 177 193 168 183 177 193 168 185
177 182 192 167 184 172 181 192 167 182 172 181 191 166 181 172 190 166 180 174 190 166 179 189 167 187 178 188 168 185 178 188 169 184 177 187 166 182 171 177 186 166 180 177 186 166
183 176 185 132 181 166 184 125 176 135 166 183 128 180 137 166 183 130 175 138 166 182 117 178 132 166 139 182 124 175 134 166 140 181 111 178 127 165 138 140 181 104 174 129 170 140
169 180 101 174 130 171 165 168 179 99 172 132 165 178 97 164 121 144 133 177 44 164 96 146 117 135 122 176 46 171 94 169 114 166 123 164 136 148 180 41 175 46 169 62 164 68 149 93 137
112 133 123 181 39 174 47 165 58 151 63 147 67 138 69 136 92 129 111 118 182 39 174 47 164 54 152 57 147 63 138 65 127 69 112 90 182 38 177 42 174 47 169 54 165 56 153 63 147 65 139 68
139 89 125 109 182 38 176 43 173 48 170 53 169 57 163 62 147 67 140 79 124 88 182 37 176 44 173 48 169 58 156 61 147 75 124 79 118 87 115 182 37 176 44 172 49 165 60 154 67 145 74 123 79
119 85 116 99 114 111 182 37 175 45 172 50 161 54 155 59 122 64 117 69 115 73 108 79 98 84 182 36 177 40 175 45 171 52 163 60 155 62 121 73 116 78 111 83 106 96 100 181 36 176 39 173 45
170 52 155 60 130 62 120 70 115 74 112 78 110 81 105 95 99 181 38 176 47 173 51 169 63 155 69 131 79 125 93 118 98 111 104 109 181 38 174 49 170 51 169 60 156 63 132 69 122 77 115 88 108
92 104 97 181 34 173 38 170 44 169 46 156 49 149 52 132 61 119 63 107 68 105 75 102 87 96 90 94 92 180 33 172 39 168 44 156 48 150 57 133 72 106 86 104 88 101 89 95 92 93 180 33 171 43
168 47 156 52 150 62 132 80 106 84 103 87 100 88 96 90 94 92 179 33 170 39 167 43 156 47 151 52 132 63 105 79 102 83 100 87 98 91 94 93 178 33 174 38 169 49 166 53 164 56 156 64 152 72
141 78 130 80 103 82 101 86 99 89 96 93 177 33 174 38 168 43 156 48 152 55 144 64 138 66 130 69 102 72 100 74 98 76 95 77 92 79 88 81 85 177 35 172 37 166 41 156 48 153 54 145 64 137 66
130 68 103 70 100 72 97 73 94 76 91 79 87 81 84 177 30 171 37 165 41 154 48 148 54 146 70 136 73 130 74 102 78 99 80 96 83 95 86 93 90 200 28 192 37 177 41 170 48 163 55 154 65 149 70
146 72 136 74 130 77 101 80 98 81 95 83 94 86 92 89 91 201 27 194 38 192 41 177 57 173 64 169 70 161 73 154 76 150 80 146 82 136 84 130 85 100 88 98 90 95 92 93 203 27 196 34 194 39 189
41 176 50 173 58 172 64 168 70 160 76 151 79 145 81 136 83 129 85 99 87 97 89 94 92 204 26 195 32 193 40 187 42 176 50 173 59 170 64 166 69 158 72 136 76 128 78 97 82 96 84 95 85 91 88
204 26 195 32 192 42 186 49 184 60 173 65 171 69 165 70 155 73 145 78 137 81 126 85 96 86 94 90 204 26 195 31 192 44 185 49 183 59 177 67 175 69 171 73 164 80 146 84 143 85 137 89 124 93
95 203 26 194 31 185 39 182 46 174 64 171 69 167 72 162 88 147 92 142 95 137 121 204 26 194 31 184 39 181 53 174 58 167 65 161 71 148 88 142 92 138 94 120 205 26 193 31 183 38 181 49 175
55 173 57 170 66 167 90 160 91 148 93 139 107 119 205 27 195 31 189 38 183 48 180 57 178 66 174 80 170 89 167 91 158 93 149 95 140 102 119 109 205 30 196 32 192 38 189 47 182 56 179 66
176 77 173 80 172 91 169 93 166 94 157 100 149 111 141 118 205 35 196 38 191 47 188 56 182 66 178 80 175 91 173 93 169 99 167 116 155 142 148 205 31 196 38 191 46 187 56 182 66 177 78
174 86 167 90 154 93 97 205 31 196 39 190 46 186 55 181 59 176 65 174 69 169 88 151 89 96 92 205 33 191 40 186 45 181 55 176 57 175 65 173 70 169 94 164 112 204 35 191 44 186 52 181 56
174 62 173 66 165 71 114 87 108 204 34 191 44 190 56 186 61 181 66 176 71 174 88 172 104 171 115 164 204 34 193 44 189 55 188 61 186 66 182 71 176 77 174 89 172 93 171 101 170 115 158
203 32 189 34 187 46 182 56 178 61 174 66 172 71 170 79 161 91 158 93 116 98 203 32 197 35 187 43 185 52 174 58 171 66 167 71 163 74 115 80 95 202 32 197 36 187 42 184 51 176 59 167 65
115 71 95 73 94 80 93 90 91 202 32 198 37 186 42 181 50 176 59 168 64 163 70 125 73 115 78 95 80 92 89 91 201 32 198 36 186 41 161 50 126 59 118 69 115 72 95 78 93 80 92 82 89 200 32 186
36 180 41 177 48 163 50 160 59 127 67 115 72 94 77 93 79 91 83 88 198 32 187 36 177 41 127 46 113 48 94 50 91 60 83 64 79 72 75 197 32 188 36 178 39 165 42 127 48 111 50 93 60 90 62 83
64 77 197 32 179 38 164 47 160 50 135 58 127 61 110 65 93 75 93 83 90 87 194 32 168 36 163 37 160 52 137 57 93 61 92 65 89 78 87 82 85 184 32 181 35 174 37 167 48 159 50 157 58 138 63
127 81 93 85 92 89 184 32 178 34 175 37 170 46 139 48 92 50 91 58 89 60 73 185 28 174 32 170 34 140 36 92 46 91 49 89 58 74 60 71 193 28 187 32 177 34 174 36 170 49 166 58 140 60 92 71
91 74 88 193 27 189 32 181 34 174 36 140 49 120 58 91 60 90 73 194 17 188 35 178 36 174 49 140 57 122 60 91 90 194 15 188 18 177 31 162 37 140 50 121 56 113 60 91 90 194 14 188 17 176 31
163 37 158 46 139 55 120 60 112 89 91 194 15 188 17 176 30 164 38 156 45 139 55 119 60 111 89 91 194 26 188 30 176 36 174 41 164 45 155 55 138 60 118 89 110 90 92 194 23 188 27 176 30
172 35 164 45 154 55 137 61 117 92 109 195 22 186 27 176 31 171 34 164 45 154 55 136 61 116 92 107 94 195 22 193 27 189 32 186 34 180 42 176 46 170 49 164 55 153 61 137 92 114 94 105 195
21 192 26 187 34 185 42 181 48 179 55 176 61 170 79 164 91 153 93 138 105 130 112 195 21 193 25 187 32 184 34 181 40 177 48 176 55 172 61 169 81 164 91 152 93 138 109 132 195 24 190 32
186 34 183 39 181 47 177 55 176 61 172 81 169 91 163 93 152 124 137 131 194 32 189 35 186 39 183 47 181 55 176 61 168 71 163 82 152 86 137 91 130 92 122 94 195 34 194 39 188 44 185 47
182 55 180 61 176 69 168 82 162 88 152 91 136 92 129 94 121 196 21 194 35 187 39 185 43 182 48 180 55 175 61 168 68 152 82 135 88 127 90 120 91 94 197 16 194 22 187 30 184 35 182 39 180
42 175 49 167 53 160 55 152 61 134 67 126 78 119 82 93 83 91 88 90 197 14 194 22 186 29 184 34 181 42 167 53 159 55 152 61 133 66 125 75 118 79 93 83 91 88 90 194 13 186 22 183 28 181 41
167 50 159 51 153 55 131 61 123 66 118 72 93 74 92 80 91 82 88 194 13 185 22 183 28 180 41 167 47 158 51 154 56 129 61 121 65 117 71 92 73 90 81 88 194 13 185 22 182 27 180 40 167 46 127
51 119 56 116 61 92 65 90 70 87 73 194 13 184 21 181 27 179 40 167 46 126 51 117 56 92 61 90 65 87 70 73 194 14 183 20 181 27 167 41 125 46 115 54 92 56 90 61 86 65 73 70 194 19 183 27
180 42 168 49 124 56 112 61 91 65 90 68 86 70 74 194 27 185 39 182 45 180 56 168 61 123 65 91 72 90 75 85 194 27 185 38 182 44 179 56 169 61 122 65 91 83 89 195 28 193 37 185 43 184 56
181 61 179 65 170 81 134 81 122 89 91 196 25 191 28 185 37 183 43 181 57 171 61 135 65 130 82 128 91 122 195 24 191 30 183 36 181 42 173 57 135 60 128 66 124 77 121 83 91 191 24 183 36
180 42 175 57 158 60 135 68 128 75 123 78 91 83 190 23 185 34 182 36 180 42 158 57 155 60 135 73 122 78 91 84 190 23 184 30 182 36 179 42 158 56 154 60 135 70 121 79 91 85 191 23 178 30
153 36 134 43 91 56 85 60 80 196 23 191 30 180 36 153 43 134 60 91 81 86 197 23 191 30 181 36 152 44 133 55 91 60 87 81 197 23 192 30 190 37 183 52 176 60 157 82 152 87 132 91 196 23 189
32 180 38 175 43 157 50 153 53 131 61 92 83 88 187 23 182 36 179 39 178 43 157 54 154 62 130 83 92 88 187 24 181 41 179 43 177 54 165 59 155 63 146 84 129 89 187 25 184 31 179 43 177 53
166 55 148 63 128 69 90 85 187 26 183 32 180 37 166 37 161 44 148 52 140 57 127 63 90 66 85 70 190 31 187 37 181 45 166 51 160 55 148 57 139 63 126 65 91 71 86 190 31 188 36 179 50 165
54 162 58 148 62 138 64 124 71 91 76 86 190 36 179 50 163 54 159 61 148 64 138 71 122 74 92 77 87 179 31 177 34 164 35 158 49 147 54 137 59 115 64 109 68 92 71 88 73 77 179 30 176 35 164
39 158 50 147 54 136 59 132 66 117 70 111 73 108 76 93 80 88 179 29 164 35 157 39 146 43 136 47 133 51 119 60 109 68 93 75 89 80 179 29 168 35 163 39 157 42 145 46 135 54 133 60 130 66
121 74 107 79 94 89 179 30 168 36 163 42 160 46 157 51 144 53 134 61 129 66 123 74 106 90 95 179 30 168 37 165 42 163 46 162 50 156 52 143 61 133 67 128 73 95 90 179 31 168 42 164 50 162
52 156 61 132 68 96 73 91 180 36 168 38 164 42 162 52 156 60 147 72 96 91 182 38 171 42 164 52 161 60 156 92 150 97 184 38 173 42 164 49 161 53 157 58 151 92 142 97 185 39 175 41 170 43
163 49 159 51 152 58 149 72 97 93 186 39 177 41 167 48 163 51 152 54 148 58 98 78 94 187 40 180 48 163 51 152 54 147 57 139 69 98 81 94 188 41 181 48 178 53 165 57 163 64 152 83 149 94
147 99 139 188 41 183 48 178 53 165 57 163 61 152 85 148 95 146 99 140 189 50 184 53 178 57 166 60 163 84 152 87 148 95 145 100 189 40 184 45 178 49 167 53 162 58 152 82 147 85 144 89
100 96 190 41 183 49 178 52 164 57 162 82 151 85 147 91 120 96 100 190 42 183 52 178 56 171 69 164 83 162 86 151 92 146 96 135 101 123 115 190 42 183 51 178 55 173 65 164 69 161 83 151
87 145 94 135 96 126 101 114 190 43 184 51 179 55 179 64 171 70 165 83 161 88 150 95 144 97 133 101 129 113 190 43 184 50 180 55 168 63 161 69 150 75 143 84 132 89 114 97 102 190 44 185
49 179 54 172 63 165 69 160 71 149 75 142 85 130 90 117 97 102 190 44 185 53 179 63 176 68 166 70 160 75 149 86 140 91 128 98 119 102 190 45 186 52 179 66 176 71 165 75 159 87 148 92 139
98 126 103 189 46 180 52 175 74 165 88 158 93 148 98 137 103 123 188 51 181 62 174 89 169 94 166 98 165 105 155 136 147 181 49 165 60 149 62 134 90 108 95 103 98 181 62 176 91 171 99 164
103 148 113 132 181 92 175 99 164 103 147 129 181 93 174 99 164 103 146 125 181 94 179 98 174 103 171 145 164 182 95 179 103 174 138 164 145 182 97 179 103 174 138 164 144 182 99 179 103
174 137 165 144 182 102 179 136 174 143 166 182 135 179 143 177 166 174 169 182 126 179 134 175 167 171 183 119 179 133 177 166 174 183 116 179 129 176 132 174 164 166 183 114 180 130
175 164 167 184 113 180 129 174 164 184 112 180 127 174 164 172 185 126 180 164 174 185 110 181 122 174 163 186 163 181 174 186 163 181 174 177 186 163 185 168 182 175 186 163 185 175
182 187 164 185 175 182 187 164 182 175 187 165 182 175 187 163 183 167 175 183 162 180 171 176 183 162 179 184 162 175 184 163 175 184 164 175 174 184 165 176 174 184 166 176 173 183
167 176 173 182 169 176 173 180 170 174 177 174 174
)
(list 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251
251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251
251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251
251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251
251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251
251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251
251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251
251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251
251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251
251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251
251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251
251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251
251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251
251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251
251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251
251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251
251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251
251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251
251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251
251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251
251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251
251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251
251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251
251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251
251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251
251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251
251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251
251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251
251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251
251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251
251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251
251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251
251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251
251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251
251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251
251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251
251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251
251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251
251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251
251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251
251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251
251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251
251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251
251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251
251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251
251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251
251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251
251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251
251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251
251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251
251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251
251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251
251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251
251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251
251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251
251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251
251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251
251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251
251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251
251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251
251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251
251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251
251 251 251 251 251
)
);mapcar
)
(defun MakeDCL_Acerca_de ( / FichDlg FullName line)
(setq NameDlg "$Acerca_de$.dcl")
;;Escribimos el cuadro de dialogo en un fichero del directorio temporal
(setq FullName (strcat (getvar "TEMPPREFIX") NameDlg))
(setq FichDlg (open FullName "w"))
(foreach line
'(
"ctxt0 : text"
"{"
" width = 20;"
" fixed_width = true;"
" alignment = right;"
"}"
"ctxt1 : text"
"{"
" width = 50;"
" fixed_width = true;"
" alignment = centered;"
"}"
"//--------------------------------------------"
"//Cuadro de dialogo de informacion Acerca de.."
"//--------------------------------------------"
"Acerca_de : dialog"
"{"
" label = \"Acerca de..\" ;"
" spacer;"
" : image"
" {"
" key = \"LogoText\";"
" width = 45;"
" fixed_width = true;"
" alignment = centered;"
" height = 1.5 ;"
" fixed_width = true ;"
" color = dialog_background ;"
" }"
" : image"
" {"
" key = \"LogoMarmita\";"
" width = 41.59;"
" fixed_width = true;"
" alignment = centered;"
" height = 19.20 ;"
" fixed_width = true ;"
" color = dialog_background ;"
" }"
" spacer;"
" : row"
" {"
" fixed_height = true ;"
" : column"
" {"
" : button"
" {"
" fixed_width = true ;"
" key = \"btnContact\" ;"
" label = \"Contacto\" ;"
" width = 20 ;"
" alignment = bottom;"
" }"
" : button"
" {"
" fixed_width = true ;"
" is_cancel = true ;"
" is_default = true ;"
" key = \"btnOK\" ;"
" label = \"Salir\" ;"
" width = 20 ;"
" height = 2.5 ;"
" alignment = bottom;"
" }"
" }"
" : column"
" {"
" fixed_height = true ;"
" : ctxt0 {label = \"La Marmita ® \";}"
" : ctxt0 {key = \"InfoApp1\";}"
" : ctxt0 {label = \"All Right Reserved \";}"
" }"
" }"
"}"
" "
"AcercaDeJose : dialog {"
" label = \"Contacto..\" ;"
" : image"
" {"
" key = \"LogoPano\";"
" width = 41.59;"
" fixed_width = true;"
" alignment = centered;"
" height = 19.20 ;"
" fixed_width = true ;"
" color = dialog_background ;"
" }"
" : column"
" {"
" : ctxt1 {label = \" Josי Luis Garcםa Galבn \";}"
" spacer;"
" : ctxt1 {label = \" Piedralaves. (Avila). \";}"
" : ctxt1 {label = \" 05440 Espaסa (Spain). \";}"
" : ctxt1 {label = \" e-mail: joselggalan@gmail.com \";}"
" }"
" spacer;"
" : image_button"
" {"
" width = 40 ;"
" key = \"imgInfo2\" ;"
" is_tab_stop = false ;"
" height = 1.5 ;"
" fixed_width = true ;"
" color = dialog_background ;"
" alignment = centered;"
" action = \"(startapp \\\"explorer\\\" \\\"http://www.hispacad.com\\\")\";"
" }"
" : image_button"
" {"
" width = 40 ;"
" key = \"imgInfo2b\" ;"
" is_tab_stop = false ;"
" height = 1.5 ;"
" fixed_width = true ;"
" color = dialog_background ;"
" alignment = centered;"
" action = \"(startapp \\\"explorer\\\" \\\"http://lamarmitadelcad.blogspot.com.es\\\")\";"
" }"
" spacer;"
" : button {"
" alignment = centered ;"
" fixed_width = true ;"
" is_cancel = true ;"
" is_default = true ;"
" key = \"btnOK\" ;"
" label = \"Aceptar\" ;"
" width = 8 ;"
" }"
" spacer;"
"}"
)
(write-line line FichDlg)
);c.foreach
(close FichDlg)
FullName
);c.defun

;;________________________________________________________________________________________
;;Cuadro de dialogo oculto
;; Informaciףn oculta
(defun AcercaDeJose ()
(new_dialog "AcercaDeJose" DCL_IDX)
(do_img_logo 3)
(set_tile "imgInfo2" " hispacad.com" )
(set_tile "imgInfo2b" " lamarmitadelcad.blogspot.com.es")
(action_tile "accept" "(done_dialog 1)")
(start_dialog)
(princ)
) ;c.defun

;-------------------- Main ----------------------------------------------------------------------
(if (> (setq DCL_IDX (load_dialog (MakeDCL_Acerca_de))) 0)
(progn
(if (new_dialog "Acerca_de" DCL_IDX)
(progn
(do_img_logo 2) ;;Log LaMarmita
(set_tile "InfoApp1" (strcat "© 2013 - " (menucmd "m=$(edtime,$(getvar,DATE),YYYY)") " "))
(LogoText)
(end_image)
(action_tile "accept" "(done_dialog 1)")
(action_tile "btnContact" "(AcercaDeJose)")
(start_dialog)
);c.progn
(alert "No se puede Mostrar Informaciףn")
) ; end if new dialog
(unload_dialog DCL_IDX)
);c.prg
;(alert "No se Puede Abrir Acerca_de.DCL")
)
(princ)
)

(princ)
;|«Visual LISP© Format Options»
(200 1 40 2 nil "end of " 60 9 0 0 1 T T nil T)
;*** NO aסadir texto a continuaciףn del comentario! ***|;

;;********************************* C:Nivel_P ******************************************;;
;;Revisiones: ;;
;; Versiףn 2.0.0 (LaMarmita) ;;
;; Josי Luis Garcםa Galבn 06/12/15 ;;
;; Versiףn 1.0.0 ;;
;; Josי Luis Garcםa Galבn 11/11/08 ;;
;; ;;
;;PROGRAMA DE INSERCION DE COTA DE ALTURAS PARA SECCIONES ;;
;;**************************************************************************************;;

(defun C:Nv (/ ;|registro|; TIPOATT NOATT ESCHTXT EDITINS
;|locales|; ac:err p1 NewInsBlk isMText
;|funciones|; ins_Nivel_Pl Make_Nivel_Pl GetVal_Reg_Nivel_P Nivel_P_DLG
)

;;--------------------------------- GetVal_Reg_Nivel_P ---------------------------------------
;;Datos de usuario para el programa Nivel_P obtenidos y guardados en el registro de Windows
;; (mapcar (function (lambda (x) (set (read (car x)) (cadr x)))) (GetVal_Reg_Nivel_P))
;;--------------------------------------------------------------------------------------------
(defun GetVal_Reg_Nivel_P ( / LisVal RetVal lis_fle)
(setq LisVal (list ;;'("MinHoja" "0.35" t) ;;Force Write
'("TipoAtt" "Att_ML")
'("NoAtt" 1)
'("EscHTxt" "1.0000")
'("EditIns" "0")
))
;;(("TipoAtt" "Att_ML") ("NoAtt" 1) ("EscHTxt" "1.0000") ("EditIns" "0"))
(setq RetVal (jlgg-GetVal_Reg_Command LisVal "Niveles_P"))
);c.defun

;;-------------------------------------------------------------------------------------------
;; Cuadro de dialogo de opciones para cotas de altura en planta
;;-------------------------------------------------------------------------------------------
(defun Nivel_P_DLG (/ ;|Registro|; TIPOATT NOATT ESCHTXT EDITINS
;|Locales|; FichDlg idxDlg accion
;|Funciones|; WriteDialogNivel_P Nivel_P_Ok Do_Chg_Tipo do_testnum)

;;---------------------------------- WriteDialogNivel_P -----------------------------------
;; Definir archivo de cuadro de dialogo
;;-----------------------------------------------------------------------------------------
(DEFUN WriteDialogNivel_P ( / dir FichDlg openFile)
(setq dir (getvar "TEMPPREFIX"))
(setq FichDlg (strcat dir "$Nivel_P$.dcl"))
(cond
;;(T ;;Forzar reescribir el cuadro (programando)
((null (findfile FichDlg))
(setq openFile (open FichDlg "w"))
(write-line "// ---------------------------------------------------------------" openFile)
(write-line "// COORDINATE dialog box " openFile)
(write-line "// ---------------------------------------------------------------" openFile)
(write-line "Nivel_P : dialog {" openFile)
(write-line " fixed_width = true;" openFile)
(write-line " fixed_height = true;" openFile)
(write-line " label = \"Insert Ground Symbol\";" openFile)
(write-line " : boxed_row {" openFile)
(write-line " fixed_height = false;" openFile)
(write-line " fixed_width=true;" openFile)
(write-line " label = \"Number of Attributes\";" openFile)
(write-line " : column {" openFile)
(write-line "\t fixed_height = true;" openFile)
(write-line "\t fixed_width=true;" openFile)
(write-line " : image {" openFile)
(write-line "\t key = \"img_cota\";" openFile)
(write-line " width = 15;" openFile)
(write-line " fixed_width=true;" openFile)
(write-line " fixed_height = true;" openFile)
(write-line "\t //color = graphics_foreground;" openFile)
(write-line "\t color = dialog_background;" openFile)
(write-line "\t aspect_ratio = 0.5;" openFile)
(write-line "\t }" openFile)
(write-line "\t : spacer {height = 1;}" openFile)
(write-line "\t}" openFile)
(write-line "\t: spacer {width=1;}" openFile)
(write-line "\t: radio_column {" openFile)
(write-line "\t fixed_height = true;" openFile)
(write-line "\t fixed_width=true;" openFile)
(write-line "\t key = \"tipo_att\";" openFile)
(write-line "\t : radio_button {label = \"MText\"; key = \"Att_ML\";}" openFile)
(write-line "\t : radio_button {label = \"Number of Attributes:\"; key = \"Att_M\";}" openFile)
(write-line "\t : row { fixed_width=true;" openFile)
(write-line "\t : spacer {width=2;}" openFile)
(write-line "\t : text_part {label = \"N÷:\"; key=\"Nro\";}" openFile)
(write-line "\t : slider {" openFile)
(write-line " //layout = vertical;" openFile)
(write-line " min_value=1;" openFile)
(write-line " max_value=10;" openFile)
(write-line " small_increment=1;" openFile)
(write-line " width=15;" openFile)
(write-line " fixed_width=true;" openFile)
(write-line " alignment = bottom;" openFile)
(write-line " key=\"n_att\";" openFile)
(write-line " }" openFile)
(write-line " : text {width=3; key=\"natt_txt\";}" openFile)
(write-line "\t }" openFile)
(write-line " }//c.radio_column" openFile)
(write-line " }//c.boxed_column" openFile)
(write-line " : column {" openFile)
(write-line " fixed_width = true;" openFile)
(write-line " fixed_height = true;" openFile)
(write-line " : edit_box {" openFile)
(write-line " fixed_width = true;" openFile)
(write-line " label = \"&Text Height:\";" openFile)
(write-line " key = \"EscHtxt\";" openFile)
(write-line " edit_width = 10;" openFile)
(write-line " value = \"1.0\";" openFile)
(write-line " }" openFile)
(write-line " : toggle {label = \"&Edit the Insert\"; key = \"edit\";}" openFile)
(write-line " }" openFile)
(write-line " spacer_1;" openFile)
(write-line " ok_cancel_err;" openFile)
(write-line "}" openFile)
(close openFile)
)
);c.cond
FichDlg
);c.defun

;;_______________________________________________________________________________
(defun Nivel_P_Ok()
(cond
((not (do_testnum "EscHtxt" "Text Height " 6)))
(t (setq p_dia_Nivel_P (done_dialog 1)))
);c.cond
);c.defun

;;________________________________________________________________________________
;; accion de chequeo de numeros
(defun do_testnum ( ll mens cod / r)
(if (setq r (jlgg-test_numr (set (read ll) (get_tile ll)) mens cod)) ; si es valida
(progn
(set_tile "error" "")
(set_tile ll (jlgg-rtos r nil 4))
(set (read ll) r)
);c.prg
(progn
(mode_tile ll 2)(mode_tile ll 3)
nil
);c.prg
);c.if
);c.defun

;;____________________________________________________________________________
;;Cambio de imagen de tipo de atributo
(defun Do_Chg_Tipo (/ long alto modeT)
(setq modeT (cond
((= TipoAtt "Att_ML") 1)
((= TipoAtt "Att_M" ) 0)
)
)
(mapcar (function (lambda (key) (mode_tile key modeT)))(list "Nro" "natt_txt" "n_att"))
(start_image "img_cota")
(setq long (dimx_tile "img_cota")
alto (dimy_tile "img_cota")
)
(fill_image 0 0 long alto -2)
(if (boundp (read (strcat "vectors_" TipoAtt )))
(eval (read (strcat "(vectors_" TipoAtt ")")))
);c.if
(end_image)
);c.defun
;;______________________________________________________________________________________
;;Vectores de imagen creados con el programa GetVectors (directorio DCL de programaciףn)
;;Rectangulo 90x45 (ver dibujo "Dibujo 25-11-07.dwg" en el mismo directorio)
;;Imagen del simbolo Att_M
(defun vectors_Att_M ()
(mapcar 'vector_image; Color 251
(list 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24)
(list 32 32 32 32 32 32 32 24 24 25 25 26 26 28 30)
(list 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24)
(list 34 36 37 38 38 39 39 32 32 32 32 32 32 32 32)
(list 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251)
);mapcar
(mapcar 'vector_image; Color 7
(list 66 67 67 68 69 71 71 72 71 71 70 69 69 67 52 52 53 54 55 56 56 56 55 54 53 52 52 52 49 48 48 49 49 48 45 45 44 44 44 38 41 40 39 39 32 34 31 66 66 70 71 71 71 71 70 68 68 67 67 67 52 52 53 54 55 56 56 56 55 54 53 52 52 52 49 48 48 49 49 48 45 45 44 44 44 38 41 40 39 39 32 34 31 69 68 68 52 52 53 54 55 56 56 56 55 54 53 52 52 52 49 48 48 49 49 48 45 45 44 44 44 38 41 40 39 39 32 34 31 6 17 24 23 22 21 19 17 15 13 12 11 10 10 10 10 11 12 13 15 17 19 21 22 23 24)
(list 10 11 11 11 11 10 10 8 7 7 6 6 6 3 10 11 11 11 11 9 8 7 6 6 6 6 6 3 6 4 4 3 4 4 6 6 7 7 6 6 11 11 10 3 9 3 11 23 23 19 17 16 16 15 15 15 15 16 16 16 22 23 23 23 23 21 20 19 18 18 18 18 18 15 18 15 15 15 15 15 18 18 19 19 18 18 23 23 21 15 20 15 23 26 28 28 33 34 34 34 34 32 31 30 29 29 29 29 29 26 29 27 27 26 27 27 29 29 30 30 29 29 34 34 33 26 32 26 34 32 21 30 28 26 25 25 24 25 25 26 28 30 30 32 33 35 37 38 39 39 39 38 37 35 32)
(list 67 67 68 69 71 71 72 72 72 71 71 70 71 71 52 53 54 55 56 56 56 56 56 55 54 53 52 52 49 48 49 49 49 49 47 45 45 44 44 41 41 41 40 39 36 37 34 72 70 71 71 71 71 71 71 70 68 68 67 67 52 53 54 55 56 56 56 56 56 55 54 53 52 52 49 48 49 49 49 49 47 45 45 44 44 41 41 41 40 39 36 37 34 69 69 68 52 53 54 55 56 56 56 56 56 55 54 53 52 52 49 48 49 49 49 49 47 45 45 44 44 41 41 41 40 39 36 37 34 28 17 24 24 23 22 21 19 17 15 13 12 11 10 10 11 12 13 15 17 19 21 22 23 24 24)
(list 11 11 11 11 11 11 9 9 8 7 7 6 3 3 11 11 11 11 10 10 9 8 7 6 6 6 7 11 11 4 3 4 4 4 6 6 6 8 11 6 11 11 11 10 9 11 3 23 19 18 18 17 16 16 15 15 15 15 16 17 23 23 23 23 22 22 21 20 19 18 18 18 19 23 23 15 15 15 16 16 18 18 18 20 23 18 23 23 23 21 20 23 15 34 26 28 34 34 34 34 33 33 32 31 30 29 29 29 30 34 34 27 26 27 27 27 29 29 29 31 34 29 34 34 34 33 32 34 26 32 42 32 30 28 26 25 25 24 25 25 26 28 32 33 35 37 38 39 39 39 38 37 35 33 33)
(list 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250)
);mapcar
)
;;Imagen del simbolo Att_ML
(defun vectors_Att_ML ()
(mapcar 'vector_image; Color 251
(list 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24)
(list 29 29 29 29 29 29 29 22 22 22 22 23 24 25 28)
(list 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24)
(list 31 33 34 35 35 36 36 29 29 29 29 29 29 29 29)
(list 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251)
);mapcar
(mapcar 'vector_image; Color 7
(list 58 58 59 60 61 61 61 60 59 58 57 56 56 56 56 56 57 51 53 53 52 52 45 45 42 41 40 39 39 38 38 38 39 39 40 41 42 42 43 38 31 34 73 72 71 70 70 69 69 69 70 70 71 72 73 74 74 69 67 59 60 61 62 63 64 64 64 63 62 61 60 59 59 56 56 56 51 53 53 52 52 49 46 45 44 43 42 42 42 39 35 32 32 6 17 24 23 22 21 19 17 15 13 12 11 10 10 10 10 11 12 13 15 17 19 21 22 23 24)
(list 10 10 10 10 11 12 13 15 15 15 15 14 13 12 11 11 10 10 15 15 14 7 15 10 15 15 15 15 14 13 12 12 10 10 10 10 10 11 11 12 7 7 26 27 27 26 25 24 24 24 22 22 21 21 22 22 23 24 19 25 26 27 27 26 24 24 22 22 21 21 22 22 21 22 19 19 21 27 26 25 19 19 21 26 27 27 26 25 21 19 27 19 19 29 18 27 25 24 23 22 22 22 23 24 25 27 27 29 31 32 34 35 36 36 36 35 34 32 29)
(list 58 59 60 61 61 61 61 61 60 59 58 57 56 56 56 57 58 54 54 53 53 52 49 49 43 42 41 40 39 39 38 39 39 40 41 42 42 43 43 43 37 34 74 73 72 71 70 70 69 70 70 71 72 73 74 74 74 74 67 60 61 62 63 64 64 64 64 64 63 62 61 60 59 56 57 56 54 54 53 53 52 49 46 46 45 44 43 42 42 39 39 35 32 28 17 24 24 23 22 21 19 17 15 13 12 11 10 10 11 12 13 15 17 19 21 22 23 24 24)
(list 10 10 10 11 12 13 14 14 15 15 15 15 14 13 12 10 10 10 15 15 15 14 10 15 14 15 15 15 15 14 13 11 11 10 10 10 11 11 12 12 7 15 25 26 27 27 26 25 24 22 22 21 21 22 22 23 24 24 27 26 27 27 26 25 25 24 24 22 22 21 21 22 29 27 19 19 21 27 27 26 25 27 27 25 26 27 27 26 25 27 19 27 27 29 40 29 27 25 24 23 22 22 22 23 24 25 29 31 32 34 35 36 36 36 35 34 32 31 31)
(list 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250 250)
);mapcar
)

;;----------------------------- MAIN ----------------------------------------------------------------
;;Valores guardados en registro:
;;(("TipoAtt" "Att_ML") ("NoAtt" 1) ("EscHTxt" "1.0000") ("EditIns" "0"))
(mapcar (function (lambda (x) (set (read (car x)) (cadr x)))) (GetVal_Reg_Nivel_P))
(setq NoAtt (itoa NoAtt))
(setq EscHTxt (jlgg-rtos (read EscHTxt) nil nil))
;;Carga el fichero de dialogo
(if (null p_dia_Nivel_P)(setq p_dia_Nivel_P '(-1 -1)))
(setq FichDlg (WriteDialogNivel_P))
(setq idxDlg (load_dialog FichDlg))
(setq accion T)

;;cargar el cuadro de dialogo en pantalla
(if (not (new_dialog "Nivel_P" idxDlg "" p_dia_Nivel_P)) (exit))

;;asignaciones de cuadro de dialogo
(set_tile "tipo_att" TipoAtt)
(set_tile "EscHtxt" EscHTxt)
(set_tile "n_att" NoAtt) ;slider
(set_tile "natt_txt" NoAtt)
(set_tile "edit" EditIns)
(Do_Chg_Tipo) ;visualiza el tipo de cota
;;
;;acciones de cuadro de dialogo
(action_tile "Att_M" "(setq TipoAtt $key)(Do_Chg_Tipo)")
(action_tile "Att_ML" "(setq TipoAtt $key)(Do_Chg_Tipo)")
(action_tile "EscHtxt" "(do_testnum $key \"Text Height \" 6)")
(action_tile "n_att" "(setq NoAtt $value)(set_tile \"natt_txt\" NoAtt)")
(action_tile "edit" "(setq EditIns $value)")
(action_tile "cancel" "(setq p_dia_Nivel_P (done_dialog 0))")
(action_tile "accept" "(Nivel_P_Ok)")
;;--------------------------------------------------------
(setq accion (start_dialog)) ; activa el c. de dialogo

(cond ; Decide what to do next.
((= accion 0) ;si cancel es seסalado
(unload_dialog idxDlg)
(setq retVal nil)
);c.cond de accion 0
((= accion 1)
(unload_dialog idxDlg)
;;(("TipoAtt" "Att_ML") ("NoAtt" 1) ("EscHTxt" "1.0000") ("EditIns" "0"))
(jlgg-Write-Registry-Command "Niveles_P" "TipoAtt" TipoAtt)
(jlgg-Write-Registry-Command "Niveles_P" "NoAtt" (atoi NoAtt))
(jlgg-Write-Registry-Command "Niveles_P" "EditIns" EditIns)
(jlgg-Write-Registry-Command "Niveles_P" "EscHTxt" (jlgg-rtos EscHTxt nil 32))
(setq retVal T)
)
);c.cond
retVal
);c.defun

;;-------------------------------------- ins_Nivel_Pl -----------------------------------
;; Diseסado para no usar la orden "INSERT" y las variables de insercion de atributos
;; ("ATTDIA" y ATTREQ")
;;---------------------------------------------------------------------------------------
(defun ins_Nivel_Pl (p_i esc n_attr isMultiline / n p_att NewBlCota Txt1 UCSAngX Inspt oAtt)
(defun UCSAngX ( / vec)
(setq vec (getvar "ucsxdir"))
(atan (cadr vec) (car vec))
);c.defun
;------------------------ MAIN ------------------------------------------
(if isMultiline
(setq n_attr 1
Txt1 "Multi Line \\PText ")
(setq Txt1 "Atrib ")
)
(setq p_att (polar p_i 0.0 (* esc 1.75)))
(setq p_i (trans p_i 1 0) n 1)
;creaciףn del bloque
(ENTMAKE (list '(0 . "INSERT")'(2 . "Nivel_Pl")'(66 . 1)
(cons 8 "ARQ_Niveles")
(cons 41 esc)(cons 42 esc)(cons 43 esc)
(cons 50 (UCSAngX))
(cons 10 p_i)

)
);c.entmake
(repeat n_attr
(ENTMAKE
(list '(0 . "ATTRIB")'(62 . 0) ;atributo de Cota N
(cons 40 esc)
(cons 1 (if isMultiline Txt1 (strcat Txt1 (itoa n)))) ;cadena valor
(cons 8 "ARQ_Niveles")
(cons 50 (UCSAngX))
(cons 2 (strcat "COTALT_" (itoa n)))
(cons 7 (getvar "TEXTSTYLE"))
'(70 . 8)
'(72 . 0)
'(74 . 1)
'(10 0 0 0)
;;(cons 10 (trans p_att 1 0)) ;p_insert
(cons 11 (trans p_att 1 0)) ;p_insert 2
);c.ilst
);c.entmake
(setq p_att (polar p_att (/ pi 2) (* esc 1.5)) n (1+ n))
);c.repeat
(cond
((setq NewBlCota (ENTMAKEX '((0 . "SEQEND")(8 . "ARQ_Niveles"))))
(setq NewBlCota (cdr (assoc -2 (entget NewBlCota))))
(cond
(isMultiline
(setq oAtt (entnext NewBlCota))
(setq oAtt (GETVLA-OBJ oAtt))
(setq Inspt (vla-get-InsertionPoint oAtt))
(vla-put-MTextAttribute oAtt :vlax-true)
(vla-put-Alignment oAtt 12) ;;acAlignmentBottomLeft = 12
(vla-put-TextAlignmentPoint oAtt Inspt)
;;(vla-put-StyleName oAtt (getvar "TEXTSTYLE"))
)
);c.cond
)
);c.if
NewBlCota
);c.defun

;;----------------------------------- Make_Nivel_Pl ---------------------------------------
;; Definicion de bloque Nivel_Pl
;;-----------------------------------------------------------------------------------------
(defun Make_Nivel_Pl ()
(entmake '((0 . "BLOCK") (2 . "Nivel_Pl") (10 0.0 0.0 0.0) (70 . 2))) ;c.entmake
(entmake
(LIST
'(0 . "HATCH") '(100 . "AcDbEntity") '(67 . 0) '(8 . "0") '(62 . 251)
'(100 . "AcDbHatch") '(10 0.0 0.0 0.0) '(210 0.0 0.0 1.0) '(2 . "SOLID")
'(70 . 1) '(71 . 0) '(91 . 2) '(92 . 7) '(72 . 1) '(73 . 1) '(93 . 4)
'(10 -2.22045e-016 0.9 0.0) '(42 . 0.0) '(10 0.0 0.0 0.0)
'(42 . 0.0) '(10 0.9 -3.88578e-016 0.0) '(42 . 0.198912) '(10 0.636396 0.636396 0.0)
'(42 . 0.198912) '(97 . 0) '(92 . 7) '(72 . 1) '(73 . 1) '(93 . 4) '(10 0.0 0.0 0.0)
'(42 . 0.0) '(10 -0.9 3.88578e-016 0.0) '(42 . 0.198912) '(10 -0.636396 -0.636396 0.0)
'(42 . 0.198912) '(10 2.22045e-016 -0.9 0.0) '(42 . 0.0) '(97 . 0) '(75 . 0) '(76 . 1)
'(47 . 0.00731585) '(98 . 2) '(10 0.142244 0.417573 0.0) '(10 -0.266862 -0.281226 0.0)
'(450 . 0) '(451 . 0) '(460 . 0.0) '(461 . 0.0) '(452 . 0) '(462 . 0.0) '(453 . 2) '(463 . 0.0)
'(63 . 5) '(421 . 255) '(463 . 1.0) '(63 . 2) '(421 . 16776960) '(470 . "LINEAR")
) ;_ c. list
) ;c.entmake
(entmake
(list
'(0 . "CIRCLE") '(100 . "AcDbEntity") '(67 . 0) '(8 . "0") '(62 . 0)
'(100 . "AcDbCircle") '(10 0.0 0.0 0.0) '(40 . 0.9) '(210 0.0 0.0 1.0)
) ;_ c. list
) ;c.entmake
(entmake
(list
'(0 . "LINE") '(100 . "AcDbEntity") '(67 . 0) '(8 . "0") '(62 . 0)
'(100 . "AcDbLine") '(10 1.34401 -1.11022e-016 0.0) '(11 -1.34401 -5.55112e-016 0.0)
'(210 0.0 0.0 1.0)
) ;_ c. list
) ;c.entmake
(entmake
(list
'(0 . "LINE") '(100 . "AcDbEntity") '(67 . 0) '(8 . "0") '(62 . 0)
'(100 . "AcDbLine") '(10 -7.77156e-016 -1.34401 0.0) '(11 1.11022e-016 1.34401 0.0)
'(210 0.0 0.0 1.0)
) ;_ c. list
) ;c.entmake
(entmake '((0 . "ENDBLK"))) ;c.entmake
;------ FIN de Definicion de bloque Nivel_Pl -------;
);c.defun

;;------------------------- MAIN ------------------------
(vl-doc-set '*NameAppRun* "Niveles_P")
(setq ac:err *error* *error* LMT:error)
(jlgg-init_vars (list
'("attdia" 0)
'("attreq" 1)
'("cmdecho" 0)
'("snapmode" 0)
)
)
;;Valores guardados en registro:
;;(("TipoAtt" "Att_ML") ("NoAtt" 1) ("EscHTxt" "1.0000") ("EditIns" "0"))
(mapcar (function (lambda (x) (set (read (car x)) (cadr x)))) (GetVal_Reg_Nivel_P))
;----------------------------------------------
(setq p1 T)
(while p1
;Si no existe el bloque en el dibujo lo creamos
(if (null (tblsearch "BLOCK" "Nivel_Pl"))(Make_Nivel_Pl))
(initget "Opciones")
(setq p1 (getpoint "\nSelect Level Point or [Options]: "))
(cond
((= (type p1) 'LIST)
(setq isMText (if (= TipoAtt "Att_ML") T nil))
(jlgg-UndoStart (jlgg-ActDoc))
;Insertamos el bloque de altura
(cond
((not
(vl-catch-all-error-p
(setq NewInsBlk
(vl-catch-all-apply
(function ins_Nivel_Pl)
(list p1 (read EscHTxt) NoAtt isMText)))))
;;Editamos despues de insertar si procede
(cond
((= EditIns "1")
(redraw NewInsBlk)
;;(command "_.DDATTE" NewInsBlk)
(vl-cmdf "_.EATTEDIT" NewInsBlk)
)
)
)
);c.cond
(jlgg-UndoEnd (jlgg-ActDoc))
)
((= p1 "Opciones")
(Nivel_P_DLG)
(mapcar (function (lambda (x) (set (read (car x)) (cadr x)))) (GetVal_Reg_Nivel_P))
)
);c.cond
);c.while
(jlgg-res_vars) ;restablece variables
(setq *error* ac:err ac:err nil)
(princ)
);cierro defun principal

(princ)
(c:nv)

Advertisements