User name path - one drive- iLogic configuration import - %UserName%

User name path - one drive- iLogic configuration import - %UserName%

andrew_canfield
Collaborator Collaborator
280 Views
1 Reply
Message 1 of 2

User name path - one drive- iLogic configuration import - %UserName%

andrew_canfield
Collaborator
Collaborator

iLogic user.JPG

Hello,

I'd like multiple users to import the iLogic configuration setting. This works if the path is to a fixed machine (server) but not with OneDrive.

Edit %UserName% to the user's user name & everything works ok.

 

Regards

 

Andrew

 

0 Likes
281 Views
1 Reply
Reply (1)
Message 2 of 2

CattabianiI
Collaborator
Collaborator

You could maybe use something like this snippet and execute it on Inventor start up (if you have an addin) or just when you want if you do some checks

Dim externalRuleDirectoriesList As New List(Of String)(TryCast(ThisApplication.iLogicOptions.ExternalRuleDirectories, IEnumerable(Of String)))
Dim userPath As String = System.Environment.GetFolderPath(System.Environment.SpecialFolder.UserProfile)
Dim externalRulePath As String = IO.Path.Combine(userPath, "externalRulePath")
externalRuleDirectoriesList.Add(externalRulePath)
ThisApplication.iLogicOptions.ExternalRuleDirectories = externalRuleDirectoriesList.ToArray()