Help: automatically number page tag in blocks of multiple drawing files?

Help: automatically number page tag in blocks of multiple drawing files?

Anonymous
Not applicable
2,746 Views
35 Replies
Message 1 of 36

Help: automatically number page tag in blocks of multiple drawing files?

Anonymous
Not applicable

Hi,

 

I have more than 600 drawing files that have same block title.

I need to update their page number tag. That can be done manually. But it's tedious and time consuming.

I have a routine that modifies a specific tag's value but just in a drawing. 

Could someone give me some advice on how to do it with a routine?

Is it possible to do with batch file?

Any help would be greatly appreciated.

 

Thank you.

0 Likes
Accepted solutions (1)
2,747 Views
35 Replies
Replies (35)
Message 2 of 36

hmsilva
Mentor
Mentor

Hi maikhanhmst,

 

possibly Lee Mac's Batch Attribute Editor will do the trick...

 

Hope this helps,
Henrique

EESignature

Message 3 of 36

Anonymous
Not applicable
Hi Henrique,
Thank for you help.
Lee Mac's routine is awesome.
But the routine will remove the same blocks, so I couldn't modify the ones in the other drawings.
0 Likes
Message 4 of 36

hmsilva
Mentor
Mentor

You're welcome, maikhanhmst.


Could you please clarify how are you going to 'update their page number tag'.

Just renumber from 1, or add some value to the current number, or prefix/sufix....

Henrique

EESignature

0 Likes
Message 5 of 36

pbejse
Mentor
Mentor
That is why i started using Sheet Sets Smiley Happy

0 Likes
Message 6 of 36

hmsilva
Mentor
Mentor

@pbejse wrote:
That is why i started using Sheet Sets Smiley Happy


Smiley Happy

 

Henrique

EESignature

0 Likes
Message 7 of 36

Anonymous
Not applicable
Hi pbeje,
Excuse for my delayed response.
Could you please show me some ways or give me some useful sites how to do it with SSM?
My all drawing files have same title blocks and page number tag.
I've tried with some ways from the internet but it didn't work.
Many thanks.
0 Likes
Message 8 of 36

Anonymous
Not applicable
Hi Henrique,
The routine will remove the rows that have same tags and just keep the 1st one in *.csv file. My all drawing files have the same title block even name and page number tag name.
So I couldn't modify page number tag's value for all drawing from page 1st to 600th.
0 Likes
Message 9 of 36

hmsilva
Mentor
Mentor

Hi maikhanhmst,

my previous question, was just to try to find 'a relation' between the current numeration and the new numeration...unsuccessfully...

 

To create a code to change the number in a title block, it's easy, even to process several DWGs is also easy, we can use a .scr file to call a routine, or use ObjectDBX if you do not mind to lose the dwg's thumbnail until the next time you open/save each dwg.

 

The tricky part, is to understand if there is 'a relation' between the actual dwg file name/layout name, and the new numeration, and how are we going to tell the code, to put the number XX, in YY title block...

 

Henrique

EESignature

0 Likes
Message 10 of 36

Anonymous
Not applicable
Hi Henrique,
Thanks for your contribution.
About ' a relation ' between the dwg files and numeration, could I create a *.csv file that include all drawing file numbers. So the routine will read and save the list from *.csv file. Then it will number the drawing page number depends on its location in the folder that includes. Such as: when the script opens the 3rd drawing file, it will update the drawing file number with the value of 3rd row in the *.csv file.

Is that possible?
(Excuse for my English)
0 Likes
Message 11 of 36

hmsilva
Mentor
Mentor

Hi maikhanhmst,

let's see if I understood...

 

you are going to create a .csv file with the dwg name and number, with all dwg's?

 

If your .csv file is like this

C:\\some\\path\\filename.dwg 1
D:\\some\\other\\path\\anothername.dwg 2
...

 

and if you have only one title block per dwg, the code code only read the .csv file, open the dwg, change the number, close, open the next dwg...

But if you have more than one title block per dwg, you'll have to create the .csv with the dwg name, the layout name and the new number...

 

Henrique

EESignature

0 Likes
Message 12 of 36

Anonymous
Not applicable

Hi Henrique,
Sorry for my delayed reply.
That's my idea. All dwg files have the same title block. But how can I manipulate with multiple dwg files? Could you give me some code that related to it?
Thank you.

0 Likes
Message 13 of 36

hmsilva
Mentor
Mentor

@Anonymous wrote:
That's my idea. All dwg files have the same ...

Hi maikhanhmst,

 

each dwg has only one title block?

 

Henrique

 

 

 

EESignature

0 Likes
Message 14 of 36

Anonymous
Not applicable
Hi Henrique,
You're right.
Each dwg just has only one title block.
0 Likes
Message 15 of 36

hmsilva
Mentor
Mentor

@Anonymous wrote:
Hi Henrique,
You're right.
Each dwg just has only one title block.

OK,

tonight I'll see what I can do.

 

Henrique

EESignature

0 Likes
Message 16 of 36

Anonymous
Not applicable
Thank you, Henrique.

0 Likes
Message 17 of 36

hmsilva
Mentor
Mentor

@Anonymous wrote:
Thank you, Henrique.


maikhanhmst,

it will be possible for you to attach a sample .csv file with a few lines?

 

Henrique

EESignature

0 Likes
Message 18 of 36

Anonymous
Not applicable

I've attached the example dwg file with title block and csv file. In the csv file, the 1st colum is block name, the 2nd one is tag name and the last one is the value that will be inserted. 

I assume that the routine reads 5 dwg files and csv file. It will change the "pagetag" in each drawing with the values from csv file respectively.

Hope you get it Smiley Very Happy

0 Likes
Message 19 of 36

hmsilva
Mentor
Mentor

maikhanhmst,

 

my earlier request 'it will be possible for you to attach a sample .csv file with a few lines?' was just to see how the path was...

I need to see how the dwg path is written at the .csv file,

or

C:\\some\\path\\filename.dwg 1

or

C:/some/path/filename.dwg 1

or even

C:\some\path\filename.dwg 1

 

when I write the code, I have to consider how the path is written, and make the necessary changes in the code, so that it works as expected.

What I need, is a 'real' sample .csv file with a few lines...

 

Henrique

 

EESignature

0 Likes
Message 20 of 36

Anonymous
Not applicable

Sorry, I misunderstood.

I've attached the new csv file as you requested.

Thanks.

0 Likes