TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started by: roy_043 on September 21, 2017, 09:34:36 AM
-
I can't seem to find any useful information on the "G" keyword of the ssget function.
What is the correct syntax?
(ssget "_G" ...)
Note: I know how to approach this via the namedobjdict.
-
are you sure that ssget supports "_G" keyword?
-
G Groups
Selects all objects within a specified Group.
Ssget options:
A All
B Box
C Crossing
CP Crossing Polygon
: D Duplicates OK
:E Everything in aperture
F Fence
G Groups
I Implied
L Last
:L Rejects locked layers
M Multiple
:N Nested
P Previous
: P Rejects Viewport
:R Allows entities in a long transaction to be selected.
:S Force single object selection only
:U Enables subentity selection - 2006+
:V Forces subentity selection - 2006+
W Window
WP Window Polygon
X Extended search (search whole database)
+. Point Selection Mode
The string "_+.:S" is a combination of a number of ssget mode strings, each component of which has a different meaning:
"_" (underscore) allows for variation in language; prefixing mode string operators with an underscore forces
the English version.
"+." This undocumented mode string forces ssget to remain in 'point' mode, similar to setting PICKAUTO to 0.
":S" As stated in the Visual LISP IDE Help Documentation, this mode string forces a single selection, that is,
the user may attempt to select a number of objects only once. When combined with the "+." mode string, this
forces a single object selection.
-
AFAIK, this mode string was not fully/correctly implemented - see:
http://www.lee-mac.com/ssget.html#modes
https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/ssget-quot-g-quot-syntax/td-p/828577
-
see: https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/ssget-quot-g-quot-syntax/td-p/828577 (https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/ssget-quot-g-quot-syntax/td-p/828577)
thanks Lee I completely forgot about that discussion, other mysteries:
Comando: (ssget "g") nil
Comando: (ssget "-g") Selezionare oggetti:
Comando: (ssget "-x") Selezionare oggetti:
Comando: (ssget "xa") ; errore: stringa in modalità ssget errata
Comando: (ssget "xb") ; errore: stringa in modalità ssget errata
Comando: (ssget "xc") ; errore: argomento punto errato
Comando: (ssget "xd") ; errore: stringa in modalità ssget errata
Comando: (ssget "xe") ; errore: stringa in modalità ssget errata
Comando: (ssget "xf") <Selection set: 100>
Comando: (ssget "xg") <Selection set: 102>
Comando: (ssget "xh") ; errore: stringa in modalità ssget errata
Comando: (ssget "xi") <Selection set: 105>
Comando: (ssget "xj") ; errore: stringa in modalità ssget errata
Comando: (ssget "xk") ; errore: stringa in modalità ssget errata
Comando: (ssget "xm") <Selection set: 109>...
-
Thanks for your answers.
The latest documentation (http://help.autodesk.com/view/OARX/2018/ENU/?guid=GUID-0F37CC5E-1559-4011-B8CF-A3BA0973B2C3) mentions that "G" has to be combined with "+" or "-".
-
It seems that they've updated the documentation significantly... :-o
-
It seems that they've updated the documentation significantly... :o
They probably got most of it from your site. >:D
-
It seems that they've updated the documentation significantly... :o
They probably got most of it from your site. >:D
:-D
-
Thanks for your answers.
The latest documentation (http://help.autodesk.com/view/OARX/2018/ENU/?guid=GUID-0F37CC5E-1559-4011-B8CF-A3BA0973B2C3) mentions that "G" has to be combined with "+" or "-".
From: http://help.autodesk.com/view/OARX/2018/ENU/?guid=GUID-0F37CC5E-1559-4011-B8CF-A3BA0973B2C3
;; Remove the Multiple and All selection modes
(ssget "-M-A")
Select objects: ?
*Invalid selection*
Expects a point or Window/Last/Crossing/BOX/Fence/WPolygon/CPolygon/Group/Add/Remove/Previous/Undo/AUto/SIngle
---------------------------------------
Tested in 2013:
Comando: (ssget "-M-A") ; errore: stringa in modalità ssget errata
Comando: (ssget "-_M-_A"); errore: stringa in modalità ssget errata
Comando: (ssget "_-M_-A") ; errore: stringa in modalità ssget errata
-g works:
Comando: (ssget "-g")
Selezionare oggetti: ?
*Selezione non valida*
Richiede un punto o Finestra/Ultimo/Interseca/Riquadro/Tutto/iNTercetta/FPoligono/IPoligono/AGgiungi/Elimina/Multiplo/Precedente/Annulla/AUto/SIngolo
Comando: (ssget)
Selezionare oggetti: ?
*Selezione non valida*
Richiede un punto o Finestra/Ultimo/Interseca/Riquadro/Tutto/iNTercetta/FPoligono/IPoligono/Gruppo/AGgiungi/Elimina/Multiplo/Precedente/Annulla/AUto/SIngolo
-
Maybe need something like this: :wideeyed2:
Comando: (ssget "_g" '((2 . "GroupName")))
nil
Comando: (ssget "_g" '((310 . "GroupName")))
; errore: carattere non valido nel gruppo 1004