See the top rated post in this thread. Click here

Results 1 to 5 of 5

Thread: Get PickFirst selection set from AutoLISP

  1. #1
    Member
    Join Date
    2015-01
    Posts
    43
    Login to Give a bone
    0

    Default Get PickFirst selection set from AutoLISP

    I'm writing a routine to select a layer from a dcl listbox. If the user has already selected an entity, I want the entity layer to already be selected when the dialog box opens. The only information I can find on the PickFirst SelectionSet is for .NET programming. Is there anyway to access this set in AutoLISP?

    As always, any help is greatly appreciated

  2. #2
    All AUGI, all the time
    Join Date
    2010-06
    Posts
    962
    Login to Give a bone
    1

    Default Re: Get PickFirst selection set from AutoLISP

    Code:
    (setq ss (ssget "_I"))

  3. #3
    Member
    Join Date
    2015-01
    Posts
    43
    Login to Give a bone
    0

    Default Re: Get PickFirst selection set from AutoLISP

    Thanks for the tip Tharwat, that did the trick. I actually knew about that mode but I don't think I was implementing it correctly. Works perfectly now though!

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

    Default Re: Get PickFirst selection set from AutoLISP

    FWIW, (ssget) accepts an implied selection if one exists, or prompts for a selection.
    "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
    All AUGI, all the time
    Join Date
    2010-06
    Posts
    962
    Login to Give a bone
    0

    Default Re: Get PickFirst selection set from AutoLISP

    Quote Originally Posted by deheylen690271 View Post
    Thanks for the tip Tharwat, that did the trick. I actually knew about that mode but I don't think I was implementing it correctly. Works perfectly now though!
    Good to know.

    Happy coding.

Similar Threads

  1. 2016: PICKFIRST set to 1 - what else is wrong?
    By Opie in forum AutoCAD General
    Replies: 8
    Last Post: 2016-05-20, 12:50 PM
  2. 2014: Hatching and PICKFIRST
    By jpcadconsulting347236 in forum AutoCAD General
    Replies: 1
    Last Post: 2014-02-20, 12:36 AM
  3. Universal PICKFIRST system variable for Noun/Verb selection
    By Wish List System in forum AutoCAD Wish List
    Replies: 2
    Last Post: 2012-10-01, 03:21 PM
  4. Pickfirst variable problem
    By mrakarees in forum CAD Management - General
    Replies: 6
    Last Post: 2008-10-08, 05:40 PM
  5. Pickfirst
    By marble in forum AutoCAD General
    Replies: 3
    Last Post: 2005-03-17, 01:20 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
  •