Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: Using lisp to Edit Attributes in a Title Block

  1. #1
    Member
    Join Date
    2003-03
    Posts
    11
    Login to Give a bone
    0

    Default Using lisp to Edit Attributes in a Title Block

    Hi,

    Does anyone know of a lisp routine that will let me edit an Attribute in a Title block in multiple Dwgs?
    For example
    We use attributes for our Revision Notes.

    Rev No. Rev Date Rev Description

    00 08.09.2007 Permit issue (<-----Attributes)

    Now I have to add, to above, a Construction issue

    Rev No. Rev Date Rev Description

    00 08.09.2007 Permit issue (<-----Attributes)
    01 10.09.2007 Construction issue (<-----Attributes)

    How can I do this with a lisp routine so that i don't have to use ddatte and enter the text manually?

    I've tried writing a lisp routine (very new to lisp first attempt) but it triggers a dialogue box for the Title Block attributes and then I am stuck. I just want it to select the appropriate attribute and replace it with a set value.

    I've tried the ATTDIA, FILEDIA, CMDDIA commands to suppress the dialogue box but it still keeps popping up. Not even sure that would solve my problem.

    Regards

    Paul

  2. #2
    Administrator rkmcswain's Avatar
    Join Date
    2004-09
    Location
    Earth
    Posts
    9,805
    Login to Give a bone
    0

    Exclamation Re: Using lisp to Edit Attributes in a Title Block

    Let me get this straight....

    You want to programatically insert a block that contains attributes and fill in those attributes with known values? (or maybe the attributes are already part of the main block and are blank now...?)

    Is the block/atts inserted in the same spot in each drawing?

    Do you have to do this to many drawings? If so, do you want to make this change without even opening all these drawings? Or do you just want a routine to run now and then when the time arises?
    R.K. McSwain | CAD Panacea |

  3. #3
    Certifiable AUGI Addict ccowgill's Avatar
    Join Date
    2004-08
    Location
    Iron Station, NC
    Posts
    3,198
    Login to Give a bone
    0

    Default Re: Using lisp to Edit Attributes in a Title Block

    you may have to tweak these programs but I think it gives you a huge jump start on a program of course you will probably need to reorder everything, change the attribute tag names, and possibly even modify your title block to be more compatible. there are a couple of other things that may need to be tweaked, I think that this file is designed to be run with another program that takes care of some of the variables. the sheet control is specified by the layout tab name, this may also need to be tweaked


    I forgot the procedure:
    With the file name Revisions.xls in the x-folder. To specify the sheets that revisions apply to, follow this format:

    ALL applies to all sheets

    X####-## applies to the specific sheet

    -X####-## applies to all sheets, excluding the sheet entered with a minus sign.

    -- in the revision# column is to be used for the As-Recorded revision note only – this triggers the use of Red Text in the revision box.
    Attached Files Attached Files
    Last edited by ccowgill; 2007-07-26 at 12:01 PM. Reason: add instructions

  4. #4
    Member
    Join Date
    2003-03
    Posts
    11
    Login to Give a bone
    0

    Default Re: Using lisp to Edit Attributes in a Title Block

    Hi Guys,

    Thanks for your replys

    I have a Title Block with Attributes tied into the revision data.
    I now have to go into each Dwg and add a revision number, date and description to each and every Dwg. e.g. 01 07.26.07 Construction Issue

    I just need a routine for every now again.

    As I said I am new to Lisp and this is my first attempt. But when I try to edit the attributes and sub in my Setq values the routine opens the dialogue box and and waits for me to scroll thru the attibutes to the revisions and then enter them manualy. Which is what I'm trying to avoid.
    I realise I have a ways to go but any help along the way helps!!

    Regards

    Paul

  5. #5
    Administrator rkmcswain's Avatar
    Join Date
    2004-09
    Location
    Earth
    Posts
    9,805
    Login to Give a bone
    0

    Default Re: Using lisp to Edit Attributes in a Title Block

    If you just want a quick routine to use every now and then, then this should work:

    Code:
    
    
    (command "._attedit" "_N" "_N" "BLOCKNAME" "TAGNAME" "*" "OLD_STRING" "NEW_STRING")
    
    
    R.K. McSwain | CAD Panacea |

  6. #6
    Certifiable AUGI Addict ccowgill's Avatar
    Join Date
    2004-08
    Location
    Iron Station, NC
    Posts
    3,198
    Login to Give a bone
    0

    Default Re: Using lisp to Edit Attributes in a Title Block

    Quote Originally Posted by PKells
    Hi Guys,

    Thanks for your replys

    I have a Title Block with Attributes tied into the revision data.
    I now have to go into each Dwg and add a revision number, date and description to each and every Dwg. e.g. 01 07.26.07 Construction Issue

    I just need a routine for every now again.

    As I said I am new to Lisp and this is my first attempt. But when I try to edit the attributes and sub in my Setq values the routine opens the dialogue box and and waits for me to scroll thru the attibutes to the revisions and then enter them manualy. Which is what I'm trying to avoid.
    I realise I have a ways to go but any help along the way helps!!

    Regards

    Paul
    if you could post a copy of your title block, I might be able to modify my routine to work for what you need.

  7. #7
    I could stop if I wanted to
    Join Date
    2005-08
    Posts
    378
    Login to Give a bone
    0

    Cool Re: Using lisp to Edit Attributes in a Title Block

    rkmcswain,
    Am I missing something here or have things changed in the newer versions ?
    I am using 2008 and when i tried your simple routine I kept getting a request to select attributes.
    Below is a copy of the command line.



    Command: (command "._attedit" "_N" "_Y" "Sheet Details-DSA"
    "WHAT_IS_THE_CURRENT_ISSUE" "*" "#" "1")
    ._attedit
    Edit attributes one at a time? [Yes/No] <Y>: _N
    Performing global editing of attribute values.
    Edit only attributes visible on screen? [Yes/No] <Y>: _Y
    Enter block name specification <*>: Sheet Details-DSA
    Enter attribute tag specification <*>: WHAT_IS_THE_CURRENT_ISSUE
    Enter attribute value specification <*>: * Select Attributes: #
    *Invalid selection*
    Expects a point or Window/Last/Crossing/BOX/Fence/WPolygon/CPolygon
    ; error: Function cancelled


    If I have the command with the 2 "_N" I get another window open and the routine stops.
    Even if i put it in manually I still get asked to select the attribute.


    Stephen

  8. #8
    Administrator rkmcswain's Avatar
    Join Date
    2004-09
    Location
    Earth
    Posts
    9,805
    Login to Give a bone
    0

    Exclamation Re: Using lisp to Edit Attributes in a Title Block

    This:

    Code:
    (command "._attedit" "_N" "_N" "Sheet Details-DSA" "WHAT_IS_THE_CURRENT_ISSUE" "*" "#" "1")
    ...works fine with a block I made up named "Sheet Details-DSA", that contains 1 attribute whose tag is "WHAT_IS_THE_CURRENT_ISSUE"

    I also added more attributes to the same block and copied the block so that there are multiple insertions of the block.

    The same code still works.
    R.K. McSwain | CAD Panacea |

  9. #9
    I could stop if I wanted to
    Join Date
    2005-08
    Posts
    378
    Login to Give a bone
    0

    Cool Re: Using lisp to Edit Attributes in a Title Block

    rkmcswain,
    hmmm, is there any variables that you know of that could effect this working ?

    Stephen

  10. #10
    I could stop if I wanted to
    Join Date
    2005-08
    Posts
    378
    Login to Give a bone
    0

    Cool Re: Using lisp to Edit Attributes in a Title Block

    Guys,
    Can anyone assist further here ?
    I have played with simple code to edit an attribute and it does work (sort of) though it open the text window and needs to be closed. The second time around it doesn't work and the window still appears. Can anyone assist any further ?

    Stephen

Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 5
    Last Post: 2013-05-18, 01:44 PM
  2. Title block must have attributes in CAD format
    By BecFra in forum Revit - Plotting/Printing/Exporting
    Replies: 2
    Last Post: 2009-08-13, 12:20 PM
  3. Title block w/ Attributes
    By TDIGUY in forum AutoCAD General
    Replies: 2
    Last Post: 2008-01-03, 01:35 PM
  4. Edit block with attributes tip
    By johan d in forum AutoCAD Tips & Tricks
    Replies: 0
    Last Post: 2006-03-30, 02:36 PM
  5. Title block attributes
    By a_meteni in forum AutoCAD General
    Replies: 1
    Last Post: 2004-11-10, 02:27 PM

Posting Permissions

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