Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
Curtis_Waguespack
in reply to: Anonymous

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")