Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Trying to use the following code with an ArcGlobe Control

Type t = Type.GetTypeFromProgID("esriFramework.AppRef");
System.Object obj = Activator.CreateInstance(t);

Howevewr, t is coming back as null. Any ideas as to why? I do have the ESRI.ArcGIS.Framework reference in my workspace. I was hoping to access this so I could then use some ArcGlobe Commands via ICommandBar which I wanted to access via

IApplication myApp = obj as IApplication;
ICommandBars myCommandBars = myApplciation.Document.CommandBars;
myCommandItem = commandBars.Find("ID" , false);
share|improve this question
Note: I'm not running a full application. I have an ESRI.ArcGIS.Controls.AxGlobeControl stuffed into a User Control. – PSU_Kardi Nov 22 '10 at 18:12

Note: I am assuming your code runs within the same process as the ArcGlobe application.

If you are running on a 64bit system, try setting your assembly target platform to x86. In VS, you will find this setting under project properties, the "Build" tab, platform target combobox. I have encountered weird COM behavior on 64bit systems, but now I am not able to reproduce the issue on my Win7 64x machine.

Also check the the class and its type library are properly registered. You can inspect windows registry to do so, but if you do not know where to look, your best bet is to run a repair of your ArcGIS installation.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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