77077 Posted May 25, 2016 Posted May 25, 2016 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) ) Quote
Tharwat Posted May 25, 2016 Posted May 25, 2016 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. Quote
Dadgad Posted May 25, 2016 Posted May 25, 2016 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! Quote
Tharwat Posted May 25, 2016 Posted May 25, 2016 Just found it. http://www.cadtutor.net/forum/showthread.php?46949-Perpendicular-on-Given-Polyline-with-given-segment-and-Coordinates&p=318675&viewfull=1#post318675 Quote
77077 Posted May 26, 2016 Author Posted May 26, 2016 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! Yes,Thanks Lee, But I don't know how to use that routine. Quote
77077 Posted May 26, 2016 Author Posted May 26, 2016 Just found it. http://www.cadtutor.net/forum/showthread.php?46949-Perpendicular-on-Given-Polyline-with-given-segment-and-Coordinates&p=318675&viewfull=1#post318675 Is a way too. but , I'm more interested to know use reactor. Mr. Tharwat. Do you know how use reactor for coding this ? Quote
Tharwat Posted May 26, 2016 Posted May 26, 2016 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 ? Quote
77077 Posted May 27, 2016 Author Posted May 27, 2016 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... Quote
Recommended Posts
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.