×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Remove Group LISP

Remove Group LISP

Remove Group LISP

(OP)
Does anyone know of a LISP that will delete all groups from a drawing. I don't want to delete the enities of the group - but just want to get rid of the grouping without having to manually delete each grouped object (hope that makes sense)

Thanks!

RE: Remove Group LISP

By groups do you mean blocks?

RE: Remove Group LISP

(OP)
No - they aren't blocks exactly - they are a named selection set of objects - they act almost as blocks but they are able to be edited.

RE: Remove Group LISP

;Disband - a command to disband all Groups in a Drawing
;without destroying their member elements
;Please post debugging results
;written by Dr. Tigrek
;www.homescript.com

(defun C:Disband()
      (setq objdict (namedobjdict))
    (setq grpdict (dictsearch objdict "ACAD_GROUP"))

      (IF (setq SONNY (dxf 3 grpdict))
          (princ "\nGroups and Bands Found in County - and disbanded:")
        (princ "\nCounty clean of Groups and Bands")
      )
    (princ "\n")
  (while (setq grpdict (member (assoc 3 grpdict) grpdict))
    (princ "\n")
    (princ  (setq GroupName (cdr (car grpdict))))

    (setq GroupEDNA (cdr (assoc 350 grpdict)))

    (entdel GroupEDNA)
    (setq grpdict (cdr grpdict))
    
    )

(princ)
  )

RE: Remove Group LISP

(OP)
Thanks for the LISP. Can you tell me what this means?

Command:
Command: DISBAND
; error: no function definition: DXF

Command:

This was copied from the command line after I ran the program.

RE: Remove Group LISP

Please add the following function definition to the lsp file after the end of the function disband.
Thanks for the debug feedback.

(defun dxf (n ed) (cdr (assoc n ed)))

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources