Author Topic: Populate title block via excel spread sheet?  (Read 4340 times)

0 Members and 1 Guest are viewing this topic.

DIW_CADtech

  • Bull Frog
  • Posts: 368
  • Push limits, embrace success, & discard failure.
Populate title block via excel spread sheet?
« on: November 05, 2013, 03:28:23 PM »
Now at first you might think why, when you can use the sheet set manager and fields.  (( best solution ))
however, I have been asked to start doing changes on this drawing set and we are at 95%
No fields are in the drawings, and no sheet set is set up, and there are over 250 DWG's

I wanted to create a simple script file, to populate the data from the LOG file that is a spreadsheet that already exists. (the munisipality requires it)
Then, then i was going to use WORD, and the mail merge function with a to create the final script that would open and edit each drawing and perform the edits.

Theoretically this is a doable solution for a newbe to scripting ((me)), but I find that the ATTEDIT command needs to be used differently for attributes that are populated, or not.  In other words, if an attribut in the title block revision says 3 I have to use a different script than if it were blank.  I don't know/understand code, so I can't write that.  My current level of expertice is typing out commands in the correct order.

In this drawing set of 250+ sheets some are blank and some are populated.  And I may need to clear some as well.

I even thought about scripting in the deletion and purge of the block then inserting a wblock of the same block with all attributes to null.

I could create this mail murge script with the null block, but this does not work for the revision block as the revision block may or may not be in the same location on each file.

On top of this.. the engineers I work with have a tendancy to insert/delet drawings, and suddenly want to change every sheet, so I want to be able to run the script a 2nd time with new data in the excell spread sheet.

In essence, I am trying to avoid, haveing to open and manually enter 16 bits of data on 250 sheets, which at this point seems to be my only option.

I would much prefer if I had a loaded lsp routine that I could script better than using the ATTEDIT
it would be awsome if I had a command ATREDIT
entered in the block name  --> hit enter
entered in the Attribute tag name --> hit enter 
entered in the new value (regardles of emptyset) --> hit enter and had the value update.

If I have to do the revision blocks manually then I have to.. but if there is a way to script the changes to the title block that would be awesome.

Ideas/Personal Experiences/warnings accepted..    I'm I just don't want to do this manually if at all possible.
« Last Edit: November 05, 2013, 03:32:57 PM by DIW_CADtech »
I am very  trainable....   (forgive my spelling)

Lee Mac

  • Seagull
  • Posts: 12926
  • London, England
Re: Populate title block via excel spread sheet?
« Reply #1 on: November 05, 2013, 07:24:32 PM »

DIW_CADtech

  • Bull Frog
  • Posts: 368
  • Push limits, embrace success, & discard failure.
Re: Populate title block via excel spread sheet?
« Reply #2 on: November 06, 2013, 05:44:58 PM »
The above mentioned software might work if I was changing all the data to  a set list.

however the Title1 attribute on sheet 1 will not be the same as sheet 2 or 3 or four.. etc...

this is why I'm using an excel spread sheet and the mail merge function in word..

Each sheet will have three title lines .. only the the third will be identicle on each sheet.

in the same way that each sheet will have a revision number, but they could vary wildly.

I have ScriptPro, and for repeating exactly duplicate processes.. it works great, but for this title block  :ugly: SNAFU not much of any assistance.

I wish I had the ability to write a script that would open the drawing.. look up the sheet number on the log.xls file .. and then update the fields  based on the row of data in the log file. 

Unfortunatly this is WAY beyond me.  It sounds doable.. I have done some VB scripting 10 years ago.. but I'm afraid I'm a bit out of touch. 

Even if this could be done off a CSV file that would save me hours of work...

Any ideas?
I am very  trainable....   (forgive my spelling)

Lee Mac

  • Seagull
  • Posts: 12926
  • London, England
Re: Populate title block via excel spread sheet?
« Reply #3 on: November 06, 2013, 05:54:29 PM »
I wish I had the ability to write a script that would open the drawing.. look up the sheet number on the log.xls file .. and then update the fields  based on the row of data in the log file. 
...
Even if this could be done off a CSV file that would save me hours of work...

This is exactly how my above suggested Update Titleblock Attributes program operates, (only looking up the drawing filename rather than a 'sheet number'); you would simply need to batch it across a set of drawings (and my above suggested Script Writer program would be suitable for the batch operation).

I think you may have overlooked my suggestions a little too hastily.  ;-)

DIW_CADtech

  • Bull Frog
  • Posts: 368
  • Push limits, embrace success, & discard failure.
Re: Populate title block via excel spread sheet?
« Reply #4 on: November 06, 2013, 06:24:31 PM »
I'll take a 2nd look.. many appologies
I am very  trainable....   (forgive my spelling)

Lee Mac

  • Seagull
  • Posts: 12926
  • London, England
Re: Populate title block via excel spread sheet?
« Reply #5 on: November 06, 2013, 06:37:39 PM »
No problem - ask if you are unsure of anything  :-)

DIW_CADtech

  • Bull Frog
  • Posts: 368
  • Push limits, embrace success, & discard failure.
Re: Populate title block via excel spread sheet?
« Reply #6 on: November 06, 2013, 08:54:27 PM »
UpdateTitleblock
This is good... I have gotten started with the Project Log, I created a new tab/worksheet in EXCEL and linked the data in the logfile tab.. next step is to generate the CSV file.. and modify the script.  this is much better than my mail merge work around.. WAY BETTER  it's not quite a perfect app.. but daRn close.  I will try to test this tomorrow and repost the results... 

Many thanks Lee Mac   my fingers are crossed....

I am very  trainable....   (forgive my spelling)

Lee Mac

  • Seagull
  • Posts: 12926
  • London, England
Re: Populate title block via excel spread sheet?
« Reply #7 on: November 07, 2013, 08:56:02 AM »
Excellent - you're most welcome DIW  :-)