lisp don´t work

lisp don´t work

alexandre_benekowski
Advocate Advocate
947 Views
7 Replies
Message 1 of 8

lisp don´t work

alexandre_benekowski
Advocate
Advocate

Hi People!!!!!

 

someone could help me?!!!

 

My code don´t work!!

 

(defun c:DIAGRAMA ()

;GUARDAR INFORMAÇÕES......
(setq layer_atual (getvar "clayer"))
(setvar "OSMODE" 1)
;INSERINDO A CAIXA....
(command "-layer" "M" "F-VT-DIAGRAMA_CX" "C" "2" "" "")
(setq inicial (getpoint "\nCLIQUE NO PONTO DE INÍCIO DO PERFIL..."))
(setq final (getpoint "\nCLIQUE NO PONTO FINAL DO PERFIL..."))
(setq comprimento (rtos (car final)))


;ELABORAÇÃO DO DESENHO...
(setq local (getpoint "\nCLIQUE NO PONTO DE INSERÇÃO..."))
(command "_pline" local "@100<90" "comprimento<0" "@100<270" "c")

;FINALIZAÇÃO
(setvar "CLAYER" layer_atual)
(princ)
)

(prompt "\nLISP PARA ELABORAÇÃO DE DIAGRAMA DE BRUCKNER")

0 Likes
Accepted solutions (1)
948 Views
7 Replies
Replies (7)
Message 2 of 8

Anonymous
Not applicable

@alexandre_benekowskiwrote:

Hi People!!!!!

 

someone could help me?!!!

 

My code don´t work!!

 

(defun c:DIAGRAMA ()

;GUARDAR INFORMAÇÕES......
(setq layer_atual (getvar "clayer"))
(setvar "OSMODE" 1)
;INSERINDO A CAIXA....
(command "-layer" "M" "F-VT-DIAGRAMA_CX" "C" "2" "" "")
(setq inicial (getpoint "\nCLIQUE NO PONTO DE INÍCIO DO PERFIL..."))
(setq final (getpoint "\nCLIQUE NO PONTO FINAL DO PERFIL..."))
(setq comprimento (rtos (car final)))


;ELABORAÇÃO DO DESENHO...
(setq local (getpoint "\nCLIQUE NO PONTO DE INSERÇÃO..."))
(command "_pline" local "@100<90" "comprimento<0" "@100<270" "c")

;FINALIZAÇÃO
(setvar "CLAYER" layer_atual)
(princ)
)

(prompt "\nLISP PARA ELABORAÇÃO DE DIAGRAMA DE BRUCKNER")


 

Qual a intenção desse código ? 

0 Likes
Message 3 of 8

alexandre_benekowski
Advocate
Advocate

A principio é fazer um retângulo a partir do:

 

(setq final (getpoint "\nCLIQUE NO PONTO FINAL DO PERFIL..."))
(setq comprimento (rtos (car final)))


;ELABORAÇÃO DO DESENHO...
(setq local (getpoint "\nCLIQUE NO PONTO DE INSERÇÃO..."))
(command "_pline" local "@100<90" "comprimento<0" "@100<270" "c")

 

e pretendo continuar a desenvolve-la com mais codigos....

0 Likes
Message 4 of 8

dlanorh
Advisor
Advisor
Accepted solution
(defun c:IAGRAMA ()

;GUARDAR INFORMAÇÕES......
(setq layer_atual (getvar "clayer"))
(setvar "OSMODE" 1)
;INSERINDO A CAIXA....
(command "-layer" "M" "F-VT-DIAGRAMA_CX" "C" "2" "" "")
(setq inicial (getpoint "\nCLIQUE NO PONTO DE INÍCIO DO PERFIL..."))
(setq final (getpoint "\nCLIQUE NO PONTO FINAL DO PERFIL..."))
(setq comprimento (strcat (rtos (car final)) "<0")); <<=================


;ELABORAÇÃO DO DESENHO...
(setq local (getpoint "\nCLIQUE NO PONTO DE INSERÇÃO..."))
(command "_pline" local "@ 100<90" comprimento "@ 100<270" "c");<<=====================

;FINALIZAÇÃO
(setvar "CLAYER" layer_atual)
(princ)
)

(prompt "\nLISP PARA ELABORAÇÃO DE DIAGRAMA DE BRUCKNER")

I am not one of the robots you're looking for

0 Likes
Message 5 of 8

alexandre_benekowski
Advocate
Advocate

Hi dlanorh,

 

the lisp don´t do a rectangular,

 

there is something wrong

 

0 Likes
Message 6 of 8

Anonymous
Not applicable

Os erros do código foram corrigidos por @dlanorh mas continuo sem entender qual sua intenção com isso.

0 Likes
Message 7 of 8

alexandre_benekowski
Advocate
Advocate

Hi dlanorh,

 

now it work!!! Thanks!!!! I add "(setq comprimento (strcat "@" (strcat (rtos (car final)) "<0")))"

 

Thank you!!!!!

0 Likes
Message 8 of 8

dlanorh
Advisor
Advisor

@alexandre_benekowskiwrote:

Hi dlanorh,

 

the lisp don´t do a rectangular,

 

there is something wrong

 


(defun c:IAGRAMA ()

;GUARDAR INFORMAÇÕES......
(setq layer_atual (getvar "clayer"))
(setvar "OSMODE" 1)
;INSERINDO A CAIXA....
(command "-layer" "M" "F-VT-DIAGRAMA_CX" "C" "2" "" "")
(setq inicial (getpoint "\nCLIQUE NO PONTO DE INÍCIO DO PERFIL..."))
(setq final (getpoint "\nCLIQUE NO PONTO FINAL DO PERFIL..."))
(setq comprimento (strcat "@ " (rtos (distance inicial final)) "<0")); <<=================??distance


;ELABORAÇÃO DO DESENHO...
(setq local (getpoint "\nCLIQUE NO PONTO DE INSERÇÃO..."))
(command "_pline" local "@ 100<90" comprimento "@ 100<270" "c")

;FINALIZAÇÃO
(setvar "CLAYER" layer_atual)
(princ)
)

(prompt "\nLISP PARA ELABORAÇÃO DE DIAGRAMA DE BRUCKNER")

I am not one of the robots you're looking for