You are here: > ESRI Forums > arcgis desktop discussion forums > Thread Replies

ArcGIS Desktop Discussion Forums

ArcGIS Desktop - ArcObjects General forum

3D analyst extension has not enabled   ding zheng Jan 10, 2002
Re: 3D analyst extension has not enabled   Kirk Kuykendall Jan 10, 2002
Re: 3D analyst extension has not enabled   Eleanor Blades Jan 10, 2002
Re: 3D analyst extension has not enabled   ding zheng Jan 11, 2002
Re: 3D analyst extension has not enabled   ding zheng Jan 11, 2002
Re: 3D analyst extension has not enabled   Eleanor Blades Jan 11, 2002
Problem of 3D analyst extension in VC++   ding zheng Jan 14, 2002
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject 3D analyst extension has not enabled 
Author ding zheng 
Date Jan 10, 2002 
Message I do something related to ITinEdit. But I got a trouble about 3D analyst extension. I tried a simple code below in both of VB and ArcMap VBA. Sure,the 3D and Tin library are referenced. It shows no error in ArcMap VBA when an error "3D analyst extension has not enabled" shows in the last line (code: pTinEdit.InitNew pEnv).

Is anybody can help me to know what it is happened and how to solve it?

cheers

 
 
Dim pFClass As IFeatureClass
Dim pWS As esriCore.IWorkspace
Dim pWSF As esriCore.IWorkspaceFactory2
Set pWSF = New AccessWorkspaceFactory
Set pWS = pWSF.OpenFromFile("C:\mypersonal\geodatabase\city.mdb", 0)
Dim pFW As esriCore.IFeatureWorkspace
Set pFW = pWS
Set pFClass = pFW.OpenFeatureClass("route3")
Dim pGDS As IGeoDataset
Set pGDS = pFClass
Dim pEnv As IEnvelope
Set pEnv = pGDS.Extent
Set pEnv.SpatialReference = pGDS.SpatialReference
Dim pTinEdit As ITinEdit
Set pTinEdit = New Tin

pTinEdit.InitNew pEnv
 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: 3D analyst extension has not enabled 
Author Kirk Kuykendall 
Date Jan 10, 2002 
Message Do you have a 3D license?

I don't have this extension, but you may need to turn it on under the Tools>Extensions ... or do it programattically with IExtensionConfig. 
  Kirk Kuykendall
AmberGIS Programming Services & Sales
http://www.ambergis.com
Now Answering questions at:
http://gis.stackexchange.com/


 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: 3D analyst extension has not enabled 
Author Eleanor Blades 
Date Jan 10, 2002 
Message If this code is in a standalone application, then it is your responsiblilty to load that extension into your app and turn it on.

For more information, please refer to the "Extension license checking" section in the Licensing Issues Technical Document in the ArcObjects Developer Help or on ArcObjects Online
http://arconline.esri.com/arcobjectsonline/default.asp?URL=/arcobjectsonline/TechnicalDocuments/LicenseIssues.htm

This information is also found in the Exploring ArcObjects book in Appendix C Developing for ArcGIS deployments

Also take a look at the help topic for the ExtensionManager CoClass.
http://arconline.esri.com/ArcObjectsOnline/default.asp?URL=/ArcObjectsOnline/ComponentHelp/esricore/ExtensionManager.htm 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: 3D analyst extension has not enabled 
Author ding zheng 
Date Jan 11, 2002 
Message Thank you very much for your anwser. It is difficult to find the CLSID of 3D analyst or other extensions from related to documents. I got it by using the tool of microsoft ole/com viwer. but when using the sample code:

Dim pUid As UID
Set pUid = New UID
pUid.Value = "{9B647D6D-7152-11D3-9F59-00C04F6BC5F4}" // 3d CLSID

Dim pExtAdmin As IExtensionManagerAdmin
Set pExtAdmin = New ExtensionManager
pExtAdmin.AddExtension pUid, 0

Dim pExtManager As IExtensionManager
Set pExtManager = pExtAdmin

Dim pExtConfig As IExtensionConfig
Set pExtConfig = pExtManager.FindExtension(pUid)

If (Not pExtConfig.State = esriESUnavailable) Then
pExtConfig.State = esriESEnabled
End If

I met an error on the line: pExtAdmin.AddExtension pUid, 0
with "automation error".

I checked the esricore.olb, it seems having no information about 3d analyst extension. I have the licenses of single user for ArcView8.1, 3D and spatial analyst. I donot know how to find an appropriate name of 3d analyst to assign to the pUID.

Could you tell me how should i do it.

Thanks 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: 3D analyst extension has not enabled 
Author ding zheng 
Date Jan 11, 2002 
Message Thank for myself. I solved it. 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: 3D analyst extension has not enabled 
Author Eleanor Blades 
Date Jan 11, 2002 
Message For future reference, there is a Technical Document that lists the GUIDs of all the ESRI extension products.

On ArcObjects Online go to
Technical Documents > ESRI Extensions: Names and IDs

http://arconline.esri.com/arcobjectsonline/default.asp?URL=/arcobjectsonline/TechnicalDocuments/ESRIExtIds.htm 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Problem of 3D analyst extension in VC++ 
Author ding zheng 
Date Jan 14, 2002 
Message Dear Mr.Eleanor Blades

Thanks for your anwsers.
I tried the liences checking of 3D analyst extension in VB which is successful. But when I do it in VC++, I still have a problem. The VC++ code is as follwoing:

I use Debug tool to trace the problem which is happened in the line:
if(FAILED(hr = pExtManager->FindExtension(var,&pExtension)))
return false
from it, the var is OK, but I can not get the interface pExtension. It is empty. Then I can not QueryInterface to get the interface of pExtConfig.

Could help me to get the solution.

Cheers
 
 
HRESULT hr;
hr = CoInitialize(0); // initial COM of arcobjects

// check 3d extension liences

IUIDPtr pUid(__uuidof(UID));
CComBSTR t_3DExtension = "esriCore.DddEnvironment.1";
// or using "esriCore.DddEnvironment"

VARIANT var;
var.vt  = VT_EMPTY;
var.bstrVal = ::SysAllocString(t_3DExtension.m_str);
var.vt = VT_BSTR;
	
if(FAILED(hr = pUid->put_Value(var)))
 return false;
SysFreeString(var.bstrVal);

if(FAILED(hr = pUid->put_Value(var)))
 return false; 

IExtensionManagerAdminPtr pExtAdmin(__uuidof( ExtensionManager));
	 
VARIANT *v = 0;

if(FAILED(hr = pExtAdmin->AddExtension(pUid,v)))
	return false;

IExtensionManager *pExtManager = NULL;

if (FAILED(hr = pExtAdmin->QueryInterface(&pExtManager)))
 return false;
  
IExtension *pExtension = NULL;
// below, it is the problem line
if(FAILED(hr = pExtManager->FindExtension(var,&pExtension)))
	return false;

IExtensionConfig *pExtConfig = NULL;

hr = CoInitialize(0); // initial COM of arcobjects
if (FAILED(hr = pExtension->QueryInterface(&pExtConfig)))
		return false;

esriExtensionState State;
pExtConfig->get_State(&State);
		
if(State != esriESUnavailable)
pExtConfig->put_State(esriESEnabled);

// ending check 3d liences