+ Reply to Thread
Results 1 to 5 of 5
  1. #1
    Forum Newbie
    Using
    AutoCAD 2008
    Join Date
    Jan 2011
    Posts
    2

    Default Deleting un-used block attributes using Lisp

    Registered forum members do not see this ad.

    I am looking for some help.. I have a program that inserts a block and within that block there are many attributes. I would like to then have my program delete the un-used attributes. Can someone get me pointed in the right direction?

  2. #2
    Forum Deity David Bethel's Avatar
    Discipline
    Multi-disciplinary
    David Bethel's Discipline Details
    Discipline
    Multi-disciplinary
    Details
    Commercial Food Service
    Using
    AutoCAD pre 2000
    Join Date
    Dec 2003
    Location
    Newport News, Virginia
    Posts
    2,082

    Default

    That's a bit dangerous. It can lead to multiple problems.

    What is the end result that you are looking for? -David
    R12 (Dos) - A2K

  3. #3
    Luminous Being dbroada's Avatar
    Computer Details
    dbroada's Computer Details
    Operating System:
    Windows 7 Professional
    Computer:
    Dell
    CPU:
    Intel Xeon E5-1603@2,80GHz
    RAM:
    4GB
    Graphics:
    NVIDA Quadro K600
    Monitor:
    DELL 23" & SAMSUNG 21"
    Discipline
    Electro/Mech
    dbroada's Discipline Details
    Occupation
    Design Engineer
    Discipline
    Electro/Mech
    Using
    Electrical 2014
    Join Date
    Nov 2005
    Location
    Sussex, UK
    Posts
    5,558

    Default

    why do you want to do this?

    Once you have the block in the drawing with however many attributes you end up with, you won't be able to insert that block again with a different number of attributes. If you write the code to delete the unused attributes on insertion and your newly inserted block has fewer attributes than your previous block the previous block will be re-defined to the lower number of attributes.

    Having said all that it shouldn't be too hard but I have forgotten all the LISP I ever knew so I'll let somebody else answer your question.
    "That's it. It's one thing for a ghost to terrorize my children, but quite another for him to play my Theremin." Homer Simpson
    "Everything in drafting is logical. Except what isn’t." - Gavin Guile. (from the Lightbringer series of books by Brent Weeks)

    Dave

  4. #4
    Forum Newbie
    Using
    AutoCAD 2008
    Join Date
    Jan 2011
    Posts
    2

    Default

    I guess I didn't think about that. I dont want to do that so I will go a different direction.. Thanks

  5. #5
    Luminous Being alanjt's Avatar
    Using
    Civil 3D 2013
    Join Date
    Apr 2008
    Posts
    6,149

    Default

    Registered forum members do not see this ad.

    Just make the unused attributes blank (put "" as the text string).
    DropBox | finding the light...
    Seann: ...it went crazy ex-girlfriend on me...
    eric_monceaux...its pretty funny seeing two AutoCAD Gods give each other flak...

Similar Threads

  1. LISP to insert two attributes, pline length, and mtext into block
    By chelsea1307 in forum AutoLISP, Visual LISP & DCL
    Replies: 23
    Last Post: 1st Jun 2011, 03:00 pm
  2. Modify LISP for changing block attributes
    By hosannabizarre in forum AutoLISP, Visual LISP & DCL
    Replies: 2
    Last Post: 27th Sep 2010, 08:30 am
  3. Add attributes to BLOCK in LISP with ENTMAKE
    By sadhu in forum AutoLISP, Visual LISP & DCL
    Replies: 8
    Last Post: 30th Aug 2010, 08:13 am
  4. Auto-edit (LISP>) Title Block Attributes
    By bennn in forum AutoCAD General
    Replies: 10
    Last Post: 30th May 2010, 05:43 pm
  5. Lisp for placing a block with attributes to multiple points
    By Jadeous in forum AutoLISP, Visual LISP & DCL
    Replies: 15
    Last Post: 6th Mar 2009, 10:54 pm

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts