Anonymous
450 Vistas, 3 Respuestas
06-11-2020
04:28 AM
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Denunciar
06-11-2020
04:28 AM
Error: syntax error
Hi Guys ! I want to run a AutoLISP app in AutoCAD. I am on a Mac. It is possible to run but then while performing it shows an error message saying: " error: syntax error".
The code is in the attachments.
Please help !
06-11-2020
05:46 AM
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Denunciar
06-11-2020
05:46 AM
Hi @Anonymous,
The code you attached shows another error, when I try to use it in AutoCAD:
"too few arguments in SETQ: (SETQ P4 ALTURA (GETDIST "\nIndique a altura da viga: "))"
and it is really true:
The statement (SETQ P4 ALTURA (GETDIST "\nIndique a altura da viga: ")) in this routine doesn't assign anything to P4 variable - there should be something between P4 and ALTURA variables: some GET function or some already assigned variable.
Do you find the posts helpful? "LIKE" these posts!
Have your question been answered successfully? Click 'ACCEPT SOLUTION' button.
Maxim Kanaev
Architect
MARSS
Etiquette and Ground Rules of Autodesk Community
The code you attached shows another error, when I try to use it in AutoCAD:
"too few arguments in SETQ: (SETQ P4 ALTURA (GETDIST "\nIndique a altura da viga: "))"
and it is really true:
The statement (SETQ P4 ALTURA (GETDIST "\nIndique a altura da viga: ")) in this routine doesn't assign anything to P4 variable - there should be something between P4 and ALTURA variables: some GET function or some already assigned variable.
Do you find the posts helpful? "LIKE" these posts!
Have your question been answered successfully? Click 'ACCEPT SOLUTION' button.
Maxim Kanaev
Architect
MARSS
Etiquette and Ground Rules of Autodesk Community
06-11-2020
06:08 AM
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Denunciar
06-11-2020
06:08 AM
should it work if i insert (setq p4 (getdist "\nIndique a altura da viga: ")) instead of (setq p4 altura (getdist "\nIndique a altura da viga: ")) ?
06-11-2020
06:39 AM
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Denunciar
06-11-2020
06:39 AM
Yes, if the subsequent part of the code is correct.
But (+ ((angle p1 p2) (angle p2 p1) 90) = 180)) seems to be incorrect, because "= (equal to)" also is a function and its signature is (= numstr [numstr ...]. In your case, you are using it incorrectly.
The syntax of "+" function is also incorrect, it should be (+ [number number ...]), but you have something strange.
Do you find the posts helpful? "LIKE" these posts!
Have your question been answered successfully? Click 'ACCEPT SOLUTION' button.
Maxim Kanaev
Architect
MARSS
Etiquette and Ground Rules of Autodesk Community
But (+ ((angle p1 p2) (angle p2 p1) 90) = 180)) seems to be incorrect, because "= (equal to)" also is a function and its signature is (= numstr [numstr ...]. In your case, you are using it incorrectly.
The syntax of "+" function is also incorrect, it should be (+ [number number ...]), but you have something strange.
Do you find the posts helpful? "LIKE" these posts!
Have your question been answered successfully? Click 'ACCEPT SOLUTION' button.
Maxim Kanaev
Architect
MARSS
Etiquette and Ground Rules of Autodesk Community