Jump to content
MonkeyTurnip

LISP to move multiple attribute values in the same block

Recommended Posts

MonkeyTurnip
Posted (edited)

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

Share this post


Link to post
Share on other sites
BIGAL
Posted (edited)

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

Share this post


Link to post
Share on other sites
MonkeyTurnip

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. 

Share this post


Link to post
Share on other sites
BIGAL

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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×