SunnyTurtle Posted January 12, 2017 Posted January 12, 2017 Hello everyone. I am having a mental blank as i am sure i know the solution to this but cannot remember I am trying to have a shortcut to select all xrefs starting with X* I have tried this but i does not work. (defun c:xrss () (command "SELECT" (ssget "X" (list (cons 0 "INSERT") (cons 2 "X*") ) ) "" ) ) However this does work (defun c:xrerase () (command "erase" (ssget "X" (list (cons 0 "INSERT") (cons 2 "X*") ) ) "" ) ) Can anyone explain what is happening here. I don't need a quick fix but would like to understand the process Quote
tombu Posted January 12, 2017 Posted January 12, 2017 The (ssget "X" (list(cons 0 "INSERT")(cons 2 "X*")) part creates the selection set, what are you trying to do with "SELECT"? Try (sssetfirst nil(ssget "X" (list(cons 0 "INSERT")(cons 2 "X*"))) Quote
SunnyTurtle Posted February 22, 2017 Author Posted February 22, 2017 Thank tombu I was unaware of the function. To make sure I understand correctly "sssetfirst" used to instruct autocad to grip something? (sssetfirst gripset [pickset]) gripset is redundant and is always nil pickset is a selection set you want to grip (select to autocad user) Quote
tombu Posted February 22, 2017 Posted February 22, 2017 Thank tombuI was unaware of the function. To make sure I understand correctly "sssetfirst" used to instruct autocad to grip something? (sssetfirst gripset [pickset]) gripset is redundant and is always nil pickset is a selection set you want to grip (select to autocad user) In r14 (not 2014) early days of grips objects gripped were a gripset and objects selected were a pickset. After that they simplified it the way it is now. So as little as possible code would have to be rewritten we now use nil instead of gripset. Quote
SunnyTurtle Posted February 22, 2017 Author Posted February 22, 2017 Thanks for the history. 2011 was my first version so i am missing a lot of the history. Quote
tombu Posted February 22, 2017 Posted February 22, 2017 I started with r12 with SoftDesk plugins. Showing my age, but I've see posts by others who started earlier. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.