TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: fmn76 on July 22, 2007, 09:02:53 PM

Title: Command error.. need help...
Post by: fmn76 on July 22, 2007, 09:02:53 PM
Anyone can help me pls... i get this lisp from BTN Lisp... and get error like this...

Command: cpe wipeout Specify first point or [Frames/Polyline] <Polyline>: f
Enter mode [ON/OFF] <ON>: off Regenerating model.

Command:
Select point on contour line: insert Enter block name or [?]: el_tag Specify
insertion point or [Scale/X/Y/Z/Rotate/PScale/PX/PY/PZ/PRotate]:
Enter X scale factor, specify opposite corner, or [Corner/XYZ] <1>:
1.000000000000000 Enter Y scale factor <use X scale factor>: 1.000000000000000
Specify rotation angle <0>: ; error: bad argument value: AutoCAD command:
#<SUBR @05cf4410 PAUSE>
Title: Re: Command error.. need help...
Post by: Kerry on July 22, 2007, 09:51:07 PM
Perhaps try something like this ..
Code: [Select]
(DEFUN c:cpe (/ P VAL scl)
    (COMMAND "wipeout" "f" "off")
    (SETQ scl (GETVAR "dimscale")
          om  (GETVAR "osmode")
    )
    (SETVAR "osmode" 512)
    (SETQ p   (GETPOINT "\nSelect point on Contour Line: ")
          val (RTOS (NTH 2 p) 2 0)
    )
    (COMMAND "insert" "el_tag" p scl scl pause)
    (COMMAND val)
    (SETVAR "osmode" om)
    (PRINC)
)
Title: Re: Command error.. need help...
Post by: fmn76 on July 22, 2007, 10:10:39 PM
hmm..ok im try ur lisp but still error come out...like this..... :|


Specify rotation angle <0>: ; error: bad argument value: AutoCAD command:
#<SUBR @04beaca8 PAUSE>
Title: Re: Command error.. need help...
Post by: Kerry on July 22, 2007, 10:14:46 PM
looks like you have a command overwriting the ACAD definition

what do you get for
(type pause)

?
Title: Re: Command error.. need help...
Post by: Kerry on July 22, 2007, 10:20:18 PM
I'd suggest you do a file search for a .LSP file that contains
defun pause
or just
pause

that's likely to be the problem
Title: Re: Command error.. need help...
Post by: Adesu on July 22, 2007, 10:33:35 PM
Hi fmn76,
test again this code
Code: [Select]
(defun c:cpe (/ om p pause scl val)
  (command "wipeout" "f" "off")
  (setq scl (getvar "dimscale"))
  (setq om (getvar "osmode"))
  (setvar "osmode" 512)
  (setq p (getpoint"\nSelect point on Contour Line: "))
  (setq val (rtos (nth 2 p) 2 0))
  (command "insert"  "el_tag" p scl scl pause val "")
  (setvar "osmode" om)
  (princ)
  )

and you could look at attach file.

hmm..ok im try ur lisp but still error come out...like this..... :|


Specify rotation angle <0>: ; error: bad argument value: AutoCAD command:
#<SUBR @04beaca8 PAUSE>
Title: Re: Command error.. need help...
Post by: fmn76 on July 22, 2007, 11:22:55 PM
Thanks ....Adesu & Kerry... i found that error... TQ again....
Title: Re: Command error.. need help...
Post by: Kerry on July 22, 2007, 11:27:21 PM
.. and the error was ?? ???
Title: Re: Command error.. need help...
Post by: Kerry on July 23, 2007, 06:22:24 PM

hmmmm ...

fmn76, What was the error ?
Title: Re: Command error.. need help...
Post by: fmn76 on July 23, 2007, 08:33:47 PM
Sorry Kerry... actualy i combine my collection of lisp in 1 file... so that why have i have error in my lisp.... TQ again about ur idea/lisp...