Jump to content

Lisp routine use csv to update title block attributes - on ctab


HRae

Recommended Posts

Thanks for the reply you both,

 

Lee, it gonna take me a few minutes to test your program, but it looks very nice (like always).

Just a quick question. The macattedit, this update's al the attribute's with the same tag to the same value?

 

The goal is to update a number of drawings with different value's.

 

it's good to have expert here ;)

 

 

Heather, i have been trying a bit here en there but find the way to setup the xls right...

Can u attach the one that works for you?

 

 

you both thanks for helping.. John

Link to comment
Share on other sites

  • Replies 116
  • Created
  • Last Reply

Top Posters In This Topic

  • Lee Mac

    31

  • HRae

    26

  • SteveK

    17

  • johmmeke

    15

Top Posters In This Topic

Posted Images

Lee - just looked at your link, the process isn't to take the block information from the drawing, it is the otheway round. Use the excel spreadsheet to populate the title block attributes. The excell spreadsheet is the document control, used to manage revisions, transmittals etc so that the ACAD user doesn't have to open each drawing and manually change title blocks in drawings.

 

Heather

Link to comment
Share on other sites

After having a quick look at the LISP file in the first post, it looks as though it is build to run within a script, and, for each drawing, read the CSV, and should the drawing filename be found in the CSV, update the attributes accordingly.

 

Is this how it is meant to function, or have I misread the LISP?

Link to comment
Share on other sites

Lee - just looked at your link, the process isn't to take the block information from the drawing, it is the otheway round. Use the excel spreadsheet to populate the title block attributes. The excell spreadsheet is the document control, used to manage revisions, transmittals etc so that the ACAD user doesn't have to open each drawing and manually change title blocks in drawings.

 

Hi Heather,

 

The program in my link works both ways - Extractor & Editor - however, it doesn't read from a CSV file.

Link to comment
Share on other sites

Lee, i have a smal problem, just have a go with your program.

 

It gives me a "1 drawing processed" .. but nothing happend no update on the attribute

 

 

ps. i'm running autocad 2010 64bit on Win7

Link to comment
Share on other sites

Thanks John - I've just seen your earlier post :)

 

With regards to the program, if the drawing on which you are testing it is open, you may need to regen the drawing to see the changes (I omitted the regen to make the program faster).

 

The Editor will update multiple attributes within a single block - I do have the ability to update multiple block names, however the only part restricting me from adding this functionality is trying to format the dialog to make it clear for the user. Note that the drawings don't have to be opened to be updated.

Link to comment
Share on other sites

4431-22 DWG REGISTER.zip

 

X_4431-22 A1.zip

 

I don't know how to attach the files, I hope it works.

 

We use the excell spreadsheet as a document control for all drawing revisions and transmittals etc. The lisp routine then updates the drawing title each and everytime so that all title block information is correct.

 

This saves from having to open each drawing manually chang the title block.

 

Heather

Link to comment
Share on other sites

Lee, i have the same problem, also bit funny, when i look to the date and time i see that the drawing is modified, but nothing has changend...

tried on 2 different directory's and 2 different blocks.

 

The program also give's me that it has made the modifications ....

