PDA

View Full Version : Lisp routine use csv to update title block attributes - on ctab



HRae
29th Oct 2009, 02:59 am
Hi Folks,
First time here and I have read all forums about lisp, block attributes, csv and other editing.
By virtue of working in many different companies, I have come across an 'update' lisp routine that takes title block attribute information from a csv file and updates all title blocks.
The problem I now have is that I have mulitiple drawings on layouts (ctab) and the current version of the lisp routine doesn't allow for this arrangement.
A copy of the lisp routine is attached below. I thank Paul Fylink for creating this in the first place.

If any one can help out with amending this, I would be most appreciative.

Thank you in advance.

Heather

SteveK
31st Oct 2009, 01:44 am
Hi, Judging by the response if you still need a solution to this you might try attaching a couple of drawings of what you want and what happens instead.
And can you edit your above post and put [CODE] brackets around all your code so it doesn't appear so overwhelming at first glance?
And lastly, I don't suppose asking Paul Fylink to edit it is possible?

HRae
1st Nov 2009, 10:51 pm
Hi Steve,

I didn't know how to attach the lisp as others have done.
Also as mentioned, this lisp was modified by Paul F (and I don't know how to contact him), but further investigation it appears that he took something similar to the Pat.zip lisp routine in another thread and modified it.
Note that we don't use all aspects in the routine.
Basically we have an exell spreadsheet with all the block attributes of our title block, create a csv file that the lisp routine reads and then updates the attributes in the title block. This worked fine if we had an Autocad file for every drawing, I now want to use the above approach but have the ability to update blocks on different layouts.
The update of attributes only allows for one block to be inserted into the drawing, therefore now that I have layout (ctab), I get error messages that "more than one block was found only updated first occurance".
Attached is the drawing file with 2 layouts, the txt file is used in the lisp routine to locate the csv file (currently zipped to allow upload).

If you can modifiy or provide an alternative lisp that works, that would be good.
Thanks
Heather

SteveK
2nd Nov 2009, 08:54 am
Hi Heather,

Seeing as all the more experienced lisper's have left this one I've had a look at it and I think it'll be a fair bit of work for me to modify it to suit multiple layouts. So I'm going to plan B: There are a couple of global attribute edit programs out there that could be rigged to do what you want. However, also to limit the work I am wondering how hard it is for you to modify your csv file to output in a form like:
ATTRIBUTE_NAME_1,ATTRIBUTE_STRING_1
ATTRIBUTE_NAME_2,ATTRIBUTE_STRING_2
ATTRIBUTE_NAME_3,ATTRIBUTE_STRING_3
Otherwise I'll have to try figure out or extract the method used by Paul Frylink and I'm just a little busy this week.. let me know.

steve

HRae
3rd Nov 2009, 10:34 pm
Hi Steve,

I can happily change it, if you can offer some assistance as to 'how'. Currently the csv file is created by using the 'save as' from excell. Changing the csv file, I'm assuming that all I should need to do is update all the columns in the spreadsheet to match exactly the block attribute names.
I will give it a try and see if that can resolve the issue.

Also as mentioned, I think the origin of the lisp came from a previous lisp (refer zipped file). However this is in French and the translate doesn't work that well. I will also try to find the orginal thread where this came from.
There maybe some valuable insite if you read this thread (I don't have the knowledge to write lisp routines) page 8 of the thread may help out.
http://www.cadtutor.net/forum/showthread.php?t=33971

Also, there is no rush for this, it is a work in progress to get these changes occuring in my new office.

Thanks for your help to date.

Regards
Heather

PS - found the ALSPSOL0708.zip file that says it does this:

;;; ATT-TABLE-UPDATE.LSP A program to update a drawing with blocks ;;;
;;; and attributes. The data comes from an EXCEL file (comma- ;;;
;;; delimited), and the blocks may be added, repositioned or ;;;
;;; deleted. A table of the blocks is also created or updated. ;;;
;;; Program by Tony Hotchkiss May 2008

Instead of modifing the current lisp I have, if you have another lisp routine that will do the same thing, then I'm happy to take that on.

SteveK
3rd Nov 2009, 10:55 pm
You don't need to work out a new format for the CSV file if I can just work out where the attribute's TAG is in relation to the attribute's STRING in the CSV file (If you open the CSV file in notepad (so it has all the comma's, this is what I'm trying to work a formula out for)). But yeah, I'll have a look at it (bit busy at the moment) and if I can't figure it out I'll try get the code from the old lisp.

HRae
3rd Nov 2009, 11:19 pm
I was going to attach the spreadsheet as a zip file, but it is too large for the forum. I also don't know the forums policy about contacting members directly. Please let me know if you want the spreadsheet and how to get it to you.

SteveK
4th Nov 2009, 03:43 am
Heather, can you post me a couple of other examples of CSV files you export? As varying as you can find (I notice in the CSV files you have Electrical, Geotechnical, Landscaping, etc). Ta.

SteveK
4th Nov 2009, 03:59 am
And did you say you want to update multiple drawings at once or just multiple layouts?

HRae
4th Nov 2009, 04:13 am
Hi Steve,

The intention is to have the ability to update both multiple layouts and mulitple drawings. But the way the update works is that when ever a drawing is opened, then the csv file will be read and the latest information (revision's) will be shown, regardless if the title sheet (and hence drawing) be a single layout or multiple.
We don't need the ability to run the lisp to update all drawings at the push of a button (but would be nice). As I see it, if the update occurs when opening, then when ever the drawing is printed or published then the correct revision will be present.
The xls file is used to manage all the information (change new revs etc here first) then write the csv file so that the lisp routine gets the new information.
Attached are 3 small projects, the sub headings that you see can be added, but in most instances the projects I now work on don't need these. I have added a file of a really large project so you can get both aspects.
Note that the xls files have over time improved, so there are some really early versions which are very basic.

Heather

SteveK
4th Nov 2009, 08:45 am
Hi Heather,

Can you give this a go and report back results?

Changes I've made I've commented: ;; PART MODIFIED BY SK

Steve

HRae
5th Nov 2009, 02:46 am
Hi Steve,

The routine works and updates all the title block information in each layout, but unfortunitely it repeats the first set of information across all blocks.
The problem maybe with the xls spreadsheet as each line is portrayed as a single drawing.
From my investigation of the original lisp, it appears to take all this xls information and pull it together to identify what drawing to open and then to apply the title block information. I don't know if this area of the lisp can be extended to search for the 'ctab' information also.
For example spreadsheet creates drawing 004, but this is a layout, therefore the lisp routine looks for 4431-21-004 drawing file (but there isn't one) it is 4431-21-002 drawing, but layout (ctab) 004.

As mentioned, no rush for this and I thank you for all your help. I just hope that with this routine that you and others can make use of it.

I have no other ideas at present to get this working.

Heather

SteveK
5th Nov 2009, 03:11 am
Ok, I wasn't aware that the first item also lists the layout. (I'm still trying to piece parts of this together :)) So the last 3 numbers relating to layouts is just a new thing in the xl/csv file? And if so will it be common and always 3 numbers? Because the lisp would probably have to split the number between the drawing filename and the layout name, and if it was a common length or if it was always whatever follows the last "-" then that would make that bit easy.

As for the rest, I'll have a think about it, since you're not in a rush and it's just me workin on it beta2 might not be straight away. :geek:

HRae
5th Nov 2009, 03:19 am
What I have done is name the layout tab to match the drawing number in the title block, so there maybe a way instead of the lisp routine getting the variable (drawing number), it could get the variable ctab. Apparently autocad reads (distinguishes) all layouts as a 'new' drawing (guessing here after speaking with a colleague).
The ctab layout number will always be the 3 digit extension of the drawing name/title and in some instances the drawing file.

Hope this makes sense. Yip, no rush as mentioned. :D

Do you think if I phase my question in another way on a new thread, there maybe someone else out there with some ideas?

SteveK
5th Nov 2009, 03:54 am
Do you think if I phase my question in another way on a new thread, there maybe someone else out there with some ideas?
I think we'll be able to get your multiple layouts sorted however I haven't touched your multiple drawings (I was looking at this program (http://www.cadtutor.net/forum/showthread.php?p=269111#post269111) recently - whether you can combine it with the one you got you'd need to ask) so yeah if you want to try on a different forum go ahead (I still think people are put off by your massive first post (you can still edit it to put
<all your code> brackets around it which will make it smaller))

SteveK
5th Nov 2009, 07:53 am
Heather what will the drawing file be named? Because the one you attached near the start contains the layout name as well, however the actually drawing also contains a layout called 003? Is the drawing file named correctly? If so, then the drawing file always contains the name of the first layout in its' name?
Ta.

SteveK
5th Nov 2009, 08:56 am
Assuming the file was incorrectly labelled (ie filename = 4431-21.dwg) try this one. :)

BETA v2

HRae
9th Nov 2009, 11:20 pm
Hi Steve,

When you have time, can you look at the section of the lisp that runs (defun do-atts ()

From me experimenting with inserting the getvar "ctab" expression instead of the getvar "dwgname" I think this is where the lisp can look for the dwgname and then the layout.

Due to my limited knowledge, I don't know how to modify the line to add the ctab into the request.
(if (= (strcase (strcat csv-cell ".dwg")) (strcase (getvar "dwgname")))

I notice when changing the dwgname to ctab, the error message of 'can't find dwg ....' comes up.

Let me know your thoughts. :)

I found a diesel expression to get the ctab information, but don't know how it could be used in this instance
$(substr,$(getvar,ctab),1,$(-,$(strlen,$(getvar,ctab))))
Heather

SteveK
10th Nov 2009, 01:16 am
Yep I made a few modifications to the function do-atts.

Can you tell me what you found wrong with v2 (post #17)? Did it not recognize the drawing name? I tried to implement the layout name (tab) into the program changing the drawing you gave me (post #3 (http://www.cadtutor.net/forum/showpost.php?p=280039&postcount=3)) from 4431-21-002.dwg to 4431-21.dwg because I assumed the last 3 digits refers to the layout name (which varies for multiple layouts/tab in a single drawing). The test I ran on that specific drawing seemed to work (to a degree) so if possible can you try it on a few drawings and let me know what problems you find (include the drawing name and layout names in your problem report).

steve

HRae
10th Nov 2009, 03:51 am
The latest lisp revision opens up the autocad drawing (xxxx-xx-3 digits), if I change the drawing file to be xxxx-xx-2 digits, error message that drawing not found occurs. Renaming layouts to either 2 or 3 digits appears to have no impact on lisp routine.

I have attached 2 images to show the xls and dwg. From the xls image, the information for xxxx-xx-002 drawing is put into the title block on all 3 layouts (even through ctab are 002, 003, 004).

Meaning title block information assocated with 002 in xls is repeated for all title blocks in the dwg.

Heather

SteveK
10th Nov 2009, 07:41 am
We'll get there but I mustn't be understanding this part correctly, so we'll have to go back a step.

The image I've attached is of the csv file. Where I've circled is where the program will stop because the first item in the line is the drawing name (plus as I understand it, the layout name) . If this is incorrect and the item does not include the layout name can you indicate where in this image is the layout name found?

FYI. CTAB = The Current Tab that autocad is actively viewing, not multiple layouts/tabs.

HRae
11th Nov 2009, 05:05 am
Hi Steve,

No you aren't missing anything, I also went back to a basic xls/csv file where the xls columns are the block attributes in the drawing. I created a layout tab when first looking to modify the lisp routine, but realised that the lisp wasn't looking at that.

So back to first principles, the basic block attribute information is put into xls, then the xls collates the project number, stage and sheet number to create the .dwg file that the lisp routine looks for (my guess).

I don't know the sequence of the lisp routine, meaning from the csv, does it collect the information to create/determine the .dwg file then tells it to update the attributes. I think this is where it is getting lost as if the routine specifically looks for a .dwg file then those with two or more layouts won't actually have a .dwg file.

Not sure, at least I'm not in a rush.

Once again thanks for taking the time to help.
Would you need to use something like this in your line of work?

To answer your question (I think) the xls title column "drawing_no" is the 3 digit number of the sheet, when in Autocad the layout tab is renamed to match this ie 002 and the .dwg is this also. So in essense, the drawing_no is also the layout tab.
Hope this makes sense.

Heather

SteveK
13th Nov 2009, 10:35 am
Gday Heather,

Ok. :) Well I think there's a bit of conflict as to which column is the layout name column. Test_Document Control.csv has DRAWING_NO (column G or 7).

Then I checked another one of the other csv's you've posted, 2118876 Document Control.csv and it doesn't have a column titles DRAWING_NO but it does have a column titled LAYOUT (column E or 5).

If you want autocad to always find the layout name it needs to be either a unique column title that is common to all csv files or it needs to always be in a particular column. If this needs to happen can someone at your work modify your "Write CSV" code in your xl files? If not perhaps you could try get someone to edit it in a vb forum. How much do you want this? 8)

As for if I would use this at my work, at my current work I don't think so, but I'm sure if we got something quality working people could use it. If...

Steve

HRae
15th Nov 2009, 10:42 pm
Hi Steve,

I'm starting to wonder if it is worth it all. :roll: :oops:

Ok, we will fix the layout to match the drawing number in the xls, this means it will be column D.

All I ask is that you can show me where the lisp routine looks for this information, so that in the future if we develop the xls spreadsheet and the column changes, then I can modfify the lisp.

Thanks again for your help.

Kind regards
Heather

SteveK
16th Nov 2009, 04:34 am
I'm starting to wonder if it is worth it all. :roll: :oops:

Ok, we will fix the layout to match the drawing number in the xls, this means it will be column D.

All I ask is that you can show me where the lisp routine looks for this information, so that in the future if we develop the xls spreadsheet and the column changes, then I can modfify the lisp.
Yeah it becomes a fair bit of effort when a common template isn't used. If it's too much effort to streamline your xls/csv files then I wouldn't bother with the lisp either.

I'll let you know when I change the lisp how to change the column.

Column D, ok. When you get a csv with the layout names in column D can you post it with the associated drawing? (for testing)

SteveK
20th Nov 2009, 11:24 am
Hi Heather,

I have an update, try it out, I hope it works for you.

I've written this from the ground up, below is the header from the file which I hope explains things.
If it doesn't make sense, what you just need to be concerned with is the value of the variable layoutNameCol. At the moment it is set to 6, which is correct for the csv that corresponds to drawing 4431-21-002.dwg. Note for that particular drawing the layout names are not preceded with 00 in the csv as they are in the drawing so you will have to add those 00's into the csv for that particular drawing for this to work. (I'm not sure if that is common for all your drawings??)
layoutNameCol is the value of the column of the layout name, so you can easily change that if necessary. To change, look for CSV Specific Preferences in the lisp, it is just below that.
If you need further explanation don't hesitate to contact me. :)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;;
;; Import Attributes from CSV File ;;
;; ;;
;; Type "CSV2ATTS" to run. ;;
;; ;;
;; Description: ;;
;; Gets attributes from a CSV file and imports to ;;
;; attributes. ;;
;; Rules as follows: ;;
;; - Attribute names are contained in the first row of ;;
;; CSV file. ;;
;; - Subsequent rows are checked for; ;;
;; Drawing Name (column # determined by variable dwgNameCol), ;;
;; Layout Name (column # determined by var layoutNameCol), ;;
;; Block Name (column # determined by var blkNameCol). ;;
;; Note all variables are optional. ;;
;; - If block is found to meet these criteria then a search is ;;
;; made for attribute tags found in first row, replacing if ;;
;; found. ;;
;; ;;
;; ------------------------------------------------------------------ ;;
;; Eg. ;;
;; ;;
;; Current Drawing Name is ABC.dwg and contains layout names lay1 & lay2. ;;
;; Variables set to: ;;
;; dwgNameCol = 0 ;;
;; layoutNameCol = 2 ;;
;; blkNameCol = nil ;;
;; ;;
;; Example CSV File: ;;
;; Drawing_Name,Rev_No,Layout_Name,Drawn_By ;;
;; ABC,1,lay1,SteveK ;;
;; DEF,2,lay1,SteveK (this row will be ignored) ;;
;; ABC,4,lay2,JSmith ;;
;; ;;
;; Output: ;;
;; Attributes on layout "lay1": ;;
;; with tag "Drawing_Name" will be changed to "ABC", ;;
;; with tag "Rev_No" will be changed to "1", ;;
;; with tag "Layout_Name" will be changed to "lay1", ;;
;; with tag "Drawn_By" will be changed to "SteveK", ;;
;; Attributes on layout "lay2": ;;
;; with tag "Drawing_Name" will be changed to "ABC", ;;
;; with tag "Rev_No" will be changed to "4", ;;
;; with tag "Layout_Name" will be changed to "lay2", ;;
;; with tag "Drawn_By" will be changed to "JSmith", ;;
;; ------------------------------------------------------------------ ;;
;; ;;
;; Version: ;;
;; 1.0 Initial Release. ;;
;; 1.1 Variables dwgNameCol & layoutNameCol made optional. ;;
;; ;;
;; ------------------------------------------------------------------ ;;
;; ;;
;; Copyright © steve.k, November 2009. ;;
;; SteveK can be contacted @ CadTutor.net, theSwamp.org ;;
;; Permission to use, modify, and share this program ;;
;; is granted, provided copyright notice is included. ;;
;; ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;v1.1

HRae
24th Nov 2009, 12:09 am
Hi Steve,

Work is really busy at present, so I haven't had time to look at this. Hopefully over the next week I can run a test and let you know the outcome.

Thanks
Heather

SteveK
24th Nov 2009, 12:48 am
No worries, thanks for letting me know.

Paul Frylink
14th Apr 2010, 01:50 pm
Hi there

Paul Frylink here
Just stumbled upon this thread - very interesting where your code ends up...
That is quite an old version of update.lsp at the beginning of this thread!

I never did publicly release it, but I guess with the number of joint ventures going on here in Brisbane, systems become public property by default.

SteveK
14th Apr 2010, 06:02 pm
lol, hope you're not too mad about it, excel-to-cad is a common request on this forum.

ps. maybe you can help Heather if she is still around and my lisp I made for her didn't work... :)

HRae
14th Apr 2010, 11:20 pm
Hi there Paul and Steve,

Paul from my work experience I think that your original lisp is being widely used around many offices and companies. Had I known how to contact you personally, I wouldn't have posted this.
I still haven't been able to have it amended to read layout tabs.
I have also given up on it being acheivable.

Steve - thanks again for all your effort with getting this to work.

Paul Frylink
15th Apr 2010, 03:26 am
Interesting!

A bit of history - I first developed the link between AutoCAD and Excel (update.lsp) when I was working with Maunsell in the Philippines in 1999. A large team of drafters were producing lots of drawings - consistency with title blocks was an issue. I came up with this system to feed the information from the drawing list we had in Excel through to AutoCAD attributes.
I have continued to develop the system in the ensuing years, to the point now where it has many bells and whistles – such as inserting blocks, attaching xrefs filling in tables or even run other lisp files all from the master spreadsheet. Data can also be exported in the form of Transmittals, drawing lists for insert onto drawings or text files for upload to Doc control systems. We have a reactor setup when AutoCAD starts which automatically triggers update to run on any save event.
We (AECOM – nee Maunsell) also use systems such as Bentley’s ProjectWise for drawing control, but it is hard to go past the simplicity of a spreadsheet for managing our drawings

HRae
15th Apr 2010, 05:29 am
Yes, I think at my last company the lisp routine was set up in the way you mentioned, funny that I haven't worked for Maunsell, yet that is where you are based. I first came across the system some 6 years ago and from the looks of it, it hasn't been modifed in any way.
This being your original work, and since you are a guru as the lisp routine, I was using it in the way you say, spread sheet linking to the title block etc, doing dynamic updating, out putting to another sheet for transmitals...The orginal collated the spreadsheet information to create the 'autocad drawing file' that the lisp routine looked for first (my basic understanding). are you aware of anyway to modify either the spreadsheet or lisp to make it look for a layout tab instead????
Basically I have a working version of your old one....but can it be modified to read both the autocad drawing and then the layout tab? I'm more curious now if this is possible or not, as opposed to make it work for where I'm currently working.

Heather

Paul Frylink
15th Apr 2010, 01:47 pm
Heather

Checking for current layout name (CTAB) while updating the attributes should be achievable, but currently working 50+ hours/wk on a tender design.... so no time to play.

I might add my 2 bobs worth though - my personal view - simply for file management and document control, I believe 1 drawing per physical DWG is safest!

HRae
15th Apr 2010, 11:26 pm
Paul,

I agree with you with one drawing, however my current place of work doesn't have the same opinion. I have also moved to a smaller company and they don't have the size of projects that I used to work on.

As mentioned earlier, i had given up on the ctab working, so if you get to have a look in the next 4 months or so, then that would be great. It has been 6 months or more since the idea of using ctab came about.

Tenders....hmmm great things they are. Have fun! :)

Heather

johmmeke
30th Nov 2010, 12:55 pm
Hey all, maybe a little to late, but is somone stil working on this?

I have same proble as Heather did.
How do i setup my excel for the csv? or an example?

Thanks John

HRae
30th Nov 2010, 10:30 pm
Hi John,

This still hasn't been resolved. The only way that this lisp routine works (at the moment) is to have one ACAD file for one drawing sheet.

If you have your files set up like this then I can walk you through how the lisp routine works.

Heather

johmmeke
30th Nov 2010, 11:34 pm
Hey Heather,

Great to hear from you. So it is stil not possible to have one list with mutiple drawings and update that way?

Can you explane just how to setup my drawings. At the moment i have it so that one drawing has 4 layouts en contains 2 block's.
The blocks use almost the same attribute's, so they can be used for by the 2 block's (same value in both block's).

Greats John (sorry for bad enghlis)

Lee Mac
1st Dec 2010, 12:06 am
Hi Guys,

I haven't read the whole thread, but what is the overall goal of the routine, and what are the issues you are having?

From the few posts I have read, perhaps this (http://lee-mac.com/macatt.html) may assist you?

Lee

HRae
1st Dec 2010, 12:15 am
Lee,

Background - drawing title sheets that have text block attributes, use an excel spreadsheet to manage title block, revisions etc information. This is then converted into a csv file that the lisp routine reads. The lisp routine has been written to look for the ACAD drawing file and then fill in the text block attribute information. As the lisp routine first looks for the ACAD file, when layouts are used, there are 2 (or more) blocks in the drawing and therefore the lisp routine only fills in data of the first block. Also as the lisp routine first looks for the ACAD file name (which is the drawing number) it can't cope with layouts and therefore technially 2 drawing files.

The spreadsheet and lisp routine doesn't follow any particular excell cell, is it defined by the block attribute code. So modifing the lisp routine to look for a particular cell to determine the layout (ctab) isn't viable.

Is is basically a 'attsin' proceedure but has trouble when mulitple blocks are used.

John - if Lee has a solution for the ctab option, then telling you how to set up your drawing file, excel spreadsheet etc for individual files will be redundant.

Lee - if you have any ideas that would be great.

Heather

johmmeke
1st Dec 2010, 12:35 am
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

HRae
1st Dec 2010, 12:35 am
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

Lee Mac
1st Dec 2010, 12:36 am
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?

Lee Mac
1st Dec 2010, 12:37 am
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.

johmmeke
1st Dec 2010, 12:50 am
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

Lee Mac
1st Dec 2010, 12:59 am
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.

HRae
1st Dec 2010, 01:10 am
24887

24888

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

johmmeke
1st Dec 2010, 01:20 am
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)

Lee Mac
1st Dec 2010, 01:26 am
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.

Lee Mac
1st Dec 2010, 01:29 am
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?

HRae
1st Dec 2010, 01:31 am
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

HRae
1st Dec 2010, 01:33 am
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

Lee Mac
1st Dec 2010, 01:37 am
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.

johmmeke
1st Dec 2010, 01:41 am
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

Lee Mac
1st Dec 2010, 01:46 am
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 (http://www.cadtutor.net/forum/showthread.php?37127-Global-Attribute-Editor-amp-Extractor); 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...

HRae
1st Dec 2010, 01:47 am
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

Lee Mac
1st Dec 2010, 01:51 am
Not a problem Heather, I understand now - and, from what you have described, it seems like quite a good system :)

I shall see what I can do with the LISP :)

johmmeke
1st Dec 2010, 01:54 am
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.

Lee Mac
1st Dec 2010, 01:56 am
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.

johmmeke
1st Dec 2010, 02:00 am
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

johmmeke
1st Dec 2010, 02:21 am
Heather, another question about your XLS file, i just have to make the colum header match my att-tag are read the program it in other way?


Greetz John

HRae
1st Dec 2010, 02:26 am
Lee

The thing about the simplicity of the system is that you can add any block attributed text to the spreadsheet and have it updated.

I resently had to get a complete set of drawings issued for Work as Executed, this required a block to be inserted to each drawing and filled out. I have since added this to the title block on a layer, have the information updated in the xls spreadsheet and hey presto all the WAE information is added. The only down side is I now need to find a script to turn on a particualar layer without having to open each drawing (any links to existing scripts that do this?)

Heather

HRae
1st Dec 2010, 02:31 am
John - yes if you see in the xls file the column headers look like DWG_TITLE1 and R1 etc the R series is all the different revision numbers. oops I posted the title block but forgot the attached that is the text block.

24891

Heather

Lee Mac
1st Dec 2010, 02:36 am
The only down side is I now need to find a script to turn on a particualar layer without having to open each drawing (any links to existing scripts that do this?)

Firstly, this (http://lee-mac.com/scriptwriting.html) will help :)

Then, either this (http://lee-mac.com/scriptwriter.html) will help write the Script, or you could use ScriptPro or similar.

I would recommend just using the Script to open/save/close the drawings, and call a LISP from the script to turn the layer on.

This LISP will turn a layer on:



(defun LayerOn ( layer )

(if (setq layer
(LM:Itemp
(vla-get-Layers
(vla-get-ActiveDocument
(vlax-get-acad-object)
)
)
layer
)
)
(vla-put-layeron layer :vlax-true)
)
(princ)
)

;;-----------------------=={ Itemp }==------------------------;;
;; ;;
;; Retrieves the item with index 'item' if present in the ;;
;; specified collection, else nil ;;
;;------------------------------------------------------------;;
;; Author: Lee Mac, Copyright © 2010 - www.lee-mac.com ;;
;;------------------------------------------------------------;;
;; Arguments: ;;
;; coll - the VLA Collection Object ;;
;; item - the index of the item to be retrieved ;;
;;------------------------------------------------------------;;
;; Returns: the VLA Object at the specified index, else nil ;;
;;------------------------------------------------------------;;

(defun LM:Itemp ( coll item )
;; © Lee Mac 2010
(if
(not
(vl-catch-all-error-p
(setq item
(vl-catch-all-apply
(function vla-item) (list coll item)
)
)
)
)
item
)
)Call like this:


(LayerOn "YourLayerHere")You could also use ObjectDBX using this (http://lee-mac.com/odbxbase.html) program, coupled with this function:



(defun LayerOn ( doc )

(setq layer "YourLayerHere")

(if (setq layer (LM:Itemp (vla-get-Layers doc) layer))
(vla-put-layeron layer :vlax-true)
)
(princ)
)

;;-----------------------=={ Itemp }==------------------------;;
;; ;;
;; Retrieves the item with index 'item' if present in the ;;
;; specified collection, else nil ;;
;;------------------------------------------------------------;;
;; Author: Lee Mac, Copyright © 2010 - www.lee-mac.com ;;
;;------------------------------------------------------------;;
;; Arguments: ;;
;; coll - the VLA Collection Object ;;
;; item - the index of the item to be retrieved ;;
;;------------------------------------------------------------;;
;; Returns: the VLA Object at the specified index, else nil ;;
;;------------------------------------------------------------;;

(defun LM:Itemp ( coll item )
;; © Lee Mac 2010
(if
(not
(vl-catch-all-error-p
(setq item
(vl-catch-all-apply
(function vla-item) (list coll item)
)
)
)
)
item
)
)i.e.


(LM:ODBX 'LayerOn nil t)Lee

Lee Mac
1st Dec 2010, 05:09 pm
Hi Guys,

Had a quick look at the code today, please try the attached.

The code is fully described in the header, including the expected format of the DWG Register CSV file. The Text file containing the location of the DWG Register is expected to be found in the same directory as the working drawing.

Please let me know how you get on,

Lee

johmmeke
1st Dec 2010, 05:50 pm
Lee that is quick....

i'm give it a try i a few hours when i get home ...

Thx for coding John

Lee Mac
1st Dec 2010, 05:54 pm
You're welcome John, I simplified the code quite a lot using a different algorithm :)

johmmeke
1st Dec 2010, 06:22 pm
Lee, have done soms quick test (i just whas to exiting not to)
works great for my need ;)

do a better testing when i got home, also have to find out just how to ad it to acaddoc.lsp

this is a real helper for me

thx Lee for just another great Lisp

Lee Mac
1st Dec 2010, 06:29 pm
Lee, have done soms quick test (i just whas to exiting not to)
works great for my need ;)

Excellent to hear John, I'm really glad it works for you :)


...also have to find out just how to ad it to acaddoc.lsp

With regards to adding it to the ACADDOC.lsp, as it stands you could either add a load call to the ACADDOC.lsp, something like:


(load "update.lsp" "Update.lsp Failed to Load")Or


(load "C:\\My Folder\\update.lsp" "Update.lsp Failed to Load")Should the LISP not reside in an AutoCAD Support Path.

Or you could even just copy the whole code into the ACADDOC.lsp (but this is less maintainable).

This (http://lee-mac.com/runlisp.html) and maybe this (http://lee-mac.com/acaddoccreator.html) may also help.

Lee

HRae
2nd Dec 2010, 12:33 am
Hi Lee,

Thanks for the updated lisp. :D

I have tested the lisp on a drawing that has 5 layouts (simulating 5 seperate drawings). The routine updates all title blocks located within each of the layouts. The downside is that it updates the blocks with exactly the same information. For example from the xls file drawing 011 will have title block 'Construction Details Sheet 1 of 5'. Then the second layout (ctab) represents drawing 012 (Sheet 2 of 5). The routine then puts the same information into the title block, in essense repeating the 011 information.

So we have it working on the same blocks within a drawing, but it hasn't distinguished that the additional blocks on the different layouts in fact represent a different drawing and hence the next line in the xls (csv) file.

I'm slowly converting the 'old hands' to use one drawing file to represent one sheet. Although if we can get the routine to work with layouts then the lisp will (should) work with any type of drawing setup.....maybe! :)

Regards
Heather

Lee Mac
2nd Dec 2010, 12:53 am
Hmmm...

In my opinion, that part of the system seems a bit flawed (ambiguous), as the drawing filenames don't correlate with the Drawing Register, and furthermore, when updating the blocks, the order of layouts/entries in the drawing register would add extra risk of error - what if the layouts are reordered? Then the drawing register needs to be reordered...

HRae
2nd Dec 2010, 02:09 am
Lee

I didn't modify the xls file at first but then changed as per notes in lisp.
Attached is the acad, xls and csv files that I'm using to test.

The issue may be with the way the xls file is set up and the creation of the csv file that is causing the problem.

Heather

24906
24907

johmmeke
2nd Dec 2010, 02:21 pm
Lee, is it possible that i don't have a acaddoc.lsp ?

John

Lee Mac
2nd Dec 2010, 03:02 pm
Lee, is it possible that i don't have a acaddoc.lsp ?

John

Yes, very possible - just create one and save it in an AutoCAD Support path, AutoCAD will load the first ACADDOC.lsp it finds.

Lee Mac
2nd Dec 2010, 03:15 pm
The issue may be with the way the xls file is set up and the creation of the csv file that is causing the problem.

No, my code just looks for the appearance of the name of the dwg file in the CSV drawing register, then uses that row to populate the attributed blocks.

johmmeke
2nd Dec 2010, 09:47 pm
Lee, have found a caddoc create lisp..
you never gues where ;)


thx again John

Lee Mac
2nd Dec 2010, 09:53 pm
Yeah, you could use that - or, there is the tutorial I linked you to earlier :wink:

johmmeke
2nd Dec 2010, 10:23 pm
very nice site ..
clean and usefull

can i take the first part of this lisp to make another lisp, that auto create dwg's with the name in the first colum starting from a dwt?
i'm just to new to this.

Lee Mac
3rd Dec 2010, 12:47 am
Thanks John :)

Certainly the code is free for you to modify, but I would ask that you mark the parts you have modified :)

CADkitt
3rd Dec 2010, 05:15 pm
Cool script, I am trying to scrap like half of it :P
Since i want to use one database file and not one per directory.
But I had the most problem till now that is DON'T ADD .DWG in the csv filenames.
Here is my modified code so it works with one CVS/txt file Removed the top description because I edited just made some modifications.
This code isn't clean but works :P



(defun c:Update2 ( / *error* _FixDir _CloseFile AS CSV CSVFILE CSVPATH DOC DWG LST NL SS TAGS )
(vl-load-com)
(setq csv "C:\\Engineering\\Dwglistcsv.txt")
;; © Lee Mac 2010

(defun *error* ( msg )
(mapcar '_CloseFile (list csvfile csv))
(or (wcmatch (strcase msg) "*BREAK,*CANCEL*,*EXIT*")
(princ (strcat "\n** Error: " msg " **")))
(princ)
)

(defun _FixDir ( d )
(if (not (eq "\\" (substr d (strlen d)))) (strcat d "\\") d)
)

(defun _CloseFile ( f )
(if (and f (eq 'FILE (type f))) (close f))
)

(setq doc (vla-get-ActiveDocument (vlax-get-acad-object)))


(setq dwg (strcase (vl-filename-base (getvar 'DWGNAME))) csv (open csv "r"))
(princ dwg)
(if
(and (setq tags (LM:str->lst (strcase (read-line csv)) ","))
(progn
(while
(and (setq nl (read-line csv))
(not (wcmatch (strcase nl) (strcat dwg "`,*")))
)
)
nl
)
(setq lst (mapcar 'cons tags (LM:str->lst nl ",")))
(ssget "_X" '((0 . "INSERT") (66 . 1)))
)
(progn
(vlax-for obj (setq ss (vla-get-ActiveSelectionSet doc))
(foreach att (vlax-invoke obj 'GetAttributes)
(if (setq as (assoc (strcase (vla-get-TagString att)) lst))
(vla-put-TextString att (cdr as))
)
)
)
(vla-delete ss)
)
)

(_CloseFile csv)
(princ)
)

;;-------------------=={ String to List }==-------------------;;
;; ;;
;; Separates a string into a list of strings using a ;;
;; specified delimiter string ;;
;;------------------------------------------------------------;;
;; Author: Lee Mac, Copyright © 2010 - www.lee-mac.com ;;
;;------------------------------------------------------------;;
;; Arguments: ;;
;; str - string to process ;;
;; del - delimiter by which to separate the string ;;
;;------------------------------------------------------------;;
;; Returns: A list of strings ;;
;;------------------------------------------------------------;;

(defun LM:str->lst ( str del / pos )
;; © Lee Mac 2010
(if (setq pos (vl-string-search del str))
(cons (substr str 1 pos) (LM:str->lst (substr str (+ pos 1 (strlen del))) del))
(list str)
)
)


;; Remove this to disable program running upon loading:
;(c:update)

;; EOF

johmmeke
6th Dec 2010, 02:08 pm
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

David Simpson
18th Jul 2011, 05:35 am
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

Lee Mac
19th Jul 2011, 03:52 pm
Would this (http://lee-mac.com/updatetitleblock.html) help you at all David?

RenderMan
19th Jul 2011, 03:57 pm
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? :?

David Simpson
20th Jul 2011, 08:07 am
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

David Simpson
20th Jul 2011, 08:10 am
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

Lee Mac
20th Jul 2011, 12:24 pm
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

David Simpson
25th Jul 2011, 12:01 am
Thanks Lee

I have been a bit busy so I am going to have a go at it today.

David

Lee Mac
25th Jul 2011, 12:34 am
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 :)

David Simpson
29th Jul 2011, 12:20 am
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

Lee Mac
29th Jul 2011, 12:31 am
Use the 'Layout' Column as described on the program page.

David Simpson
29th Jul 2011, 06:09 am
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

Lee Mac
29th Jul 2011, 01:37 pm
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?

David Simpson
1st Aug 2011, 08:30 am
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

29044
29043
29042

Lee Mac
1st Aug 2011, 02:07 pm
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.

David Simpson
10th Aug 2011, 08:14 am
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

Lee Mac
10th Aug 2011, 05:11 pm
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

David Simpson
11th Aug 2011, 01:01 am
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

Lee Mac
11th Aug 2011, 03:28 pm
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.

David Simpson
18th Aug 2011, 08:20 am
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

Lee Mac
18th Aug 2011, 12:46 pm
Hi David,

Firstly, I'm glad you have the program working now :)

The program is engineered to simply read a CSV file, how you update that CSV file is up to you :wink:

Lee

cabaq
26th Aug 2011, 12:22 pm
Hi David,

Firstly, I'm glad you have the program working now :)

The program is engineered to simply read a CSV file, how you update that CSV file is up to you :wink:

Lee

Hello!

Is there any way to make it update all the listed DWG's at once - or is it just the opened DWG?

Thanks for the LSP.

Lee Mac
26th Aug 2011, 01:08 pm
Is there any way to make it update all the listed DWG's at once - or is it just the opened DWG?

You could use a Script to open/save/close a set of drawings, hence updating them with this program.


Thanks for the LSP.

You're welcome, enjoy :)

cabaq
30th Aug 2011, 11:45 am
I got it working now. I start with running batchlisp.lsp, then select the drawings I want to update (through selectfiles.lsp) and then it uses your lsp (and a master.csv file) to update each drawing. All good and automated :)

Now that's half of what I wanted to do.

Do you know if there there is any way to export the block attributes from several drawings directly to the CSV file? I know about ATTOUT but it exports to txt, and I get one txt per drawing.

Lee Mac
30th Aug 2011, 01:13 pm
Do you know if there there is any way to export the block attributes from several drawings directly to the CSV file? I know about ATTOUT but it exports to txt, and I get one txt per drawing.

Either the DATAEXTRACTION command, or my program here (http://lee-mac.com/macatt.html).