circuit numbering w/ (grread)- Help

Discussion in 'AutoCAD' started by MiD-AwE, Apr 6, 2005.

  1. MiD-AwE

    MiD-AwE Guest

    Hi all,
    I've nearly finished this code for inserting a number with a circle around it. The numbers will increase with every mouse click, but you cannot see the circle until after you've placed it in the drawing. This is no good because we may have far too many in a drawing to go back and reposition every one. So I was hoping to draw the circle and let it cling to the cursor until I click on the screen; at which time the number should be inserted. Below is my code and my best attempt. Hopefully someone can see what I trying to do. Please, help.
    (DEFUN C:ICI (/ CNUM pt en CIR OSNP)
    (SETQ CNUM 1)
    (setq OSNP (getvar "osmode"))
    (setvar "osmode" 0)			; turn them off
    (while (COND ((< CNUM 9) (SETQ CIR 6))
    ((< 9 CNUM 19) (SETQ CIR 7))
    ((< 19 CNUM 99) (SETQ CIR 8))
    ((> CNUM 99) (SETQ CIR 9))
    (setq en (entget (entlast)))
    (setq pt (getpoint "\nSelect insert point: "))
    (/= (car (setq pt (grread pt 1 0))) 3)
    (if (= (car pt) 5)
    (echg en 11)
    (command "_.mtext" pt "J" "MC" "W" "0" CNUM "")
    (SETQ CNUM (+ CNUM 1))
    (setvar "osmode" OSNP)
    MiD-AwE, Apr 6, 2005
  2. MiD-AwE

    Walt Engle Guest

    Here's one from one of these NG's:

    ;;TAG1.LSP Copyright 1998 HyperPics all rights reserved
    ;; Author: Lee Ambrosius,
    ;; HyperPics

    ;;The tag allows the user to place a numbered bubble at any give point.
    ;;The number counts upward in an increment of one from the users defined number.

    (defun MYERROR (S) ;;error trap program
    (if (/= S "\nFunction cancelled" )
    (prompt "\nEnding Tag1 routine..." ) )
    (setvar "OSMODE" OS)
    (setvar "CMDECHO" CMD)
    (command "._undo" "end")
    (setq *ERROR* OLDERR )
    Walt Engle, Apr 6, 2005
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.