johmmeke Posted December 6, 2010 Posted December 6, 2010 Lee, i can't figure it out with the csv. can you help me out to a lisp for creating drawings from the csv? Greetz John Quote
David Simpson Posted July 18, 2011 Posted July 18, 2011 Hi Paul I have been trying to set the very type of link up for a while now and have just stumbled on to the discussion from HRae, I have a large project starting and I am trying to set up a doc control and would like to use the link from a the drawing list to the Autocad attributes for title blocks and rev as well as any other info I put can on there. Are you willing to part with you valuable knowledge on setting this up, would appreciate any help that I can get.. Dave Simpson Quote
BlackBox Posted July 19, 2011 Posted July 19, 2011 I haven't read the entire 9 pages in this thread, so forgive me if I'm duplicating posts here... Is there a reason why you're not just using Sheet Set Manager and Custom Properties to populate your title block attributes via the use of Fields? Quote
David Simpson Posted July 20, 2011 Posted July 20, 2011 Lee I have loaded the csv file into the folder wher the drawings and have loaded the lisp file it seems to work - when I started it (UTB)it ask for the csv file will this happen every time you want update the title or other attributes. Maybe you can give me a run down on setting this up. Thanks for you input I think it is going to be good. David Quote
David Simpson Posted July 20, 2011 Posted July 20, 2011 Renderman Thanks for the heads up on this, I am going to look into it further any idea where I can get a good tutorial so that I can understand it, the youtube videos they talk to quick. David Quote
Lee Mac Posted July 20, 2011 Posted July 20, 2011 I have loaded the csv file into the folder wher the drawings and have loaded the lisp file it seems to work - when I started it (UTB)it ask for the csv file will this happen every time you want update the title or other attributes. Hi David, Firstly, I assume that your CSV file is in the correct format as described in the program description on my site. At the top of the code you will find a section marked 'Location of CSV Drawing List'. If nil, the program will prompt for you to select a CSV file every time you run the program. You can either specify the full filepath of a CSV file (if in a fixed location), or, if the CSV file is in the working directory, you can just specify the name of the file, i.e. "MyCSV.csv" and the program should be able to find it. Note that the program is currently set to automatically run when loaded, this allows you to include a load call in your ACADDOC.lsp to automatically update titleblock attributes when you open a drawing. Be sure to carefully read the program description on my site, it should explain everything. Lee Quote
David Simpson Posted July 24, 2011 Posted July 24, 2011 Thanks Lee I have been a bit busy so I am going to have a go at it today. David Quote
Lee Mac Posted July 24, 2011 Posted July 24, 2011 Thanks Lee I have been a bit busy so I am going to have a go at it today. David No worries David, let me know how you get on Quote
David Simpson Posted July 28, 2011 Posted July 28, 2011 Hi Lee I have got that part up and running, now I would like to take it a step further as in the previous mails, I would like to run this with one drawing and multiple paper space layouts which have different values in the attributes , meaning a spreadsheet that would populate a complete drawing, the reason is that we have a large project that will consist of about 15 drawings per site and there are 200 sites, and would like to have all the drawing border info on a spreadsheet. Hope we can get this going cause it would save us a lot of time changing the border text and setting up the sites. David Quote
Lee Mac Posted July 28, 2011 Posted July 28, 2011 Use the 'Layout' Column as described on the program page. Quote
David Simpson Posted July 29, 2011 Posted July 29, 2011 Hi Lee Not having much luck, got layout 1 to work, layout 2 & 3 not so good I have also swapped the nil to the path for the drawing register file and I am still being asked for a drawing register file, what happens now. David Quote
Lee Mac Posted July 29, 2011 Posted July 29, 2011 Not having much luck, got layout 1 to work, layout 2 & 3 not so good I have also swapped the nil to the path for the drawing register file and I am still being asked for a drawing register file, what happens now. Do you have the 'LayoutCol' set to T in the adjustments to inform the program you are using a layout column in the CSV? Are you specifying the filepath in the correct way? i.e. with double-backslashes or single forward slashes? Quote
David Simpson Posted August 1, 2011 Posted August 1, 2011 Hi Lee Firstly I really appreciate your help in this matter, it would so helpful to get this up and running. I still can't get the other layouts to work, so I have attached the Update lisp that I have changed for you to look at, I have put the t where you said, which didnt work and I also put the CSV file in my documents that worked but if I put the csv file in a working drive it dose'nt work. I have also included my CSV file and drawing register excel file you might be able to work it out. The way I have it set up is the csv and excel file are in the working folder with the drawing and the lisp program is the Acad lisp folder. Do I need any other file to go anywhere, why I say this the original update had a _Dwglistcsv.txt file in the drawing folder. Sorry I am being such a pain but I would really like to get this running it will save me heaps of time. David UpdateTitleblockV1-1.lsp DrawingRegister.csv DrawingRegister.xlsx Quote
Lee Mac Posted August 1, 2011 Posted August 1, 2011 Hi David, First thing I noticed when I opened the modified .lsp file was this line: (setq CSVDrawingList C:\\"DrawingRegister) This will cause the whole program to fail (most likely with the error message: "malformed string on input") since you have misplaced the starting quotation mark for the string, and missed the ending quotation mark. Are you using the Visual LISP IDE (VLIDE) (or other code editor) to edit the code? If not, I would strongly recommend you use the VLIDE to edit the LISP code, since mistakes such as the above are easily spotted with the syntax highlighting provided by standard code editors. The remedy (hopefully): Change the CSV filepath at the top of the .lsp file to: (setq CSVDrawingList "DrawingRegister.csv") The .lsp file can be saved to any directory, but preferably an AutoCAD support path - the location of this file is unimportant though, as long as you can load the LISP file. For loading the file on startup, I would advise you use the ACADDOC.lsp. Place 'DrawingRegister.csv' in your working directory. Quote
David Simpson Posted August 10, 2011 Posted August 10, 2011 Hi Lee Sorry about the delay, still havent been able to get this to work, I have done what you have said still not working. What do you suggest, should I send you the excel file and the drawing with the lisp program so you can see if I have a value wrong. Regards David Quote
Lee Mac Posted August 10, 2011 Posted August 10, 2011 Hi David, What error do you receive, if any? Or are the values just not being updated? Just to clarify - the program is working from a CSV file, not an XLS file. Lee Quote
David Simpson Posted August 11, 2011 Posted August 11, 2011 Hi Lee I get (Drawing not found in Drawing List) also every time I save the xls as a csv I get a message XXX.csv may contain features that are not compatible with CSV (Comma Delimited). Do you want to keep workbook in this format? What do I do then, cause sometimes I loose the changes in the xls sheet, do you know why this message comes up or is it normal when saving to a csv. David Quote
Lee Mac Posted August 11, 2011 Posted August 11, 2011 I get (Drawing not found in Drawing List) Looking back over my code I notice that the Drawing filename in the CSV is case-sensitive - I will update this in the next version to remove the case sensitivity, but in the meantime, try changing the CAD filename in the CSV to exactly match the drawing filename and see if this works for you. also every time I save the xls as a csv I get a message XXX.csv may contain features that are not compatible with CSV (Comma Delimited). Do you want to keep workbook in this format? What do I do then, cause sometimes I loose the changes in the xls sheet, do you know why this message comes up or is it normal when saving to a csv. Yes, this message is standard since a CSV does not support multiple worksheets, varying column widths etc. Quote
David Simpson Posted August 18, 2011 Posted August 18, 2011 Hi Lee Just thought I'd let you know that i finally got the update lisp to work on multi layout drawings, the was that I updated the csv file rather than update the excel file and save as a csv. There must be something I did in the excel file that didnt translate to csv, anyway it works now, do you think this will be a problem updating the csv rather than excel file continually. Thanks for all your help David 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.