iLogic - return file path without last folder

iLogic - return file path without last folder

Anonymous
Not applicable
516 Views
1 Reply
Message 1 of 2

iLogic - return file path without last folder

Anonymous
Not applicable

Can anyone help me with some code that returns the file path of the current document without the last backlashed folder?


For example if my file path is:

C:\_Vault-WIP\Work Files\Job Number\01

 

and I want the rule to return:

C:\_Vault-WIP\Work Files\Job Number

 

 

0 Likes
Accepted solutions (1)
517 Views
1 Reply
Reply (1)
Message 2 of 2

Curtis_Waguespack
Consultant
Consultant
Accepted solution

Hi c.henderson2HQZG,

 

This should do it:

 

Imports System.IO
oPath = "C:\_Vault-WIP\Work Files\Job Number\01"
oParentDir = Directory.GetParent(oPath).FullName
MessageBox.Show(oParentDir, "iLogic")

 

 

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

EESignature

0 Likes