I am working on a project that I must limit some functionality of ArcMap based on user permissions.

Is there any way to do that ?

for example I want to disable the Database Connections in Catalog windows by using c# in ArcObjects

  • 2
    I don't believe this is a duplicate question this poster is asking to disable the ability to access database connections, which is probably not possible as it would require overriding the systems GUI, but I could be wrong. – Hornbydd Jul 3 '18 at 15:06
  • If you click on the options button in the Catalog window in ArcMap and go to general tab you can hide database connections, no idea how you access that programatically? – Hornbydd Jul 3 '18 at 15:15
  • I want to do that by using c# in arcobjects.In other word I need to accomplish that issue programmatically . – Bahman Rashidi Jul 3 '18 at 19:11
  • 1
    Not a duplicate. – Kirk Kuykendall Jul 5 '18 at 1:20

This works for me. Next time arcmap is started the folder is present.

protected override void OnClick()
        var cont = ((IGxApplication)ArcMap.Application).Catalog as IGxObjectContainer;
        IGxObject gxObj;
        IGxObject gxRdf = null;
        var enumGx = cont.Children;
        while((gxObj = enumGx.Next())!= null)
            if (gxObj is IGxRemoteDatabaseFolder)
                gxRdf = gxObj;
        if(gxRdf != null)
    catch(Exception ex)
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.