GENARO PEREZ CHENG Posted July 25, 2023 Posted July 25, 2023 Encontré la rutina en la red y funcionaba bien, despues de varios años quise volver a usarla y ya no funciona (defun c:cs () (setvar "osmode" 0) (setvar "osmode" 32) ;(setvar "cmddia" 0) (if (= nil estac) (setq estac 0.00) (setq estac (+ estac 20.00))) (setq cad (strcat "Estacion?< " (rtos estac 2 2) ">:")) (setq estacion (getreal cad)) (if (/= estacion nil) ;(setq estac (+ 20 estac)) (setq estac estacion) ) (setq Pref (getpoint "\nPunto de referencia: ")) (SETQ pX(CAR pref) pY(CAR (CDR pref))) (SETQ Pto (GETPOINT "\nPunto para cero:")) (while (/= nil PTO) (SETQ X1(CAR pto) Y1(CAR (CDR pto))) (setq dist (- y1 py)) (command "-insert" "cero" pto "" "" "" (rtos estac 2 3) (rtos dist 2 3) ) (SETQ Pto (GETPOINT "\nNuevo Punto para cero:")) ) ;(setvar "cmddia" 1) ) Quote
fuccaro Posted July 25, 2023 Posted July 25, 2023 Our new friend complains that this Lisp doesn't work any more, after it worked well years ago. Quote
mhupp Posted July 25, 2023 Posted July 25, 2023 con las nuevas variables del sistema de instalación es lo más probable por qué no funciona ahora. Quote
devitg Posted July 25, 2023 Posted July 25, 2023 12 hours ago, GENARO PEREZ CHENG said: Encontré la rutina en la red y funcionaba bien, despues de varios años quise volver a usarla y ya no funciona (defun c:cs () (setvar "osmode" 0) (setvar "osmode" 32) ;(setvar "cmddia" 0) (if (= nil estac) (setq estac 0.00) (setq estac (+ estac 20.00))) (setq cad (strcat "Estacion?< " (rtos estac 2 2) ">:")) (setq estacion (getreal cad)) (if (/= estacion nil) ;(setq estac (+ 20 estac)) (setq estac estacion) ) (setq Pref (getpoint "\nPunto de referencia: ")) (SETQ pX(CAR pref) pY(CAR (CDR pref))) (SETQ Pto (GETPOINT "\nPunto para cero:")) (while (/= nil PTO) (SETQ X1(CAR pto) Y1(CAR (CDR pto))) (setq dist (- y1 py)) (command "-insert" "cero" pto "" "" "" (rtos estac 2 3) (rtos dist 2 3) ) (SETQ Pto (GETPOINT "\nNuevo Punto para cero:")) ) ;(setvar "cmddia" 1) ) @GENARO PEREZ CHENG Por favor sube el dwg donde aplicas el lisp y copia la pantalla de texto donde se ve el error. Quote
devitg Posted July 25, 2023 Posted July 25, 2023 Adjunto dwg y LSP que funcionan bien en mi ACAD 2019 pone-cero.lsp pone cero.dwg Quote
exceed Posted July 27, 2023 Posted July 27, 2023 (command "-insert" "cero"~~ In this statement, the cero block is inserted with the -insert function, it won't work if cero is not in the dwg's blocklist. I guess A few years ago you worked on a drawing with a block "cero", and now you're working on a drawing that doesn't have. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.