Results 1 to 7 of 7

Thread: How to get co-ordinated of bottom left & Top right

  1. #1
    Member
    Join Date
    2007-10
    Posts
    41
    Login to Give a bone
    0

    Thumbs up How to get co-ordinated of bottom left & Top right

    I am attaching a sample dwg file 1.dwg for reference. I want to find the co-ordinates of Bottom left (i.e P4) and the co-ordinates of Top Right (i.e P2). These co-ordinates are to be use in a lisp routine i am making for batch plotting drawings of same size (say A1) in model space but with different insertion points.
    Kindly try to help me with this problem
    Attached Files Attached Files
    • File Type: dwg 1.dwg (33.7 KB, 14 views)

  2. #2
    AUGI Addict
    Join Date
    2008-02
    Posts
    1,141
    Login to Give a bone
    0

    Default Re: How to get co-ordinated of bottom left & Top right

    This should help you..
    Code:
    (ACET-GEOM-SS-EXTENTS (ssget) 0.1)
    
    (ACET-GEOM-SS-EXTENTS-ACCURATE(ssget))
    
    (ACET-GEOM-SS-EXTENTS-FAST(ssget))

  3. #3
    Member
    Join Date
    2007-10
    Posts
    41
    Login to Give a bone
    0

    Smile Re: How to get co-ordinated of bottom left & Top right

    I am attaching my lisp for plotting of A1 sheets how can i use this code in the lisp kindly tell me.
    Attached Files Attached Files

  4. #4
    Certifiable AUGI Addict
    Join Date
    2015-11
    Location
    Jo'burg SA
    Posts
    4,512
    Login to Give a bone
    0

    Default Re: How to get co-ordinated of bottom left & Top right

    First select everything in model space to a saved selection set:
    Code:
    (setq ss (ssget "_X" '((410 . "Model"))))
    Then pass that to one of the functions, e.g.
    Code:
    (setq bounds (ACET-GEOM-SS-EXTENTS ss 0.1))
    This returns a list containing 2 points. If I run it on your sample drawing I get:
    Code:
    ((560.385 178.788 -1.0e-008) (1414.27 766.163 1.0e-008))
    The 1st (i.e. car) is the bottom left, and the 2nd (i.e. cadr) is the top right.There's some very small Z values due to the fuzzyness of 0.1. You can omit this by modifying the points, e.g.
    Code:
    (setq pt1 (list (car (car bounds)) (cadr (car bounds)) 0.0)
          pt2 (list (car (cadr bounds)) (cadr (cadr bounds)) 0.0)
    )
    This generates a "rectangle" bounds across everything in model space - i.e. everything is contained within that rectangle.

    However, you seem to already have a border. Would you rather have this for the border? In which case change the ssget to:
    Code:
    (princ "\nSelect border: ")
    (setq ss (ssget))

  5. #5
    The Silent Type RobertB's Avatar
    Join Date
    2000-01
    Location
    Seattle WA USA
    Posts
    5,859
    Login to Give a bone
    0

    Default Re: How to get co-ordinated of bottom left & Top right

    Of course, what's wrong with plotting from a layout? They've only been around for over a decade.
    R. Robert Bell
    Design Technology Manager
    Stantec
    Opinions expressed are mine alone and do not reflect the views of Stantec.

  6. #6
    AUGI Addict
    Join Date
    2008-02
    Posts
    1,141
    Login to Give a bone
    0

    Default Re: How to get co-ordinated of bottom left & Top right

    Quote Originally Posted by RobertB View Post
    Of course, what's wrong with plotting from a layout? They've only been around for over a decade.
    Here here, I can't imagine going back to plotting from model.

  7. #7
    Certifiable AUGI Addict
    Join Date
    2001-03
    Location
    Tallahassee, FL USA
    Posts
    3,667
    Login to Give a bone
    0

    Default Re: How to get co-ordinated of bottom left & Top right

    Quote Originally Posted by jitesh789 View Post
    I am attaching a sample dwg file 1.dwg for reference. I want to find the co-ordinates of Bottom left (i.e P4)
    (getvar "extmin")
    Quote Originally Posted by jitesh789 View Post
    and the co-ordinates of Top Right (i.e P2)
    (getvar "extmax")
    Quote Originally Posted by jitesh789 View Post
    . These co-ordinates are to be use in a lisp routine i am making for batch plotting drawings of same size (say A1) in model space but with different insertion points.
    Kindly try to help me with this problem
    Paper Space came with R11, I started on R12 about 17 years ago. I've done a few plots from Model over the years, just for looking at never for a finished drawing.

Similar Threads

  1. 2012: Flexing Left to Right and bottom to Top
    By derek.96018 in forum Revit Architecture - Families
    Replies: 8
    Last Post: 2013-05-23, 10:02 PM
  2. Replies: 3
    Last Post: 2012-05-07, 08:16 PM
  3. Replies: 0
    Last Post: 2012-04-30, 03:47 PM
  4. Replies: 4
    Last Post: 2007-04-08, 12:45 PM

Posting Permissions

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