where am i messing the thing up^? :(

 

 

 

Heather thank for the new file's specialy the .XLS , i had a other from you and just do nothing, gonna give this a try.

 

 

both thanks from Belgium (land of wafels en french frites)

Link to comment
Share on other sites

Hi John,

 

How are you inputting the information? This kind of bug hasn't as yet been reported, and, in testing, I couldn't get it to fail - so I just wanted to check how you are using the program.

 

The name of the block containing the attributes needs to be entered at the top, then each attribute/value to be updated needs to be added to the list.

Link to comment
Share on other sites

We use the excell spreadsheet as a document control for all drawing revisions and transmittals etc. The lisp routine then updates the drawing title each and everytime so that all title block information is correct.

 

This saves from having to open each drawing manually chang the title block.

 

So I would assume the LISP runs on startup? My question being, what are you using to operate on all the drawings without opening them?

Link to comment
Share on other sites

John - Process to get it all working.

 

In the xls file 'document control' tab, change the column titles to match the text attribute flags. Ensure the cad file name matches the ACAD drawing name. Write the csv file.

Suggest you put all the files in the previous zips into the same directory. Edit the txt file directory to reflect where the xls and csv files are located.

Load the lisp routine, suggest you add this to the start up suite, restart AutoCAD. If all paths are correct when opening the drawing the title block will be update automatically. If you need to change information, you will need to re-write the CSV file and if the drawing is open in AutoCAD, type in update to ge the new information.

 

Heather

Link to comment
Share on other sites

Lee - refer reply above, rewrite the csv file, type update to run lisp. I have since got sick of typing update, so have put this as a shortcut icon.

 

 

Heather

Link to comment
Share on other sites

If all paths are correct when opening the drawing the title block will be update automatically.

 

Ok, so the drawings do still need to be opened by the user right? I was stumped for second there as the only methods I am aware of to operate on multiple drawings using LISP without manually operating on them would be to either use a Script or ObjectDBX.

Link to comment
Share on other sites

My fault Lee..

 

i was editing in the entry ... if i double click in the list it works just fine ;)

 

Are you thinking about turning your extracter around so it is possible to write the attribute from the excel it has made?

that would make a great feature...

 

John

Link to comment
Share on other sites

My fault Lee..

 

i was editing in the entry ... if i double click in the list it works just fine ;)

 

Are you thinking about turning your extracter around so it is possible to write the attribute from the excel it has made?

that would make a great feature...

 

Excellent John, I'm really glad you got it working :)

 

As you can imagine, when releasing this program, the idea of adding the functionality to export/import to and from Excel has been discussed quite a lot - you can find most of it here; but the crux of it are the issues involved with, after modifying the program to write block entity handles to Excel, when importing back to CAD, the program would have to scout all the drawings for each handle, and due to the various formatting options I have added to the program, accouting for reading from each format would be a real headache...

Link to comment
Share on other sites

Lee,

 

I guess fundamentally all drawings would be opened by the user. What typically occurs is, at the start of the project the general project inforamtion is added. As drawings are revised this information is added to the spreadsheet. As the drawing needs to be printed and sent to client/contractor then either use publish or plot and revision information is updated. The ease of the system is if all drawings need to be updated then this can be done in the xls file, publish the set of drawings and all information is updated/correct.

 

As mentioned we use the xls as the document control to manage the drawings and revisions. Therefore the data in the xls is linked to our transmittal system so at the press of a button you can choose which drawings are to be sent out and the transmittal created. So it is a whole system and not just wanting to update block attributes in a drawing.

 

Where I now work they use layouts, in my old job I was used to one AutoCAD file one drawing and the system worked fine. And although I'm trying to establish the one drawing file system here the 'old hands' are a bit reticent to go that way.

 

Heather

Link to comment
Share on other sites

Lee i can have just a little bot of a idea how much work and difficulties you can come up with.

iI just start with lisp a few weeks ago, afra-lisp is my friend for a while...

 

But this is a great tool for making drawing list and change drawing title or so for a whole project.

just a anthor lee program to my favorites.

Link to comment
Share on other sites

Lee i can have just a little bot of a idea how much work and difficulties you can come up with.

iI just start with lisp a few weeks ago, afra-lisp is my friend for a while...

 

But this is a great tool for making drawing list and change drawing title or so for a whole project.

just a anthor lee program to my favorites.

 

Thanks John,

 

It doesn't affect the Extractor in any way, but with regards to the Editor, be sure to read the code header and take note of the known bugs with ObjectDBX functionality.

Link to comment
Share on other sites

Heather i don't think i'm can make it work for multple layouts so i'm gonna take the way is has to be and working with sheetsetmanager.

 

i'ts gonna be a whole work a round but if i get it to work like it is made and i can also make the transmittal from out the XLS that is gonna be Super.

today i'm also working at a firm that is taking the old way with everything... time to rock the cradle

 

John

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