autouser Posted November 19, 2009 Posted November 19, 2009 Hi all, Is there better way to update the title blocks for multiple sheets and drawings in the folder? At the moment, we have 100s of drawings and each drawing has multiple sheets. They are all referring to an xref. So if I update the xref i want to update revision info/dates on all drawings automatically without opening and closing each drawings individually. I've been searching on the net and there seems to be long winded ways to do things but I prefer following methods (if possible); 1. batch export title block info from all drawings and sheets to excel file. 2. edit/modify necessary information 3. batch import them back to the drawings The main reason I want to do that way is each sheet or drawing could have different revision numbers and dates. Also on the side note ..... is it possible to tell from the xref which file is referring to? Ususally I can go to host file and see which xref is attached to but can it be other way around? Thanks heaps for the inputs ...... Quote
Pablo Ferral Posted November 19, 2009 Posted November 19, 2009 If you're starting a new project I recommend useing the sheet set manager. You can X-Ref your Border (if you want), but you set up your title block to read the information from the sheet set manager file. Heidi Hewltt's blog is a good place to start: http://heidihewett.blogs.com/my_weblog/sheet_sets/ If your working with legacy drawings then it's time to learn to program! Although you can buy third party software to do this for you, for example: http://blog.jtbworld.com/2009/11/smartpurger-30-for-autocad-scripting.html Finally if you have Vault you can do a 'Where used' search for X-References. There is no easy way of doing this in Vanilla Autocad, custom programing will be required. Quote
autouser Posted November 20, 2009 Author Posted November 20, 2009 Hi Pablo, thanks for your thoughts...... yes im learning to code at the moment but it might take some time. Just wondering if anyone in my situation and way around doing this? Cheers Quote
BIGAL Posted November 20, 2009 Posted November 20, 2009 Theres a post running right now about reading a excell file to update 100's of drawings have a look for it. Changing the attributes is very easy across multiple layout tabs the code I found here and modified (its posted here also on forum ) finds the blocks in the title details no matter where they are in a DWG so no extra coding required to change tabs. We just do a simple "issued for construction" at the moment. I recomend check the post its only like within 2 weeks Just a side issue are people getting lazy and not doing a bit of a search first the post questions seem to be getting repeated a lot lately. Quote
SteveK Posted November 20, 2009 Posted November 20, 2009 Theres a post running right now about reading a excell file to update 100's of drawings have a look for it. Changing the attributes is very easy across multiple layout tabs the code I found here and modified (its posted here also on forum ) finds the blocks in the title details no matter where they are in a DWG so no extra coding required to change tabs. We just do a simple "issued for construction" at the moment. I recomend check the post its only like within 2 weeks Just a side issue are people getting lazy and not doing a bit of a search first the post questions seem to be getting repeated a lot lately. I agree, the search tool is very useful ...but since I've posted, now I should help 1. batch export title block info from all drawings and sheets to excel file. Here's one you could try 2. edit/modify necessary information That's something you'd do in excel... 3. batch import them back to the drawings That is the stumbling block. I'm not sure of the post BigAl is talking about, but if it's the one I was involved in that didn't get resolved. It becomes difficult because no two people have the same excel template format. You could say, what about having the same arrangement as Lee's Global Att Extractor exports it, yes well, Lee hasn't made the reverse of it unfortunately. A tedius job. Maybe there's a universal attribute importer out there... I'd like to know too. Also on the side note ..... is it possible to tell from the xref which file is referring to? Ususally I can go to host file and see which xref is attached to but can it be other way around? An xref drawing does not carry any information with it to say it is being referenced, therefore you're only way of finding out would be to search through drawings that contain xref's. Sorry I can't be more help. Quote
SteveK Posted November 20, 2009 Posted November 20, 2009 All that said, have you tried the express tools ATTIN and ATTOUT ? Quote
autouser Posted November 20, 2009 Author Posted November 20, 2009 Thanks SteveK and Bigal. And yes I did make a thorough search on this forum and also on google but no luck. There are similar situations but nothing resolve and when I check dates they are far away thats why I am posting this. So far ....... I am using eattext to generate excel file but I am still figuring how to put it back to block after modifying in excel. Attin and attout won't help as its multiple sheets and multiple drawings. SteveK are you talking about getting one and then do automatic batch? Is there any script or lisp to do that? Sorry I am a beginner when it comes to lisp/script autocad. Cheers Quote
SteveK Posted November 20, 2009 Posted November 20, 2009 Yeah it's a fairly popular request (some sort of batch attribute change) and I'm surprised I haven't come across a universal one. This is probably because everyone wants something slightly different. I wouldn't be able to make you one from excel to autocad. CSV to CAD is easier for lispers if you can modify your excel file but once again help seems to be hard to come by. Once you have a lisp sorted for one drawing a good program to use it on multiple drawings is this one. Quote
SteveK Posted November 20, 2009 Posted November 20, 2009 If you do manage to get your attributes into a csv file, I've just written a csv2atts program from someone else maybe you can use. I've tried to keep it universal. All the attribute tags are in the first row, strings fill up the rest. It's Here. Quote
autouser Posted November 23, 2009 Author Posted November 23, 2009 Hi SteveK thanks for that I will give it a try and will get back to you ......Cheers Quote
BIGAL Posted November 23, 2009 Posted November 23, 2009 Had a bit of a think about this particularly the problem of linking the excel to the blocks and this may be a way around for any situation. You must have the first line of the excell with headings for each column. You create a form with two selectable lists the first is populated by picking a block this will populate it with the attribute tagnames, you pick a tagname you then pick a column name and you remember the column number repeat as necessary, any tags not picked etc will mean no changes. In VBA the attributes are easy to locate as they sit in an array att(0), att(1), att(2) etc so att(0) = column 4 att(3) =column 2 and so on This is enough information to edit any blocks then in multiple drawings for any excell output. Yes it would take a bit of programming but it is achievable. Quote
autouser Posted November 24, 2009 Author Posted November 24, 2009 Hi SteveK, the program looks promising as I used eattext to generate csv file. How does the lsp knows which dwg to modify? Its defined in the comments but can't find it in any other places. Many thanks Quote
Lee Mac Posted November 24, 2009 Posted November 24, 2009 Hi Autouser, Are you referring to my Global Attribute Extractor? Quote
SteveK Posted November 24, 2009 Posted November 24, 2009 the program looks promising as I used eattext to generate csv file. How does the lsp knows which dwg to modify? Its defined in the comments but can't find it in any other places. Many thanks In the thread I posted this lisp on the request included parameters that the first column of the csv would contain the drawing number to check against. This does not mean that it updates multiple drawings, ie if you ran it in a drawing named abc.dwg and selected a csv file which contained: Dwg_name,Layout_name,Drwn_By AAA,1,WW BBB,2,XX ABC,3,YY CCC,4,ZZ Only the highlighted line would be used, the rest ignored for that drawing. However, the idea is you can then use this one CSV file and combine the lisp with Freerefill's Batch program, effectively editing multiple drawings and attributes. I'm hoping to update the lisp to make the requirements for a drawing_name column and layout column optional, so if need be you can just apply an attribute tag to everywhere and everything without fuss. Aside: I noticed some of the excel files that Heather posted in that other thread contain macros for outputting an excel file to csv in the format my lisp requires, if you feel like experimenting... steve Quote
SteveK Posted November 24, 2009 Posted November 24, 2009 Hi Autouser, Are you referring to my Global Attribute Extractor? Yeah Lee I suggested it but we're trying to get something that then goes the other way too (excel -> cad). Quote
autouser Posted November 24, 2009 Author Posted November 24, 2009 Hi Lee and steve, hmmm........ i am getting confuse with coding and different ways to do this thing. To make things clear for any new potential user I will try to quickly outline them; 1st method; to use _eattext from autocad express tools and export the attributes from the block to csv file. Since I am using sheet set this method exports all layouts from all drawings in neat and nice way. And hopefully I can be able to use _csv2atts to import them back into attributes in the blocks and thats where I am stuck at the moment. 2nd method; to use _tex to export to excel very nicely and _tim to import back from excel very nicely. It works really well but as I have to click (select) each block its defects the purpose. Maybe there is way around this? More info can be found here http://www.cadtutor.net/forum/showthread.php?t=42174&highlight=batch&page=2 Any thoughts? Thanks everyone for your inputs. Hopefully we can sort this out once in for all. Quote
SteveK Posted November 24, 2009 Posted November 24, 2009 I'd say if you can persist in that other thread to get method 2 working the way you want it that'd be what you really want and it'd help a few other people too (I think there was one new thread today about excel 2 cad). As for the 1st method, so you've exported a csv using dataextraction. I've updated my lisp to make the drawing and layout variables optional, so just set dwgNameCol & layoutNameCol to nil. Then, provided you've only got block attribute lines in your csv file you should be right to input them. For example, the eattext command for me made this csv file: Count,Name,FNAME,REVDATE,USER 1,ANSI D title block,ARE,WHAT,HOW 3,Attribute Definition,,, 4,Solid,,, 5,Polyline,,, 36,Text,,, 49,Line,,, However, for the lisp to work I'd need to delete the rows that do no refer to the attribute tags, ie keep only the first two rows. Let me know, Quote
autouser Posted November 24, 2009 Author Posted November 24, 2009 yeah it would be something like that but what i got is slightly different format (refer to the attached .csv file). first row is the names and the subsequent rows are for each layouts in the drawings. for example in this case i have 4 layouts in each drawings and there are 4 drawings in that set. but the thing is i need to look for block handler so that the program will know which att to put where as they all have same name "title blocks". i can't seem to choose to export block handler from data extraction method so i am not too sure. thanks stevek p.s since i cant' upload csv file and i don't have access to zip, i upload the file as doc extension. just rename it to csv extension. abc.doc Quote
SteveK Posted November 24, 2009 Posted November 24, 2009 As long as there are only one of the same block name on each layout then it's a csv file problem. If there are multiple blocks named the same on the same layout that you don't wish to update then my program won't be able to help you. It sounds like an issue with the data extraction method. I can't say I'm a big user of it so I'm not sure if it's possible to list the block name in the csv. Just to make sure we're both on the same page, out of this line from your csv if any exist can you highlight the drawing name, layout name and block name: 1,Title Blocks,ABC,24/11/09,DEF,GHI,4,JKL1,MNO,10,3,,N/A Quote
autouser Posted November 24, 2009 Author Posted November 24, 2009 sure stevek, block name is "title blocks", drawing name is "part_number" and there is no layout name. and to answer the first question, no there is only one title block in each layout and there are 4 layouts in one drawing and 4 drawings in a set. cheers Quote
Recommended Posts
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.