Jump to content

Where oh where has my groupcommand gone?


Recommended Posts

:huh: How do you create a group without naming it? That would be like creating a block without naming it. It has to have a name in order for Autocad to keep track of it. I'm not sure how you were getting away with this in 2006LT? Were you using some kind of custom macro?

 

In the group dialog you can check ''unnamed", pick new, select the objects and you have an unnamed group.

 

And from Cadalyst's Tips section I found this.

 

 
;;;CADALYST 05/04 Tip1948: GGR.LSP Group Objects (c) 2004 Stacey Conrad
;;xxxxxxxxxxxxxxxxxxx Written By: Stacey Conrad Feb. 2004 xxxxxxxxxxxxxxxxxxxx
;;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
(defun c:ggr (/ );MAKES A GROUPING REAL FAST
(setq cmo(getvar "cmdecho") dytm "AM")
(setq lincnt 0 circnt 0 plincnt 0 wipcnt 0 txtcnt 0 blkcnt 0 htchcnt 0 dimcnt 0 miscnt 0)
(setvar "cmdecho" 0)
;;xxxxxxxxxxxxxxxxxxx getting the group name xxxxxxxxxxxxxxxxxxxxxxxxxxx
(setq D (rtos (getvar "CDATE") 2 6)
YR (substr D 3 2)
MO (substr D 5 2)
DAY (substr D 7 2)
HR (substr D 10 2)
MM (substr D 12 2)
SS (substr D 14 2))
(if (= (atoi hr) 12)(setq dytm "PM"))
(if (> (atoi hr) 12)(setq hr (itoa (- (atoi hr) 12)) dytm "PM"))
(if (= (atoi hr) 0)(setq hr "12"))
(setq BTD (strcat MO "-" DAY "-" YR "_" HR "-" MM "-" SS dytm))
;;xxxxxxxxxxxxxxxxxxx selection set xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
(setq ss(ssget))
;;xxxxxxxxxxxxxxxxxxx counting the number of each entity type xxxxxxxxxxxxxxxxx
(if (= ss nil)(princ "\nNo Object Selected")(progn
(setq n -1)
(while (/= (ssname ss (setq n (1+ n))) nil)
(progn
(setq entyp(cdr (assoc 0 (entget(ssname ss n)))))
(if (= entyp "LINE")(setq lincnt (1+ lincnt))
(if (= entyp "CIRCLE")(setq circnt (1+ circnt))
(if (= entyp "LWPOLYLINE")(setq plincnt (1+ plincnt))
(if (= entyp "WIPEOUT")(setq wipcnt (1+ wipcnt))
(if (= entyp "TEXT")(setq txtcnt (1+ txtcnt));
(if (= entyp "INSERT")(setq blkcnt (1+ blkcnt))
(if (= entyp "HATCH")(setq htchcnt (1+ htchcnt))
(if (= entyp "DIMENSION")(setq dimcnt (1+ dimcnt))
(setq miscnt (1+ miscnt))
)
)
)
)
)
)
)
) 
)
)
;;xxxxxxxxxxxxxxxxxxx sorting the info for the group descirption xxxxxxxxxxxxxxxxx
(setq lst1 (list (itoa lincnt) (itoa circnt) (itoa plincnt)(itoa wipcnt) (itoa txtcnt) (itoa blkcnt) (itoa htchcnt) (itoa dimcnt) (itoa miscnt)))
(setq lst2 (list "") nn 0)
(if (/= (setq numb (nth 0 lst1)) "0")
(progn
(setq strng(list (strcat numb "-Line(s) ")) lst2 (append lst2 strng) nn (+ nn 1))
)
)
(if (/= (setq numb (nth 1 lst1)) "0")
(progn
(setq strng(list (strcat numb "-Circle(s) ")) lst2 (append lst2 strng) nn (+ nn 1))
)
)
(if (/= (setq numb (nth 2 lst1)) "0")
(progn
(setq strng(list (strcat numb "-Polyline(s) ")) lst2 (append lst2 strng) nn (+ nn 1))
)
)
(if (/= (setq numb (nth 3 lst1)) "0")
(progn
(setq strng(list (strcat numb "-Wipeout(s) ")) lst2 (append lst2 strng) nn (+ nn 1))
)
)
(if (/= (setq numb (nth 4 lst1)) "0")
(progn
(setq strng(list (strcat numb "-Text(s) ")) lst2 (append lst2 strng) nn (+ nn 1))
)
)
(if (/= (setq numb (nth 5 lst1)) "0")
(progn
(setq strng(list (strcat numb "-Block(s) ")) lst2 (append lst2 strng) nn (+ nn 1))
)
)
(if (/= (setq numb (nth 6 lst1)) "0")
(progn
(setq strng(list (strcat numb "-Hatch(es) ")) lst2 (append lst2 strng) nn (+ nn 1))
)
)
(if (/= (setq numb (nth 7 lst1)) "0")
(progn
(setq strng(list (strcat numb "-Dimension(s) ")) lst2 (append lst2 strng) nn (+ nn 1))
)
)
(if (/= (setq numb (nth 8 lst1)) "0")
(progn
(setq strng(list (strcat numb "-Misc Items(s) ")) lst2 (append lst2 strng) nn (+ nn 1))
)
)
(if (= nn 1)(setq dscrptn (nth 1 lst2)))
(if (= nn 2)(setq dscrptn (strcat (nth 1 lst2)(nth 2 lst2))))
(if (= nn 3)(setq dscrptn (strcat (nth 1 lst2)(nth 2 lst2)(nth 3 lst2))))
(if (= nn 4)(setq dscrptn (strcat (nth 1 lst2)(nth 2 lst2)(nth 3 lst2)(nth 4 lst2))))
(if (= nn 5)(setq dscrptn (strcat (nth 1 lst2)(nth 2 lst2)(nth 3 lst2)(nth 4 lst2)(nth 5 lst2))))
(if (= nn 6)(setq dscrptn (strcat (nth 1 lst2)(nth 2 lst2)(nth 3 lst2)(nth 4 lst2)(nth 5 lst2)(nth 6 lst2))))
(if (= nn 7)(setq dscrptn (strcat (nth 1 lst2)(nth 2 lst2)(nth 3 lst2)(nth 4 lst2)(nth 5 lst2)(nth 6 lst2)(nth 7 lst2))))
(if (= nn (setq dscrptn (strcat (nth 1 lst2)(nth 2 lst2)(nth 3 lst2)(nth 4 lst2)(nth 5 lst2)(nth 6 lst2)(nth 7 lst2)(nth 8 lst2))))
(if (= nn 9)(setq dscrptn (strcat (nth 1 lst2)(nth 2 lst2)(nth 3 lst2)(nth 4 lst2)(nth 5 lst2)(nth 6 lst2)(nth 7 lst2)(nth 8 lst2)(nth 9 lst2))))
;;xxxxxxxxxxxxxxxxxxx the actual command xxxxxxxxxxxxxxxxx
(command "-group" "c" btd dscrptn ss "")
))
(princ)
)

Link to comment
Share on other sites

  • Replies 20
  • Created
  • Last Reply

Top Posters In This Topic

  • TRP

    7

  • Cad64

    5

  • SEANT

    2

  • bonehead411

    2

Top Posters In This Topic

Posted Images

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...