gabrielnvitor Posted June 1, 2011 Posted June 1, 2011 (edited) i'm from brazil and my code ocurred this error: Command: ; error: An error has occurred inside the *error* functionbad DXF group: (-3 ("DADOS1" (1000) (1040 . 1.0))) my code is: (defun w2condl1lr () (progn (setq setagens (getvar "OSMODE") ortogo (getvar "ORTHOMODE") eco (getvar "CMDECHO") layer (getvar "CLAYER") ) (w2layer) (setvar "CLAYER" "Condulete") (setvar "CMDECHO" 0) (setvar "OSMODE" 33) (setvar "ORTHOMODE" 1) (setq basec (getpoint "\nDefina a base do condulete: ")) (setq angulo (getangle "\nDefina seu ângulo: " basec)) (setvar "OSMODE" 0) (setq ladoe (polar basec (+ angulo pi) (* 0.235 escalac)) ladoc (polar basec (+ angulo ang90) (* 0.1 escalac)) ) (setq selecao (ssget ladoc)) (if (/= selecao nil) (progn (setq objeto (ssname selecao 0) props (entget objeto) cond1 (cdr (assoc 0 props)) cond2 (cdr (assoc 8 props)) ) (if (and (= cond1 "LINE") (or (= cond2 ellayer) (= cond2 ellayer2)) ) (command "break" objeto basec ladoc) ) ) ) (setq selecao (ssget ladoe)) (if (/= selecao nil) (progn (setq objeto (ssname selecao 0) props (entget objeto) cond1 (cdr (assoc 0 props)) cond2 (cdr (assoc 8 props)) ) (if (and (= cond1 "LINE") (or (= cond2 ellayer) (= cond2 ellayer2)) ) (command "break" objeto basec ladoe) ) ) ) (command "insert" "condl1lr" basec escalac "" (* grau angulo) ) (setq entidade (entlast)) (setq codigou ellayer) (setq entlst (entget entidade)) (setq lista_dados (list (cons 1000 codigou))) (setq pedacolst (cons "TIPO" lista_dados)) (setq entlst (append entlst (list (cons -3 (object pedacolst))))) (entmod entlst) (setvar "CLAYER" layer) (setvar "CMDECHO" eco) (setvar "OSMODE" setagens) (setvar "ORTHOMODE" ortogo) (warp) (limpa) (princ) ) ) Edited June 1, 2011 by gabrielnvitor Quote
Tiger Posted June 1, 2011 Posted June 1, 2011 I have changed the title of your thread, please use more descriptive titles in the future. I would also recommend that you wrap your Lisp in Code-tags ( (without the extra spaces) at the end) as it makes it more easy to read. 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.