circuit numbering w/ (grread)- Help
CADForums.net Forum Index CADForums.net
Discussion of AutoCAD and other CAD software.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web cadforums.net
circuit numbering w/ (grread)- Help

 
Post new topic   Reply to topic    CADForums.net Forum Index -> Customization
Author Message
MiD-AwE
Guest





Posted: Thu Apr 07, 2005 12:42 am    Post subject: circuit numbering w/ (grread)- Help Reply with quote

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.
Thanks.
Code:
(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))
    )
      (COMMAND "CIRCLE" pt CIR)
    (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)
  (princ)
)


Back to top
Walt Engle
Guest





Posted: Thu Apr 07, 2005 1:53 am    Post subject: Re: circuit numbering w/ (grread)- Help Reply with quote

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

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

;;TAG1
;;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 )
(princ)
)
Back to top
 
Post new topic   Reply to topic    CADForums.net Forum Index -> Customization All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




Windows Server DSP VoIP Electronics New Topics
Powered by phpBB