Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: select result lisp modification

  1. #1
    Member chad.beussink's Avatar
    Join Date
    2006-08
    Posts
    23
    Login to Give a bone
    0

    Default select result lisp modification

    I have a select result lisp file that I found here in the post. The command works great, but I need help in modifying it just a little. Whenever I use a command that does not need to create a result, such as DISTANCE, I get a message on the command line that says "0 entities created and stored in Result." I really don't want to see this in my command line. I tried removing (princ " entities created and stored in Result.") from the lisp, but that didn't work. I am not very good at editing or writing lisp routines. Can someone modify this lisp routine for me so that this message does not appear on the command line? Any help is greatly appreciated.

    Thanks,
    Chad
    Attached Files Attached Files

  2. #2
    I could stop if I wanted to
    Join Date
    2006-07
    Posts
    233
    Login to Give a bone
    0

    Default Re: select result lisp modification

    Remove both of these lines and that should do it.
    (princ (sslength $selResult))
    (princ " entities created and stored in Result.")

  3. #3
    Member chad.beussink's Avatar
    Join Date
    2006-08
    Posts
    23
    Login to Give a bone
    0

    Smile Re: select result lisp modification

    That did it. Thanks a lot Lions60. You da man!

  4. #4
    I could stop if I wanted to
    Join Date
    2006-07
    Posts
    233
    Login to Give a bone
    0

    Default Re: select result lisp modification

    No problem, just glad i could help since most of the time it's me needing the help.

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

    Default Re: select result lisp modification

    That's the 1st version of my routine. Here's the updated one - some requests were incorporated such as the ability to have results from several instructions before and splitting a multiple copy command into its separate instructions.

    And to make life easier for the user I'd suggest adding the following to your Custom.CUI:
    • Create 2 new commands
      • 1st called Select Result with 'Result as the macro
      • 2nd called Select Result 0 with 'Result;0 as the macro
    • Then drag these two into the Keyboard Shortcuts / Shortcut Keys
    • Select Select Result under the Shortcut Keys branch, click inside the Key(s) field in the right, click the button to the right, press Ctrl+Alt+R to assign this to the command.
    • Do the same for Select Result 0, but change the key sequence to Ctrl+Shift_R.
    • OK out of CUI editor.
    • You can now press Ctrl+Shift+R to select the very last created / copied set of entities. Or press Ctrl+Alt+R to be asked for one of the last 5 sets of entities.
    • You could use other shortcuts if you'd prefer - these just don't clash with any other standard shortcuts.
    If you want to have more than 5 "history" selections, modify the $Result-Length 5 (on the 19th line in the LSP) to whatever number you prefer.
    Attached Files Attached Files

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

    Default Re: select result lisp modification

    Very nice! Since it need to be loaded before the objects are created I'm adding it to my Acaddoc.lsp now.
    Thanks,

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

    Default Re: select result lisp modification

    Glad you liked it ... and yes, thanks for mentioning: You need to have this code loaded for each DWG otherwise it won't do anything. I also think the acaddoc.lsp is the best place to load this, you could add it to StartupSuite / into the MNL of your Custom MNU/CUI/CUIx, or add it as a Lisp file into your CUI, or various other ways: http://lee-mac.com/autoloading.html

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

    Default Re: select result lisp modification

    Still use this routine, but I've modified the getkword to allow picking selection option with the mouse.
    Attached Files Attached Files

  9. #9
    Login to Give a bone
    0

    Default Re: select result lisp modification

    Hello everyone ,

    why i am having this Message while trying to use this lisp with Dynamic blocks ?


    Which one of these do you want to select? [0-MOVE/1-COPY/2-COPY/3-MOVE/4-COPY/]<0>: 4
    ; error: bad argument type: lselsetp nil


    Thanks

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

    Default Re: select result lisp modification

    Quote Originally Posted by ahmedcivil14806366 View Post
    Hello everyone ,

    why i am having this Message while trying to use this lisp with Dynamic blocks ?


    Which one of these do you want to select? [0-MOVE/1-COPY/2-COPY/3-MOVE/4-COPY/]<0>: 4
    ; error: bad argument type: lselsetp nil


    Thanks
    Keep in mind when irneb wrote this code years before Dynamic blocks were introduced and may need modification to work with Effective Names.
    Here's example code by Lee Mac that may help: http://www.lee-mac.com/effectivename.html

Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 5
    Last Post: 2012-05-31, 02:28 PM
  2. Replies: 7
    Last Post: 2011-11-18, 12:08 PM
  3. Modification to a LISP routine
    By cwjean76 in forum AutoLISP
    Replies: 2
    Last Post: 2008-05-19, 06:32 PM
  4. Brick Lisp modification requested
    By BCrouse in forum AutoLISP
    Replies: 0
    Last Post: 2008-04-17, 08:15 PM
  5. Replies: 0
    Last Post: 2006-07-19, 05:36 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
  •