Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

last point picked

8 REPLIES 8
Reply
Message 1 of 9
cadking2k5
2574 Views, 8 Replies

last point picked

how can you get the last point you picked on a Circle because I was going to run the TTR and use the tanget command and have it exit and I need to get the point I pick on the circle 

8 REPLIES 8
Message 2 of 9
hmsilva
in reply to: cadking2k5

cadking2k5,

the last specified point is stored in LASTPOINT System Variable, but if I understood correctly, you want the last picked point inside the circle command, and that point is not saved...

Is that point you're trying to get?
To get that point, you need to store the point previously, and then provide it to the circle command...

Henrique

EESignature

Message 3 of 9
stevor
in reply to: cadking2k5

To use the selected points, you could make a routine to select points, or select the one point, and then issue the Circle command.
S
Message 4 of 9
Kent1Cooper
in reply to: cadking2k5


@cadking2k5 wrote:

how can you get the last point you picked on a Circle because I was going to run the TTR and use the tanget command and have it exit and I need to get the point I pick on the circle 


Interestingly, if you draw a Circle using the 3P or 2P option, the last point you picked to define it is stored in the LASTPOINT System Variable, so you can get at it via (getvar 'lastpoint) or with "@" in some kind of drawing or editing command.  But with the Center-Radius approach, the point selected to define the radius is only used to calculate the length of the radius, and is not saved, nor do elements of defining selections in the TTR option have any influence on LASTPOINT.

Kent Cooper, AIA
Message 5 of 9
doni49
in reply to: cadking2k5


@cadking2k5 wrote:

how can you get the last point you picked on a Circle because I was going to run the TTR and use the tanget command and have it exit and I need to get the point I pick on the circle 


What exactly are you trying to accomplish?  Maybe there's another way to get you there.

For example, the latest post commented on the fact that you couldn't get the last point used to create a circle if using the standard center/radius method.  This will get you there if that were needed.

 

(command "circle" (setq cen (getpoint "Center of Circle:  ")) (setq pt2(getpoint "Point on Circle" cen))); pt2 will have the second point that was selected.



Don Ireland
Engineering Design Technician




If a reply solves your issue, please remember to click on "Accept as Solution". This will help other users looking to solve a similar issue. Thank you.


Please do not send a PM asking for assistance. That's what the forums are for. This allows everyone to benefit from the question asked and the answers given.

Message 6 of 9
Kent1Cooper
in reply to: cadking2k5


@cadking2k5 wrote:

how can you get the last point you picked on a Circle because I was going to run the TTR and use the tanget command and have it exit and I need to get the point I pick on the circle 


Looking at that again, I am wondering:  If you're drawing the Circle using the TTR option, which most replies here don't really address, you don't directly pick a point that lies on the Circle's circumference, nor do you pick the center point, and you can't save two points to variables and build the Circle from them, but the center is calculated from the tangent objects and the specified radius.  The resulting Circle could touch either of the tangent objects sometimes rather far from where the cursor was when you picked near them.  By "the point I pick on the circle," do you mean the point of tangency and intersection of the new Circle with one of the tangent objects?  Or the nearest point on either the new Circle or one of the tangent objects to the location at which you picked?  In either case, would it matter whether it saved the first one or the second one, or would either one do?

Kent Cooper, AIA
Message 7 of 9
Kent1Cooper
in reply to: doni49


@doni49 wrote:
.... you couldn't get the last point used to create a circle if using the standard center/radius method.  This will get you there if that were needed.

(command "circle" (setq cen (getpoint "Center of Circle:  ")) (setq pt2(getpoint "Point on Circle" cen))); pt2 will have the second point that was selected.


A drawback of that approach [which I think is, give or take, what stevor was suggesting] is that the Circle doesn't drag dynamically as it's asking you for the circumference-defining point, so you can't see what you're getting as in the regular Circle command.  It would be possible using (grread) to have it drag while asking for a picked point that it would be able to save, but I don't believe object snap would be available for that point.  [At least, I haven't found a way to get it to work, nor to type in a one-time Osnap mode, in a routine I built that draws a Rectangle based on a midpoint rather than on opposite corners.]

 

But in any case, it's moot if they're drawing the Circle using the TTR option [waiting for an answer to my clarification question about that] -- I expect it would require some other approach entirely.

Kent Cooper, AIA
Message 8 of 9
doni49
in reply to: Kent1Cooper


@Kent1Cooper wrote:

@doni49 wrote:
.... you couldn't get the last point used to create a circle if using the standard center/radius method.  This will get you there if that were needed.

(command "circle" (setq cen (getpoint "Center of Circle:  ")) (setq pt2(getpoint "Point on Circle" cen))); pt2 will have the second point that was selected.


A drawback of that approach [which I think is, give or take, what stevor was suggesting] is that the Circle doesn't drag dynamically as it's asking you for the circumference-defining point, so you can't see what you're getting as in the regular Circle command.  It would be possible using (grread) to have it drag while asking for a picked point that it would be able to save, but I don't believe object snap would be available for that point.  [At least, I haven't found a way to get it to work, nor to type in a one-time Osnap mode, in a routine I built that draws a Rectangle based on a midpoint rather than on opposite corners.]

 

But in any case, it's moot if they're drawing the Circle using the TTR option [waiting for an answer to my clarification question about that] -- I expect it would require some other approach entirely.


Good point Kent.  I guess we'll have to wait for clarification.  If we knew exactly what the OP is trying to accomplish, we might be able assist in finding another aproach.



Don Ireland
Engineering Design Technician




If a reply solves your issue, please remember to click on "Accept as Solution". This will help other users looking to solve a similar issue. Thank you.


Please do not send a PM asking for assistance. That's what the forums are for. This allows everyone to benefit from the question asked and the answers given.

Message 9 of 9
Kent1Cooper
in reply to: Kent1Cooper


@Kent1Cooper wrote:
....

A drawback of that approach [which I think is, give or take, what stevor was suggesting] is that the Circle doesn't drag dynamically as it's asking you for the circumference-defining point, so you can't see what you're getting as in the regular Circle command.  It would be possible using (grread) to have it drag while asking for a picked point that it would be able to save, but I don't believe object snap would be available for that point.  ....


I worked out a way to do that, in case it's of any use to the OP, but it does have the drawback described -- it honors neither running Object snap nor entry of a one-time Osnap mode for the circumference point [it does for the center].  And it won't let you set the value of, or turn on or off, positional Snap between picking the center and the point on the circumference, but it does honor positional Snap if it's already on.

Kent Cooper, AIA

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost