yxl030 Posted August 31, 2021 Share Posted August 31, 2021 Problem 1: I want to put some text,use "text" and "move" ( so that i can see what is being inserted.),then draw a line from the point I put to somewhere else. How to get the point in the command line? (defun c:test() (command "_.text" "0,0" 2 0 "ABC") (command "_.move" "_l" "" "0,0" pause) ; How to get this point I click ? Suppose it's Pt1 (command "_.line" Pt1 pause) ) Problem 2: Is there any way not to display this line when moving ? Quote Link to comment Share on other sites More sharing options...
Isaac26a Posted August 31, 2021 Share Posted August 31, 2021 to the first question is: (setq pt1 (getpoint "\nPick the point: ")) And how you call the point is your decision, you can call it p1, x or whatever. The second one I don't have a clue, but maybe someone else can answer it. Quote Link to comment Share on other sites More sharing options...
yxl030 Posted August 31, 2021 Author Share Posted August 31, 2021 2 hours ago, Isaac26a said: to the first question is: (setq pt1 (getpoint "\nPick the point: ")) And how you call the point is your decision, you can call it p1, x or whatever. The second one I don't have a clue, but maybe someone else can answer it. (command "_.move" "_l" "" "0,0" pt1) ; Thanks for your reply .But in that case I can't see what's I inserting directly, Quote Link to comment Share on other sites More sharing options...
Steven P Posted August 31, 2021 Share Posted August 31, 2021 Try this after your move command so you can see your text as you move it about (setq pt1 (cdr (assoc 10 (entget(entlast)) ))) pt1 is the text coordinates. I've not seen how to hide that dashed line as you move things, is it a big problem or something that would be nice? If you can hide it, I guess it will be a system variable to change, type setvar and then ? to see a list of them, might be in there but I don't know 1 Quote Link to comment Share on other sites More sharing options...
Isaac26a Posted August 31, 2021 Share Posted August 31, 2021 Or maybe this is what you're trying to do: (command "_.move" "_l" "" "0,0" (setq pt1 (getpoint "\nPick the point: "))) Although I don't know why you want to have the point set in a variable Quote Link to comment Share on other sites More sharing options...
Steven P Posted August 31, 2021 Share Posted August 31, 2021 5 minutes ago, Isaac26a said: Or maybe this is what you're trying to do: (command "_.move" "_l" "" "0,0" (setq pt1 (getpoint "\nPick the point: "))) Although I don't know why you want to have the point set in a variable the next line down, pt1 is used as the start point of a line Quote Link to comment Share on other sites More sharing options...
Isaac26a Posted August 31, 2021 Share Posted August 31, 2021 19 minutes ago, Steven P said: the next line down, pt1 is used as the start point of a line You're rigth, my bad. Quote Link to comment Share on other sites More sharing options...
tombu Posted August 31, 2021 Share Posted August 31, 2021 Try https://www.afralisp.net/archive/methods/lista/addtext_method.htm Quote Link to comment Share on other sites More sharing options...
eldon Posted August 31, 2021 Share Posted August 31, 2021 For your problem 2, have you tried changing the colour of the rubber band line? Quote Link to comment Share on other sites More sharing options...
yxl030 Posted September 1, 2021 Author Share Posted September 1, 2021 17 hours ago, Steven P said: Try this after your move command so you can see your text as you move it about (setq pt1 (cdr (assoc 10 (entget(entlast)) ))) pt1 is the text coordinates. I've not seen how to hide that dashed line as you move things, is it a big problem or something that would be nice? If you can hide it, I guess it will be a system variable to change, type setvar and then ? to see a list of them, might be in there but I don't know Thank you ,Steven P ! It works very well. I don't want it to display , just to make it look good. And I found out that this is no longer available. Quote Link to comment Share on other sites More sharing options...
yxl030 Posted September 1, 2021 Author Share Posted September 1, 2021 7 hours ago, Isaac26a said: Or maybe this is what you're trying to do: (command "_.move" "_l" "" "0,0" (setq pt1 (getpoint "\nPick the point: "))) Although I don't know why you want to have the point set in a variable Thank you ,Isaac26a. But it works like (setq pt1 (getpoint "\nPick the point: ")) (command "_.move" "_l" "" "0,0" pause) I cann't see what is being inserted directly. Quote Link to comment Share on other sites More sharing options...
yxl030 Posted September 1, 2021 Author Share Posted September 1, 2021 7 hours ago, tombu said: Try https://www.afralisp.net/archive/methods/lista/addtext_method.htm Tombu ,It's cool,thank you ,although I don't understand it yet Quote Link to comment Share on other sites More sharing options...
yxl030 Posted September 1, 2021 Author Share Posted September 1, 2021 (edited) Eldon, Thank you for telling me what it‘s called. Otherwise I wouldn't know that the problem couldn't be solved. https://knowledge.autodesk.com/support/autocad/learn-explore/caas/sfdcarticles/sfdcarticles/How-to-disable-or-change-the-color-of-the-rubber-band-in-AutoCAD.html the link is too old. Edited September 2, 2021 by yxl030 1 Quote Link to comment Share on other sites More sharing options...
eldon Posted September 1, 2021 Share Posted September 1, 2021 12 hours ago, yxl030 said: Eldon, Thank you for telling me what it‘s called. Otherwise I wouldn't know that the problem couldn't be solved. https://knowledge.autodesk.com/support/autocad/learn-explore/caas/sfdcarticles/sfdcarticles/How-to-disable-or-change-the-color-of-the-rubber-band-in-AutoCAD.html Congratulations on finding that article. However it is dated 2015, and my research lead me to believe that from version 2018 and onwards, it was possible. So perhaps you should update!! 1 Quote Link to comment Share on other sites More sharing options...
yxl030 Posted September 2, 2021 Author Share Posted September 2, 2021 (edited) eldon, Thank you for pointing out my mistake. chang it to black,It looks like gone Edited September 2, 2021 by yxl030 Quote Link to comment Share on other sites More sharing options...
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.