See the top rated post in this thread. Click here

Results 1 to 5 of 5

Thread: Possible to make selection like ENTSEL with just coords?

  1. #1
    Design Visualization Moderator stusic's Avatar
    Join Date
    2004-10
    Location
    Denver, Colorado
    Posts
    1,515
    Login to Give a bone
    0

    Default Possible to make selection like ENTSEL with just coords?

    Hey all!

    Is it possible to simulate an aperture selection area stemming from a variable containing a point coordinate, similar to the pickbox for entsel? I'm trying to use the trans function (confusing) to select a block based on a point picked in paperspace. I can find the correct viewport and activate it, still working on how to make the trans function work, but not sure how the selection would be made... Any ideas?

    Cheers and thanks

  2. #2
    Administrator BlackBox's Avatar
    Join Date
    2009-11
    Posts
    5,719
    Login to Give a bone
    1

    Default Re: Possible to make selection like ENTSEL with just coords?

    Not sure of your application; this may, or may not be of use:

    Code:
    (defun _ssPickBox (pt / ratio)
      (ssget "_c"
             (mapcar '+
                     pt
                     (setq ratio (list (setq ratio (* (/ (getvar 'pickbox)
                                                         (cadr (getvar 'screensize))
                                                      )
                                                      (getvar 'viewsize)
                                                   )
                                       )
                                       ratio
                                       0
                                 )
                     )
             )
             (mapcar '- pt ratio)
      )
    )
    "How we think determines what we do, and what we do determines what we get."

    Sincpac C3D ~ Autodesk Exchange Apps

    Computer Specs:
    Dell Precision 3660, Core i9-12900K 5.2GHz, 64GB DDR5 RAM, PCIe 4.0 M.2 SSD (RAID 0), 16GB NVIDIA RTX A4000

  3. #3
    Design Visualization Moderator stusic's Avatar
    Join Date
    2004-10
    Location
    Denver, Colorado
    Posts
    1,515
    Login to Give a bone
    0

    Default Re: Possible to make selection like ENTSEL with just coords?

    Quote Originally Posted by BlackBox View Post
    Not sure of your application; this may, or may not be of use:

    Code:
    (defun _ssPickBox (pt / ratio)
      ...
    That's awesome! Yeah, I dunno if I could've come up with that one on my own Thanks.

    Now to just figure out trans to work *correctly*...

  4. #4
    Administrator BlackBox's Avatar
    Join Date
    2009-11
    Posts
    5,719
    Login to Give a bone
    0

    Default Re: Possible to make selection like ENTSEL with just coords?

    Again, application dependent:

    Code:
    (trans <pt> 3 2)
    [edit] - you can always use Utility Object in lieu of TRANS, if you prefer.
    "How we think determines what we do, and what we do determines what we get."

    Sincpac C3D ~ Autodesk Exchange Apps

    Computer Specs:
    Dell Precision 3660, Core i9-12900K 5.2GHz, 64GB DDR5 RAM, PCIe 4.0 M.2 SSD (RAID 0), 16GB NVIDIA RTX A4000

  5. #5
    Design Visualization Moderator stusic's Avatar
    Join Date
    2004-10
    Location
    Denver, Colorado
    Posts
    1,515
    Login to Give a bone
    0

    Default Re: Possible to make selection like ENTSEL with just coords?

    Quote Originally Posted by BlackBox View Post
    Again, application dependent:

    Code:
    (trans <pt> 3 2)
    [edit] - you can always use Utility Object in lieu of TRANS, if you prefer.
    I tried using the trans method as you show, but it tranposes it incorrectly. From what I've read it seems it's using the wrong ucs...

    I have never heard of the Utility Object (and don't really see much in my seaarch, but my google-fu might be off today).

    My goal is to have an mleader in paperspace display block attribute information. I'm using a point they pick (as though they're selecting the start of an mleader) as the basis to find the block they're selecting. It seems like trans would work if I were just using this in plan view (WCS), but they're often in weird isometric views with various UCS's.

Similar Threads

  1. MAKE MEASURE/ANGLE PRECISION SELECTION STICKY
    By Wish List System in forum Inventor Wish List
    Replies: 0
    Last Post: 2012-07-12, 05:55 AM
  2. 2012: filter the selection and make it as view template
    By diesellam in forum Revit Architecture - General
    Replies: 1
    Last Post: 2012-06-21, 02:04 PM
  3. Toggle-Make-Background Mask and multi-selection
    By doggarn.70892 in forum AutoCAD Civil 3D - General
    Replies: 0
    Last Post: 2009-03-18, 02:29 PM
  4. Replies: 3
    Last Post: 2006-04-10, 11:11 AM
  5. Entsel
    By fletch97 in forum AutoLISP
    Replies: 3
    Last Post: 2005-07-07, 04:37 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
  •