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

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

andrew_canfield
Collaborator

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
Reply
239 Views
1 Reply
Reply (1)

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