Jump to content

Recommended Posts

Posted

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

Posted

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*")))

  • 1 month later...
Posted

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)

Posted
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)

 

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.

Posted

Thanks for the history. 2011 was my first version so i am missing a lot of the history.

Posted

I started with r12 with SoftDesk plugins. Showing my age, but I've see posts by others who started earlier.

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...