Anuncios

The Autodesk Community Forums has a new look. Read more about what's changed on the Community Announcements board.

Autocad Quick Select shortcut

Anonymous

Autocad Quick Select shortcut

Anonymous
No aplicable

Good afternoon. Is it possible to create a shortcut with a certain autocomplete in the Quick Select command? For example, a shortcut that selects all lines with a 45 ° angle. Thank you.

0 Me gusta
Responder
2.609 Vistas
5 Respuestas
Respuestas (5)

Muhammed.OPERA
Advisor
Advisor

Hi @Anonymous

you can select the options like the pic.

Untitled.png

 

 

 


Muhammed Mamdouh (OPERA)
Structural Engineer, Instructor
Facebook |LinkedIn

EESignature

0 Me gusta

Anonymous
No aplicable

Hello. Thank you for your attention. I know how to work with Quick Select. My question is whether there is a way to create a shortcut that does this automatically.

0 Me gusta

pendean
Community Legend
Community Legend
You will need to move away from that pop-up command and automate with LISP: ask in the LISP forum for guidance https://forums.autodesk.com/t5/autocad-customization/ct-p/AutoCADTopic1

Muhammed.OPERA
Advisor
Advisor

Hi @Anonymous 

Sorry i misunderstand-ed  you .

You can Use Lisp and AutoLisp files as @pendean said.

Look for the function of selection in LISP guide "SSget" and some other AutoLISP functions to filter your selection in AutoLISP and Visual LISP Guide. (VL-Functions).

 


Muhammed Mamdouh (OPERA)
Structural Engineer, Instructor
Facebook |LinkedIn

EESignature

0 Me gusta

tramber
Advisor
Advisor

Well, the angle of a line has to be tested after the ssget has done its job.

I would have suggested to use FILTER instead of the Quickselection thing but the angle is not present as a criteria.

And, unfortunatly too, FILTER is not scriptable.

It brings us to lisp.

 

(defun c:sang45(/ sel selout cont)
  (sssetfirst nil)
  (setq sel(ssget '((0 . "LINE")))
    selout(ssadd)
    cont 0)
  (repeat(sslength sel)
    (setq line(ssname sel cont))
    (if(member(angle(cdr(assoc 10(entget line)))(cdr(assoc 11(entget line))))
          (list (/ pi 4)(* 5(/ pi 4))))
      (setq selout(ssadd line selout)))
    (setq cont (1+ cont))
    )
  (sssetfirst nil selout)
  (princ)
  )

Just type sang45

 (modified)