Jump to content

Recommended Posts

Posted

Hello . Dear friend.

 

I found this code from CADTutor by Marko.

I hope someone can help me add reactor for this coordinate dimension.

 

Drag the arrows. Coordinate data automatic updates.

 

Thanks for any help.

 

(defun c:lb ( / p x y str )
 (if (not (tblsearch "LAYER" "dim"))
   (entmake '((0 . "LAYER") (100 . "AcDbSymbolTableRecord") (100 . "AcDbLayerTableRecord") (2 . "dim") (70 . 0) (62 . 3) (6 . "Continuous")))
   (prompt "\nLayer : \"dim\" already exist - setting it to current and proceeding with routine...")
 )
 (setvar 'clayer "dim")
 (while (setq p (getpoint "\nPick Point - ENTER to finish: "))
    (setq   x (strcat "X = " (if (minusp (car p)) ""  "+" ) (rtos (car p) 2 2)))
    (setq   y (strcat "Y = " (if (minusp (cadr p)) "" "+" ) (rtos (cadr p) 2 2)))
    (setq str (strcat x "\n" y))
   ;(setq   z (strcat "Z = "(if (minusp (caddr p)) "" "+" ) (rtos (caddr p) 2 2)))
   ;(setq str (strcat x "\n" y "\n" z))                                       
    (command "_LEADER" p pause "" str "")
 )
 (princ)
)

Posted

Hi,

 

There is one video created by alanjt using fields instead of reactors which means permanent use and no need to use codes at all, try to search for it in this forum.

Posted
The following link is to one of Lee Mac's outstanding lisps, which I have not had occasion to use, but which I thought might be of interest to you.

 

http://www.lee-mac.com/ptmanager.html

 

Thanks Lee! :beer:

 

Yes,Thanks Lee, But I don't know how to use that routine.:(

Posted
Do you know how use reactor for coding this ?

Yes I do , but in your case reactor is not needed at all and it might be a troublesome for AutoCAD if you have hundreds so just as demonstrated by Alan is more than enough and I think also it is the best way to go with.

 

Are not you the same guy who posted the reactor code for the same issue in Autodesk forum HERE ?

Posted
Yes I do , but in your case reactor is not needed at all and it might be a troublesome for AutoCAD if you have hundreds so just as demonstrated by Alan is more than enough and I think also it is the best way to go with.

 

Are not you the same guy who posted the reactor code for the same issue in Autodesk forum HERE ?

 

Yes. Is me too. My account forgot password. so I register an new account.

That code is from my friend. But ,He say It's not perfect . when delete "leader" obj will error. and He can't fix that error. so...

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...