Hi Community,
We have the following setting in a Pro.settingsConfig file:
<HomeFolder isLocked="true">C:\Users\MyUsername\Documents\ArcGIS\</HomeFolder>
I am trying to create a Pro Configuration project in which I would achieve the same/similar setting. I realized that that I can set the Home Folder using the following:
ApplicationOptions.GeneralOptions.CustomHomeFolder =@"C:\Users\MyUsername\Documents\ArcGIS\"
ApplicationOptions.GeneralOptions.HomeFolderOption =OptionSetting.UseCustom;
What other calls do I have to do to make this settings "Locked" - like in the Pro.settingsConfig file.
All help/advise will be highly appreciated.
Tamas
Solved! Go to Solution.
Addins are not intended to be, nor well suited to being, authoring tools for admin settings. That is best done w/ a custom script or .NET exe if the idea is to create a little utility admins can use to generate a Pro.settingsConfig rather than creating it by hand
Sounds like u/your organization has an admin setting in-place locking the home folder value.
When a setting is locked, it cant be changed in the UI, via the SDK properties/methods, or via the ArcPy commands that give you similar access. Attempts to change a locked setting should fail.
Only a user with the relevant permissions to change the underlying admin setting can make a change.
https://pro.arcgis.com/en/pro-app/latest/get-started/application-setting-management.htm
Yes, that is correct. But is it possible to set this lock via code? Let's say we don't have the Pro.settingsConfig in place at all and I need to set the customhomefolder and lock it via ArcGIS Pro SDK in a Configuration Project type.
So far I realized that I could set this home folder using the Pro SDK.
But can I lock it using the SDK - and if I do how? Once again - let's say there is no Pro.settingsConfig loaded.
Regardless - if this is not possible to achieve - that is fine but then I would raise a feature request to be able to replicate all Pro.settingsConfig settings using Pro SDK - including locking.
Addins are not intended to be, nor well suited to being, authoring tools for admin settings. That is best done w/ a custom script or .NET exe if the idea is to create a little utility admins can use to generate a Pro.settingsConfig rather than creating it by hand
Thank you @CharlesMacleod .
I intended to develop an ArcGIS Pro solution configuration and not an Add-in - though it seems like these are rather similar in nature then.
Regardless, I understand and accept your recommendation.