Ilogic display name

Ilogic display name

KenVaessen
Enthusiast Enthusiast
2,700 Views
4 Replies
Message 1 of 5

Ilogic display name

KenVaessen
Enthusiast
Enthusiast

I'm using the next Ilogic rule in a part.

'Title instead Of autorename 
Dim oDoc As Document = ThisApplication.ActiveDocument  
oDoc.DisplayName = iProperties.Value("Project", "Part Number") & "/"& iProperties.Value("Project", "REVISION NUMBER") & " - " & iProperties.Value("Project", "Description") 
iProperties.Value("Summary", "Title") = iProperties.Value("Project", "Part Number") & "/"& iProperties.Value("Project", "REVISION NUMBER") & " - " & iProperties.Value("Project", "Description")

The problem is that he also renames the displayname of the Assembly where this part is in. Can anybody help me to solve this problem?  He must only use this Rule in the part. The assembly must run the same rule but with the properties of the assembly. 

0 Likes
Accepted solutions (1)
2,701 Views
4 Replies
Replies (4)
Message 2 of 5

JelteDeJong
Mentor
Mentor
Accepted solution

Does this work for you.

'Title instead Of autorename 
Dim oDoc As Document = ThisDoc.Document
oDoc.DisplayName = iProperties.Value("Project", "Part Number") & "/"& iProperties.Value("Project", "REVISION NUMBER") & " - " & iProperties.Value("Project", "Description") 
iProperties.Value("Summary", "Title") = iProperties.Value("Project", "Part Number") & "/"& iProperties.Value("Project", "REVISION NUMBER") & " - " & iProperties.Value("Project", "Description")

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

Message 3 of 5

KenVaessen
Enthusiast
Enthusiast

Works great! Thanx (Dank u)!

0 Likes
Message 4 of 5

KenVaessen
Enthusiast
Enthusiast

Is it also possible to get the filenumber for a drawing?

 

oDoc.DisplayName = iProperties.Value("Project", "Part Number") & "/"& iProperties.Value("Project", "REVISION NUMBER") & " - " & iProperties.Value("Project", "Description") 
iProperties.Value("Summary", "Title") = iProperties.Value("Project", "Part Number") & "/"& iProperties.Value("Project", "REVISION NUMBER") & " - " & iProperties.Value("Project", "Description")

so instead of "Project", "Part Number" I want the filename 

0 Likes
Message 5 of 5

JelteDeJong
Mentor
Mentor

you can try this:

Dim oDoc As Document = ThisDoc.Document
Dim fullFileName As String = oDoc.fullfilename
Dim fi As IO.FileInfo = New IO.FileInfo(oDoc.FullFileName)       
Dim title As String = fi.Name & "/"& iProperties.Value("Project", "REVISION NUMBER") & " - " & iProperties.Value("Project", "Description") 

oDoc.DisplayName = title
iProperties.Value("Summary", "Title") = title

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