Quick select Section Object

Quick select Section Object

Bart_Dheere
Advocate Advocate
849 Views
7 Replies
Message 1 of 8

Quick select Section Object

Bart_Dheere
Advocate
Advocate
I often enable the Quickselect option to select elements in a drawing at a rapid pace.
A very handy one, but it cannot be done in 1 click.

In a drawing I want to quickly select a Section Plane to change its parameters.
Is there a possibility via Lisp to select the Section Object in the drawing with 1 click (I was thinking of creating a button in the toolbar, which I can do once I have the Lisp)?
0 Likes
Accepted solutions (1)
850 Views
7 Replies
Replies (7)
Message 2 of 8

pendean
Community Legend
Community Legend
QSELECT has a long list of options and choices: how would you like that automated exactly?

What about SELECTSIMILAR (controlled by SELECTSIMILARMODE) and SSX commands that already in the program?
0 Likes
Message 3 of 8

ВeekeeCZ
Consultant
Consultant

A macro/lisp probably could be simple IF you've posted a sample file and possibly a video of what you set in the QSELECT dialog.

0 Likes
Message 4 of 8

komondormrex
Mentor
Mentor

(ssget "_x" '((0 . "section")))

0 Likes
Message 5 of 8

Bart_Dheere
Advocate
Advocate

You can raise or lower a section plane after selecting it.
Therefore, first zoom out, select and zoom back in.
too many steps over and over again...
solution: select section plane with a button.
Quick selection of a section object cast in a lisp is a solution in my opinion.

0 Likes
Message 6 of 8

ВeekeeCZ
Consultant
Consultant

So this section plane, is (always) only one per drawing? 

btw paste this line into the command line, select the plane, and post the result here.

 

(assoc 0 (entget (car (entsel))))

0 Likes
Message 7 of 8

Bart_Dheere
Advocate
Advocate

Indeed, one per drawing.

Command: (assoc 0 (entget (car (entsel))))
Select object: (0 . "SECTIONOBJECT")

0 Likes
Message 8 of 8

ВeekeeCZ
Consultant
Consultant
Accepted solution

Ok, if you want to have a button, put this line into "macro" field. 

(progn (sssetfirst nil (ssget "_X" (list '(0 . "SECTIONOBJECT") (cons 410 (getvar 'ctab))))) (princ))

 

If you want to have a command, then this

(defun c:PLN () (sssetfirst nil (ssget "_X" (list '(0 . "SECTIONOBJECT") (cons 410 (getvar 'ctab))))) (princ))

0 Likes