Part of filepath in titleblock

Part of filepath in titleblock

Anonymous
Not applicable
414 Views
2 Replies
Message 1 of 3

Part of filepath in titleblock

Anonymous
Not applicable

Hello,

I'm currently working on standardizing the template of the titleblock of our drawings. In de description box are 2 lines; 1 is model description (which is defined in the iProperties of the model) and the othe is project description. This project description I would like to retrieve from the file path where projects are foldered by number and description: D:/Workspace/Documents/Projects/0000 Project name/...

 

I would like that the project description on the drawing is created from the file path and shows "0000 Project name" in the title block. Is this in anyway possible?

 

Best regards,

 

Yordi

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

Curtis_Waguespack
Consultant
Consultant
Accepted solution

Hi yordi.verbraak,

 

I didn't understand if you were doing this with iLogic or some other method, but here is an ilogic example.

 

More ilogic examples here:

http://forums.autodesk.com/t5/inventor-customization/thisdoc-path-but-up-one-level/m-p/5990510#M6094...

https://forums.autodesk.com/t5/inventor-general-discussion/project-name-in-title-blocks/m-p/3070762#...

 

I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com

 

 

   Dim strName As String
   Dim strArray() As String
   
   strName = ThisDoc.Document.FullFileName
   strArray = Split(strName, "\")
   
   'show full file path
   MessageBox.Show("Full file path : " & vbLf & strName, "iLogic")
   
   'show each member of the string array
	i=0 
   For intCount = LBound(strArray) To UBound(strArray)
      MessageBox.Show("Array member " & i & ": " & vbLf & strArray(i), "iLogic")
	  i=i+1
   Next
   
   'show the project number folder
   'assumes that it is the folder that contains the file
   'therefore we use the upperbound of the array minus 1
   j = UBound(strArray)-1
   MessageBox.Show("The project folder: " & vbLf & strArray(j), "iLogic")
   

 

EESignature

0 Likes
Message 3 of 3

Anonymous
Not applicable

Curtis,

 

The simmilar cases made it very clear to me.

I'm sure i can get this to work.

 

Thank you!

0 Likes