How to make polygonal selections without starting a command first

Can anybody steer me in the right direction for the above question.

I have tried using the SELECT command but this doesn't seem to do anything.

It doesn't seem to be able to do anything with what you have selected; as soon as I have finished selecting the elements I want and pressed enter or typed a command, the selection set becomes unselected!

I basically want to select some objects using either a window polygon or crossing polygon before I issue a command, but cannot find any other way of invoking these windowing techniques other than the SELECT command.

After typing SELECT, the prompt in the command bar says "Select entities to include in set" so I select entities, but there is no way to finish this command with the entities highlighted for you to then take further action.

I am obviously not using this in the correct way, so if there is another way of making polygonal selections without invoking commands first, how do I do it and if SELECT is the wrong command to achieve this, what is it actually used for?

Many Thanks in advance,

David

Comments

  • You wrote: "...there is no way to finish this command with the entities highlighted for you to then take further action" "...the selection set becomes unselected when ending the select command..."
    I agree it feels a bit strange but what you previously selected via SELECT is still available to you via p.
    For each command which prompts you to select entities entering a p on the command line will bring back the entities previously selected with the SELECT command...
  • "I basically want to select some objects using either a window polygon or crossing polygon before I issue a command, but cannot find any other way of invoking these windowing techniques other than the SELECT command."

    For me, one thing that makes Acad-based programs minimum-click fast and ever-ready, is that at any time you can do exactly that, without having any command active. No need to use SELECT - it already selects by default, incl window and crossing selection, when nothing else is happening.

    There are settings in Drafting>Entity Selection but nothing AFAIK that turns the above on/off - isn't it always On?
  • Ferdinand,

    Thanks for the information, it seems to work as I thought.

    It is a bit strange that a command can only be used after it has finished.

    It reminds me of a Two Ronnies sketch, when they were doing Mastermind and were giving the first answer to the second question!

    Tom,
    I don't think you quite got what I was saying; there seems to be no way you can invoke either a window polygon, inside, outside, fence or any of the other selection methods without first being in a command.

    The only ones available before activating a command are: single pick, window and window crossing, unless I am very much mistaken.

    Thanks for the replies,

    David
  • I see what you mean
  • Thinking about it, wouldn't it be handy if there was an icon or keyboard shortcut that would invoke the selection options, so you could choose from all the options available, just like when you are in a command.

    Anybody else think this might be useful?

    David
  • You can define a custom command that adds (sssetfirst) to SELECT:
    [code](defun c:AQ () (command "_select" pause) (sssetfirst nil (ssget "P"))  )[/code]
  • Anthony,

    Thanks for this, I ran the routine, then right mouse clicked and the selection stayed "live" for me to then run another command.

    Brilliant, thank you, I will add this to my menu with a shortcut key.

    Thanks Again,

    David
  • You can define a custom command that add (sssetfirst) to SELECT:
    (defun c:AQ () (command "_select" pause) (sssetfirst nil (ssget "P"))  )  


    This solution may not have the same features like the SELECT Command, because all options cp, wp ... etc are missing.
    The grip-handling also will be different if using your code.

    The behavior of (command "_select" ...) is differnet according to some sysvars - PICKFIRST, PICKADD ... etc.
    In Acad also the "undocumented" sysvar QAFLAGS  - not available in BricsCAD - has also influence to the command.
    See ... https://www.manusoft.com/resources/acadexposed/sysvars.html

    The best way I found to define a shorcut for Select in  lisp is ...
    [code]PASTE CODE HERE
    (defun c:ss ()(vla-SendCommand(vla-get-activedocument(vlax-get-acad-object))"_.select "))
    [/code]
    Please pay attention to the whitespace in "_select " ;)
    ... it works like PSELECT in Acad when acopm.arx was loaded or the Properties has been called once.
    ... the code (vlax-get-acad-object) works in BricsCAD too ... there is no function like (vlax-get-BricsCAD-object) ... but would be nice!

    Hope it helps
    Peter

  • "I basically want to select some objects using either a window polygon or crossing polygon before I issue a command, but cannot find any other way of invoking these windowing techniques other than the SELECT command."

    For me, one thing that makes Acad-based programs minimum-click fast and ever-ready, is that at any time you can do exactly that, without having any command active. No need to use SELECT - it already selects by default, incl window and crossing selection, when nothing else is happening.

    There are settings in Drafting>Entity Selection but nothing AFAIK that turns the above on/off - isn't it always On?
    If PICKFIRST  = ON you can first create a selection set, then launch a command.
  • @Peter:
    My test shows that Anthony's solution works just fine. Options such as CP and WP can be used.
    Note 1: The QAFLAGS variable does exist in BC.
    Note 2: It would be a bad idea to introduce (vlax-get-bricscad-object) as it would break Lisp compatibility.
  • My test shows that Anthony's solution works just fine. Options such as CP and WP can be used.

    ... the difference is: there is no message in the command line ... maybe a sysvar is missing
    The normal response to SELECT is ... Select entities to include in set:
    ... an if you input an option like CP is ... First vertex of crossing polygon:
    This was the reason for the solution with SendCommand.

    @Note 1: The QAFLAGS variable does exist in BC.
    ... you are right! ... QAFLAGS is missing just in the command preview in Acad ... not in BricsCAD.

    @Note 2: It would be a bad idea to introduce (vlax-get-bricscad-object) as it would break Lisp compatibility.
    ... think on vle-extension.lsp ... same matter.
    It was not the miss of BricsCAD to introduce a wrong function name ... better would be: vlax-get-application-object ... which makes no statement, which application is running.
    It was a little irritation for me, when I'v tested lisp-compatibility of BricsCAD when using vlax-get-acad-object ... oops??? whats that.
    Here is an application name in the function name.

    I find the position of BricsCAD very positiv in this matter, how to get forward and take care for the maintenance process of lisp.

    Thank you for response ...
    Peter

  • @Peter:

    Regarding Anthony's code:
    Again I cannot confirm your findings. I my tests all messages you say are lacking do display. You should check your CMDECHO setting.

    Regarding compatibility:
    You are right in suggesting that compatibility works in two directions.
    BricsCAD's Lisp engine should strive to be compatible with AutoCAD in the sense that what works in AC should also work in BC without making any changes to the Lisp code. Therefore introducing vlax-get-bricscad-object is not a good idea.
    On the other hand there is no reason to halt all further Lisp development when that goal has been achieved. What works in BC need not work in AC. Although almost all current vle-* functions can be emulated in AC, I hope that more unique functions will be added including those that cannot be emulated.
    At the top of my current wish list: vle-explode (same as vla-explode but for all objects that can be exploded with the _Explode command).
This discussion has been closed.