JerryFiedler Posted June 27, 2023 Posted June 27, 2023 Greetings, My qleader arrowheads are not associated with the object to which it points. I have looked for a property to set so it would be but so far I have found nothing. Please do not suggest using Mleaders or Leaders. I am asking only about Qleaders. Is it possible? Quote
SLW210 Posted June 28, 2023 Posted June 28, 2023 Why did you ask in the LISP Forum? DIMASSOC sets the associativity. AFAIK, you need to snap to something real (End, Mid, Intersection, etc.). Quote
JerryFiedler Posted June 28, 2023 Author Posted June 28, 2023 mhupp: what I meant by "associated" is the arrowhead moves if the object in the model moves. Just like Dimensions, Mleaders and Leaders. SLW210: I asked in the lisp forum only because I was working on a customized Qleader lisp and thought maybe there was a property I could change. Sorry I did not mention that in my original post. I have DIMASSOC set to 2 and all my dimensions along with Mleaders and Leaders (although I do not use them) change as the object changes. My created Qleaders do not even, as you say, when they are snapped on "real" points. I would have thought DIMASSOC would apply to Qleaders but operantly not. If you care, here is the part of my routine that actually makes the qleader. The small circle is just a guide to indicate how far away from the arrowhead the bend point has to be so the arrowhead is actually visible. The grdraw line just indicates what the leader will look like while you are selecting the bend point. ; Create the Qleader. (setq pt1 (getpoint "\nSpecify arrow head position: ")) (entmake (list (cons 0 "CIRCLE") (cons 8 "CS") (cons 10 pt1) (cons 40 0.25) ) ) (setq pt2 (getpoint pt1 "\nSpecify bend position: ")) (entdel (entlast)) (grdraw pt1 pt2 1 1) (setq pt3 (getpoint pt2 "\nSpecify end of tail: ")) (setq pt3 (list (car pt3) (cadr pt2) (caddr pt3))) (redraw) (temp-osmode-off) (command "qleader" pt1 pt2 pt3 "") (temp-osmode-reset) Quote
Emmanuel Delay Posted June 29, 2023 Posted June 29, 2023 (edited) Can you explain why you want to use Qleader, and not just Leader? Because Qleader is not an Autocad object. Qleader is a command that creates a leader, and separately creates a Mtext. Unlike Mleaser which is 1 object. The MText is actually integrated with the leader in a Mleader. Anyway, ran your code; and the leaders are associated to the object as long as I SNAP to a point (endpoint, midpoint....) of that object. Except that I commented out (temp-osmode-off) and (temp-osmode-reset) which you didn't post here. Just a guess... (temp-osmode-off) is the function that causes the problem. The function name sounds like it turns off OSNAP; just the thing that allows the association Try removing those 2 function calls. Edited June 29, 2023 by Emmanuel Delay 1 1 Quote
SLW210 Posted June 29, 2023 Posted June 29, 2023 My Qleaders follow just fine here. Like mentioned, your code isn't snapping. 1 Quote
JerryFiedler Posted June 29, 2023 Author Posted June 29, 2023 Thank you Emmanuel and SLW210 for testing my routine. After SWL suggested I was not snapping I began to think that my routine to turn off snaps was the issue but did not have time to debug yesterday. I guess it only makes sense that to snap to a point osnaps would have to be turned on even during execution of a lisp. I always just thought of osnaps as a drawing aid. Yes Emmanuel I understand your comments about qleader not being a single entity but I prefer the separate mtext/leader object. By the way the leader does have a DXF group code that contains the name of the mtext. I use this relationship in other lisp routines but thank you for your comments. So... problem solved! Thank you all. 1 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.