Jump to content

Recommended Posts

Posted

I make MANY simple drawings, take a screenshot, then paste in ms paint

 

In order for my many screenshots to have the same scale, I put a handle point in the upper right and lower left corners. I zoom window and snap to these handle points.

 

The program works great if the handle points are lines (snap endpoint or intersection)

 

However, if the handle points are circles, (snap cen) nothing happens

 

If I do the same thing without the macro, snap cen works great

 

I'm almost certain circles for handle points worked before. Now nothing

 

 

(defun c:zw ()
   (setq pt1 (getpoint "\nSelect First Window Point: "))
   (setq pt1 (osnap pt1 "_endp"))
   (setq pt2 (getpoint "\nSelect Second Window Point: "))
   (setq pt2 (osnap pt2 "_endp"))
     (command "zoom"
     "w"
   pt1
   pt2
     ) ; end zoom
    (princ)
) ; end programIts not ideal though.

Posted

Is not a bug, it is because circles don’t have EndPoint Osnap – you should modify the filter to accept CenterPoint too:

 

(osnap pt1 "_end[color=red],_cen[/color]")

 

Regards,

Posted

Try this one ....... it is dedicated to you.

(defun c:zw (/ old  pt1 pt2)
(setq old (getvar 'osmode))
 (setvar 'osmode 1)
 (setq pt1 (getpoint "\nSelect First Window Point: "))
   (setq pt2 (getpoint "\nSelect Second Window Point: "))
   (command "_.zoom" "_w"  pt1 pt2 )
 (setvar 'osmode old)
    (princ)
)

 

Tharwat

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...