+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 16

Thread: Drawing Limits

  1. #1
    Senior Member
    Using
    AutoCAD 2010
    Join Date
    Jun 2012
    Posts
    330

    Default Drawing Limits

    Registered forum members do not see this ad.

    Hello everybody,

    I have a set of about 1000 points covered in the window given in the code below with which I am trying to draw them in my drawing area. I find that they do not appear unless I Zoom Extent again. And when they appear the coordinates that appear are outside the limits.
    Can someone help me to get the points on screen without zooming again.
    Code:
    (defun C:drawpoints ( / list1 pt1)
      (setq p1 '(3800.00 1000.0) p2 '(4400.0 1300.0))
      (command "limits" p1 p2)
      (command "zoom" "E")
    (setq list1 pl
            pt1 (car list1))
      (while (/= pt1 nil)
        (setq pt1 (car list1))
        (command "point" pt1)
        (setq list1 (cdr list1))
      )
      
    )
    Thanks in advance
    Attached Files

  2. #2
    Senior Member
    Using
    not applicable
    Join Date
    Jun 2016
    Posts
    444

    Default

    Do you want to move the points so that they fall inside the limits? Or do you want to change the limits to match the extents of the points?
    BricsCAD 16

  3. #3
    Super Member Commandobill's Avatar
    Using
    AutoCAD 2014
    Join Date
    Oct 2008
    Location
    Raleigh, NC
    Posts
    530

    Default

    Your limits are nowhere near your points...
    ***Commandobill***
    Abusing AutoCad Since 1999
    "Caddatude... Do you has it?"
    Sorry for my poor English, I'm American...

  4. #4
    Senior Member
    Using
    AutoCAD 2010
    Join Date
    Jun 2012
    Posts
    330

    Default

    Roy_043,

    Yes I want the points to be displayed without Zoom Extent being invoked as I find my programs will not work inside this extent. Actually I have made a mistake in the limits. It is being corrected as follows:

    Code:
    (defun C:drawpoints ( / list1 pt1)
      (setq p1 '(163800.00 91000.0) p2 '(164400.0 91300.0))
      (command "limits" p1 p2)
      (command "zoom" "E")
    (setq list1 pl
            pt1 (car list1))
      (while (/= pt1 nil)
        (setq pt1 (car list1))
        (command "point" pt1)
        (setq list1 (cdr list1))
      )
      
    )
    Last edited by aloy; 16th Jul 2017 at 11:18 pm.

  5. #5
    Senior Member
    Using
    AutoCAD 2010
    Join Date
    Jun 2012
    Posts
    330

    Default

    Commandobill,
    Sorry I have made a mistake in giving the limits. It has been corrected in post #4.

    Thanks
    Aloy

  6. #6
    Senior Member
    Using
    not applicable
    Join Date
    Jun 2016
    Posts
    444

    Default

    The rectangle defined by your limits measures 69400 x 300. Are you sure this is correct?

    Why not simply use:
    Code:
    (foreach pt pl
      (command "_.point" "_non" pt)
    )
    (command "_.zoom" "_extents")
    BricsCAD 16

  7. #7
    Senior Member
    Using
    AutoCAD 2010
    Join Date
    Jun 2012
    Posts
    330

    Default

    Roy_043,
    Sorry my mistake again. The rectangle is 600x300 and it has been corrected in my previous post. Is there no way to avoid Zoom Extent?. I tried setting limits. But I am not able to get the griddisplay correctly. It appears to me when Zoom Extent is done the coordinate system doesn't work correctly and a certain program I use gives me errors.

    Regards,
    Aloy

  8. #8
    Junior Member 1958's Avatar
    Computer Details
    1958's Computer Details
    Operating System:
    W7
    Discipline
    Surveying
    Using
    AutoCAD 2007
    Join Date
    Nov 2015
    Location
    Uzbekistan, Tashkent
    Posts
    12

    Default

    Why not simply use:
    Code:
     (vl-cmdf "_.zoom"
              "_w"
              (getvar "extmax")
              (getvar "extmin")
     )

  9. #9
    Senior Member
    Using
    AutoCAD 2010
    Join Date
    Jun 2012
    Posts
    330

    Default

    1958,
    Yes it draws points and zoom to the extent and bring all my points to the screen, but doesn't help me with my other program. I need to first set the limits and then draw the points.

    Regards,

    Aloy

  10. #10
    Luminous Being
    Using
    Civil 3D 2016
    Join Date
    Dec 2005
    Location
    GEELONG AUSTRALIA
    Posts
    9,377

    Default

    Registered forum members do not see this ad.

    Search here for min x y, max x y of a list, its lisp code, do that 1st then you have your window values, I would add a litte bit more offset.
    A man who never made mistakes never made anything

Similar Threads

  1. Drawing Limits
    By Coosbaylumber in forum AutoCAD 2D Drafting, Object Properties & Interface
    Replies: 1
    Last Post: 2nd Apr 2010, 11:52 pm
  2. Drawing Limits
    By nummularius in forum AutoCAD Drawing Management & Output
    Replies: 4
    Last Post: 17th Nov 2006, 06:54 pm
  3. drawing limits
    By Dado in forum AutoCAD General
    Replies: 3
    Last Post: 26th Oct 2006, 10:07 am
  4. Drawing limits
    By pitts37 in forum AutoCAD Beginners' Area
    Replies: 3
    Last Post: 16th Oct 2006, 06:28 pm
  5. Drawing Limits
    By mmuste01 in forum AutoCAD General
    Replies: 7
    Last Post: 14th Aug 2006, 12:35 am

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts