Strange behavior from polar function in LISP

Strange behavior from polar function in LISP

Muhammed.OPERA
Advisor Advisor
1,025 Views
5 Replies
Message 1 of 6

Strange behavior from polar function in LISP

Muhammed.OPERA
Advisor
Advisor

Hi everyone 🙂

I'm defining list of points using polar function but a strange response occurred

 when i'm use the lisp and i'm not zooming in the point i choose (i defined the points from), the points isn't accurate , no it's totally wrong but,

when i choose the point when i'm zooming in very much before i choose the point then click to choose it, it's now true.

 

Is there any relation with polar function and the zooming area i'm standing on.

Thanks


Muhammed Mamdouh (OPERA)
Structural Engineer, Instructor
Facebook |LinkedIn

EESignature

0 Likes
Accepted solutions (2)
1,026 Views
5 Replies
Replies (5)
Message 2 of 6

cadffm
Consultant
Consultant
Where is your code?

Polar houl not depend of view, only the autocad objectselection (and that is not a Lisp thing).

Sebastian

0 Likes
Message 3 of 6

Muhammed.OPERA
Advisor
Advisor

I have sent it to you @cadffm


Muhammed Mamdouh (OPERA)
Structural Engineer, Instructor
Facebook |LinkedIn

EESignature

0 Likes
Message 4 of 6

john.uhden
Mentor
Mentor
Accepted solution

I am quite sure that you have a running object snap that's "missing" for you.

For instance if you have used polar to set p1 from p2, that's fine.

But if you use p2 to perform an entsel or nentselp or such, and your current osnap is endpoint, then you are likely going to be picking an endpoint of something in the vicinity of p2, not exactly at p2.  This happens most often when zoomed out because the pickbox and aperture cover more area than when zoomed in tight.

 

So, either temporarily set osmode to 0 (off) or use "_non" immediately prior to specifying a point.

John F. Uhden

Message 5 of 6

cadffm
Consultant
Consultant
Accepted solution
Osmode 0 deselect all snaps from osnap setting and need a error function for reset by cancel

Smarter: Turn osnap off
Osmode + 16384 set osnap off


(defun osnapoff nil (setvar "OSMODE"(logior (getvar "OSMODE") 16384)))
(defun osnapon nil (setvar "OSMODE"(logand (getvar "OSMODE") 16383)))

But for automation specially disable osnap with OSNAPCOORD=1,
no osmode or _non needed.

Sebastian

Message 6 of 6

Muhammed.OPERA
Advisor
Advisor

Thank you @cadffm @john.uhden 


Muhammed Mamdouh (OPERA)
Structural Engineer, Instructor
Facebook |LinkedIn

EESignature

0 Likes