Author Topic: Groups  (Read 3428 times)

0 Members and 1 Guest are viewing this topic.

V-Man

  • Bull Frog
  • Posts: 343
  • I exist therefore I am! Finally Retired!
Groups
« on: March 28, 2007, 11:33:44 AM »

Can anyone tell me how you can explode a group? Basically I got some text that is made into a group. I would like to explode the group.
AutoCAD 9 - 2023, AutoCADMap 2008 - 2010, Revit 2012 - 2022, Autocad Civil 3D 2023

Guest

  • Guest
Re: Groups
« Reply #1 on: March 28, 2007, 11:38:40 AM »
Quote
Command: -group
Enter a group option
[?/Order/Add/Remove/Explode/REName/Selectable/Create] <Create>: e

Enter a group name or [?]:

VVA

  • Newt
  • Posts: 166
Re: Groups
« Reply #2 on: March 28, 2007, 12:25:50 PM »
Posting by kpblc here http://www.autocad.ru/cgi-bin/f1/board.cgi?t=22733Nt
It is translated on English
Code: [Select]
;|=============================================================================
*    Grouping and ungrouping
*    Call:
*  grouping  nil -> ungrouping. t -> grouping
*    Usage:
(kpblc-univ-grouping t)    ;grouping
(kpblc-univ-grouping nil)  ;ungrouping
=============================================================================|;
(defun kpblc-univ-grouping (grouping   /          selset     error_catch
                            item       counter    group      sub_item )
  (defun error_catch (msg)
    (vla-endundomark *kpblc-activedoc*)
    (princ msg)
    ) ;_ end of defun
  (vl-load-com)
  (if (not *kpblc-activedoc*)
    (setq *kpblc-activedoc* (vla-get-activedocument (vlax-get-acad-object)))
    ) ;_ end of if
  (vla-startundomark *kpblc-activedoc*)
  (setq *error* error_catch
        counter 0
        ) ;_ end of setq
  (princ "\nSelect object")
  (if (not (setq selset (ssget "_I")))
    (setq selset (ssget))
    ) ;_ end of if
  (while (and selset (setq item (ssname selset counter)))
    (setq counter (1+ counter))
    (if (and (assoc 330 (entget item))
             (setq group (cdr (assoc 330 (entget item))))
             (eq (cdr (assoc 0 (entget group))) "GROUP")
             ) ;_ end of and
      (progn
        (setq group (vlax-ename->vla-object group))
        (vlax-for sub_item (vla-item (vla-get-groups *kpblc-activedoc*)
                                     (vla-get-name group)
                                     ) ;_ end of vla-item
          (ssadd (vlax-vla-object->ename sub_item) selset)
          ) ;_ end of vlax-for
        (entdel (vlax-vla-object->ename group))
        ) ;_ end of progn
      ) ;_ end of if
    ) ;_ end of while
  (if grouping
    (if (vl-cmdf "_.-group" "_create" "*" "" selset "")
      (princ "\nGrouping successfully")
      (princ "\nError grouping object")
      ) ;_ end of if
    ) ;_ end of if
  (sssetfirst nil nil)
  (vla-endundomark *kpblc-activedoc*)
  (princ)
  ) ;_ end of defun

;;Group object
(defun c:grp ()(kpblc-univ-grouping t))

;;Ungroup (explode) object
(defun c:ung ()(kpblc-univ-grouping nil))
;;Group / Ungroup
(defun c:ugq (/ _answer_)
  (initget "Group Ungroup _ G U")
  (setq _answer_
         (getkword
           "\nSelect actions [Group/Ungroup] <Cancel> : "
           ) ;_ end of getkword
        ) ;_ end of setq
  (if _answer_
    (kpblc-univ-grouping (= _answer_ "G"))
    ) ;_ end of if
  ) ;_ end of defun

(princ "\nType Grp for grouping
        \n     Ung for ungrouping
        \n     Ugq for group/ungroup in command line")

V-Man

  • Bull Frog
  • Posts: 343
  • I exist therefore I am! Finally Retired!
Re: Groups
« Reply #3 on: March 28, 2007, 01:49:15 PM »

thanks guys for the quick responses.
AutoCAD 9 - 2023, AutoCADMap 2008 - 2010, Revit 2012 - 2022, Autocad Civil 3D 2023

VVA

  • Newt
  • Posts: 166
Re: Groups
« Reply #4 on: March 29, 2007, 01:21:57 AM »
>dvarino
Ctrl+H qwick changes value PICKSTYLE with 0 to 1 and back.
 
PICKSTYLE System Variable
Type:  Integer
Saved in:  Registry
Initial value:  1

Controls the use of group selection and associative hatch selection.

0 - No group selection or associative hatch selection
1 - Group selection

2 - Associative hatch selection
3 - Group selection and associative hatch selection
 

Crank

  • Water Moccasin
  • Posts: 1503
Re: Groups
« Reply #5 on: March 29, 2007, 12:51:21 PM »
Ctrl+H qwick changes value PICKSTYLE with 0 to 1 and back.
I always use CTRL+SHIFT+A :)
Vault Professional 2023     +     AEC Collection

Guest

  • Guest
Re: Groups
« Reply #6 on: March 29, 2007, 01:02:02 PM »
Ctrl+H qwick changes value PICKSTYLE with 0 to 1 and back.
I always use CTRL+SHIFT+A :)
It depends on your version.  I think back in '04 it was CTRL+H.  I don't seem to recall it working like that in '05 though; could be wrong.
« Last Edit: March 29, 2007, 01:03:18 PM by Matt W »

VVA

  • Newt
  • Posts: 166
Re: Groups
« Reply #7 on: March 30, 2007, 02:20:31 AM »
Ctrl+H qwick changes value PICKSTYLE with 0 to 1 and back.
I always use CTRL+SHIFT+A :)
It depends on your version.  I think back in '04 it was CTRL+H.  I don't seem to recall it working like that in '05 though; could be wrong.
One more good tips in my coin box
>Matt W It's work in 2004 too

It's Alive!

  • Retired
  • Needs a day job
  • Posts: 8785
  • AKA Daniel
Re: Groups
« Reply #8 on: March 30, 2007, 08:56:41 AM »
Also if you remove CTRL+A from being select all. It will default to toggling the groups