Search the Community
Showing results for tags 'e06d7363'.
-
(*push-error-using-command*) generates Exception e06d7363
gerardo2m posted a topic in AutoLISP, Visual LISP & DCL
Hi. The following routine generates the exception e06d7363 when using (* push-error-using-command *). If I replace "myerror" (* push-error-using-command *) with (* push-error-using-stack *) and the "command" with "command-s", the exception is not generated; but when activating "myerror" the message is generated that indicates that I must use (* push-error-using-command *) or command-s. (defun test (a b / ) (entradaTest) ;;(*push-error-using-command*) (/ a b) (setq *DrawingGER* (vla-get-ActiveDocument (vlax-get-acad-object))) (setq LayersColeccion (vlax-get-property *DrawingGer* "Layers")) ;;Crea las layer necesarias para alojar las entidades del dibujo. (setq ListaLayers (list "Make_Tuberias" "Biseles" "3D_Perfil")) ;;Funcion: AX-EXISTE+. ;;Parametro "elemento" es una cadena con el nombre de elemento a buscar en una coleccion, ej (ax-existe+ "0" "LAYERS"). ;;Archivo iList.lsp (foreach X ListaLayers (if (not (ax-Existe+ X "Layers")) (vl-cmdf ".-layer" "New" X "T" X "")) ) (salidaTest) ;;(*pop-error-mode*) ) (defun myerror (s) (if (/= s "Function cancelled") (princ (strcat "\nError GER: " s)) ) (setvar "cecolor" color_org) (setvar "cvport" port_view_ger) (command "_vpoint" vpoint_ger) (command "_zoom" "W" MSMAX_GER MSMIN_GER) (setvar "clayer" clayer1) (setvar "INSUNITS" val_var_INSUNITS) (cmd-salir) (SETVAR "osmode" ref0) (setvar "3dosmode" 3DOSMODE_ORG) (setq *error* olderr) (command "_undo" "_end") (SETVAR "cmdecho" 1) (PRIN1) ) (defun entradaTest ( / ) (*push-error-using-command*) ;;(*push-error-using-stack*) (SETVAR "cmdecho" 0) (COMMAND "_undo" "_begin") (setq olderr *error* *error* myerror) (SETQ ref0 (GETVAR "osmode")) (SETVAR "osmode" 0) (setq 3DOSMODE_ORG (GETVAR "3dosmode")) (setvar "3dosmode" 0) (SETQ port_view_ger (getvar "cvport")) ;;(SETQ vpoint_ger (getvar "viewdir")) ;;(SETQ VSMAX_GER (getvar "vsmax")) ;;(SETQ VSMIN_GER (getvar "vsmin")) (setq val_var_INSUNITS (getvar "INSUNITS")) ;;(setvar "INSUNITS" 1) ;1 para pulgadas. (setq clayer1 (getvar "clayer")) (setvar "clayer" "0") (setq color_org (getvar "cecolor")) ) (defun salidaTest ( / ) (setvar "cecolor" color_org) ;;(setq *error* olderr) (setvar "cvport" port_view_ger) (command "_vpoint" vpoint_ger) (setvar "clayer" clayer1) (setvar "INSUNITS" val_var_INSUNITS) (SETVAR "osmode" ref0) (setvar "3dosmode" 3DOSMODE_ORG) (COMMAND "_undo" "_end") (setq *error* olderr) ; Restore old *error* handler (COMMAND "_undo" "_end") (SETVAR "cmdecho" 1) (*pop-error-mode*) (PRIN1) ) (defun AX-EXISTE+ (elemento coleccion / Colecciones temp X resultado *DrawingGER* Coleccion ) ;;Colecciones disponibles. (setq Colecciones (list "Blocks" "Dictionaries" "DimStyles" "FileDependencies" "Groups" "Layers" "Layouts" "LineTypes" "Materials" "ModelSpace" "PaperSpace" "PickFirstSelectionSet" "Plot" "PlotConfiguration" "Preferences" "RegisteredApplications" "SelectionSets" "SummaryInfo" "TextStyles" "UserCoordinatesSystems" "Utility" "Viewports" "Views") ) ;;Verifica si la coleccion existe en el documento actual. (setq temp nil) (foreach X Colecciones (if (equal (strcase coleccion) (strcase X)) (setq temp T)) ) (if temp (progn (setq *DrawingGER* (vla-get-ActiveDocument (vlax-get-acad-object))) ;;Obtiene el objeto DXF del dibujo actual. (setq Coleccion (vlax-get-property *DrawingGer* coleccion)) ;;Obtiene el objeto DXF de la Coleccion requerida, por ejemplo "Layers". (if (not (vl-catch-all-error-p (setq resultado (vl-catch-all-apply 'vla-item (list coleccion elemento))))) t nil) ) (progn (prompt (strcat "\n**(ax-Existe+) Nombre de coleccion \"" coleccion "\" no identificada.\n")) (princ) nil ) ) ) Any idea of the reason for the exception? Greetings.- 3 replies
-
- lisp
- (*push-error-using-command*)
-
(and 1 more)
Tagged with: