Drawing browser heading file name text change before saving drawing file

Drawing browser heading file name text change before saving drawing file

Anonymous
Not applicable
476 Views
2 Replies
Message 1 of 3

Drawing browser heading file name text change before saving drawing file

Anonymous
Not applicable

I have a unique situation for which I am seeking advice. Here goes:

1. We are creating models (sheet metal, standard part, assembly, weldment etc) with naming convention which follows this format: 6 digit unique number like 123456 then two digit numbers ranging from 01 to 99. 

The reason is this: the model will be numbered like 12345601 and if we decide to make an ipart or iassembly of it, the individual children of the ipart or iassembly will be numbered as 12345601, 12345602, 12345603 etc.

This is all fine and simple until we enforce another rule which is:

2. The drawing document will be numbers using only the first 6 digit numbers like "123456". This means that there will exist one drawing using the first 6 digit numbers and the children models will exist with numbers such as 12345601, 12345602, 12345603.

 

All fine and dandy until I place a view of model "12345601" in the drawing sheet and click the save button. Doing so automatically places "12345601.idw" or "12345601.dwg" as the file name in the save prompt dialogue box. Before saving the file, I have already run an ilogic rule which trims the Part Number to on 6 digits (aka 123456) and inserts this value to the drawing's Part Number property.  

 

I notice that in the browser heading, the file name is "12345601" which obviously matches the file name of the model placed in the drawing view.

 

Not too big a deal to backspace and edit to remove the "01"; last two digits before saving the drawing file. But I see tons of obvious mistakes being made with this manual edit requirement. 

Is there any possible way to change the browser heading file name text before clicking the save using ilogic or vba codes? Where and how is this browser heading text accessed?

 

Again, this is before the file is saved! 

 

Does anyone have ideas on how to tackle this issue so we can use this new numbering scheme automatically?

 

Thank you very much for considerations and any ideas.

 

Raj Thapa

0 Likes
Accepted solutions (1)
477 Views
2 Replies
Replies (2)
Message 2 of 3

JelteDeJong
Mentor
Mentor
Accepted solution

the browsername name can be changed with this i logic rule.

Dim doc As DrawingDocument = ThisDoc.Document
Dim docName = doc.DisplayName
If (docName.Length > 6) Then
    docName = docName.Substring(0, 6)
    doc.DisplayName = docName
End If

Jelte de Jong
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


Blog: hjalte.nl - github.com

0 Likes
Message 3 of 3

Anonymous
Not applicable

JelteDeJong,

Thank you very much. 

Your code works beautifully!

 

Raj Thapa

0 Likes