Jump to content

LISP to move multiple attribute values in the same block


MonkeyTurnip

Recommended Posts

I have a weird problem, i have approx 2000 title blocks that uses the revision block from the bottom, so the newest revision is the bottom most (row 1) and all the previous revisions move up 1. i can't modify the block as its a client block, but i have to revise up all the drawings. this means copying 5 revision up 1 attribute line leaving the bottom line blank for the new revision.

 

have have tried to modify Lee mac's scripts to no joy (my skill set). the one i was hopeful of was his attribute bump, but as there is attributes before and after (the revision portion is part of the total title block attributes) it moves other data up with it. 

 

the block name is always the same "tittleblock" and all the revison boxes are called 

 

REV13            REVDATE13                  REVDRAW13                      REVNOTE13         REVENG13             REVAPPRO13

REV12            REVDATE12                  REVDRAW12                      REVNOTE12         REVENG12             REVAPPRO12

REV11            REVDATE11                  REVDRAW11                      REVNOTE11         REVENG11             REVAPPRO11

REV10            REVDATE10                  REVDRAW10                      REVNOTE10         REVENG10             REVAPPRO10

REV9              REVDATE9                    REVDRAW9                         REVNOTE9           REVENG9               REVAPPRO9

REV8              REVDATE8                    REVDRAW8                         REVNOTE8           REVENG8               REVAPPRO8

REV7              REVDATE7                    REVDRAW7                         REVNOTE7           REVENG7               REVAPPRO7

REV6              REVDATE6                    REVDRAW6                         REVNOTE6           REVENG6               REVAPPRO6

REV5              REVDATE5                    REVDRAW5                         REVNOTE5           REVENG5               REVAPPRO5

REV4              REVDATE4                    REVDRAW4                         REVNOTE4           REVENG4               REVAPPRO4

REV3              REVDATE3                    REVDRAW3                         REVNOTE3           REVENG3               REVAPPRO3

REV2              REVDATE2                    REVDRAW2                         REVNOTE2           REVENG2               REVAPPRO2

REV1              REVDATE1                    REVDRAW1                         REVNOTE1           REVENG1               REVAPPRO1

 

what i am after its to basically move all the row up 1, i have tried with copy and paste scripts but they do 1 attribute at 1 time and by text input. what i would like to do is just run the lisp and it move these up.

 

sorry my brain is fried been going round in circles for 2 days with this. i have found scripts that do half what i am after, but my skillset doesnt extend to be able to modify them to do what i want...

 

Edit: been having a think - what would be good is if it could copy row 12 and paste in row 13, copy row 11 and paste in row 12, copy row 10 and paste in row 11 and so on regardless if the attribute is empty or not, then delete the contents on row 1. that would get round all issues

 

i'm going to a modified version of this to add in the information in the row 1 once its all been moved http://www.lee-mac.com/updatetitleblock.html

 

help please.

Edited by MonkeyTurnip
Link to comment
Share on other sites

Updating revs has been done before, one of the methods not widely used is you can change any attribute by its creation order and tag names are not needed, this is probably the easiest way to do it. You make a list of all attributes then check for blank rewrite the list bumped up one line with the new attributes.

 

This is a bit of code I have needs more to do all lines but a start.

 

post a sample dwg just need the layouts with correct title block dummy entry is fine abcdefg etc.

 

att change by position.lsp

Edited by BIGAL
Link to comment
Share on other sites

Thanks Bigal, really useful. 

 

i know revision scripts have been done before, used many, but i cant't seem to find one the fits the need i have. the creation order is sporadic on this block, the REV's attributes are not in order.... also i need to run this automatically. i have 2/3rds of the script that opens, saves closes and can read from a CSV file the next update. i have scripts that can work when the latest revision is the top most revision. the BUMP style would work if the REV section i shows was its own block, but its part of a titleblock with 100+ other attribute before and after the REV section. 

 

i have been looking for the script to copy from an attribute and copy to another based the specific block name (no in drawing selection) within the same block, and delete the contents of the new REC, so that i can add to the other script and just leave to run on the 2000 drawings i need to update. 

Link to comment
Share on other sites

Can you post a dwg  is the rev part not a block and created in an order ? It may be worthwhile recreating the block to a true order and replace the existing updating as you go.

Link to comment
Share on other sites

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...