Jump to content

INITGET other uses


Aditya Bagaskara

Recommended Posts

I always see initget used with just getkword only. According to AutoCAD Help. initget can be used to various getxxx functions. How do initget used with ohter getxxx functions? And give me an example. Thanks for the help!

Link to comment
Share on other sites

(DEFUN test (/ nContraHuellas mens)
  (IF nContraHuellas0
    ()
    (SETQ nContraHuellas0 8)
  )
  (SETQ    mens (STRCAT "\nEnter the number of steps <"
             (ITOA nContraHuellas0)
             ">: "
         )
  )
  (INITGET (+ 2 4))            ;Prevents the program from ending if the user enters a negative or zero value.
  (IF (SETQ nContraHuellas (GETINT mens))
    ()
    (SETQ nContraHuellas nContraHuellas0)
  )
  (SETQ nContraHuellas0 nContraHuellas)
)


(DEFUN errores_test (men)
  (SETQ *error* error0)
  (IF (= men "quitar / salir abandonar")
    (PRIN1)
    (PRINC (STRCAT "\nError: " men " "))
  )
  (SETVAR "cmdecho" 1)
  (PRIN1)
)


(DEFUN c:test (/ error0)
  (SETVAR "cmdecho" 0)
  (SETQ    error0    *error*
    *error*    errores_test
  )
  (test)
  (SETQ *error* error0)
  (PROMPT "\nPrograma finalizado.")
  (SETVAR "cmdecho" 1)
  (PRIN1)
)


(PROMPT
  "\nComando TEST cargado."
)
(PRIN1)

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...