Deploy an arcgis engine application with ArcGIS Desktop License

631
3
05-07-2012 04:41 AM
xxxlpmo
New Contributor
Hello,

I developped an application with arcGIS Engine and i want to deploy it in a machine that have only an ArcGIS Desktop license installed.

I put this code in the application startup code, but not result:

ESRI.ArcGIS.RuntimeManager.Bind(ESRI.ArcGIS.ProductCode.Desktop)



Anyone have a procedure to do it please.

Thanx
0 Kudos
3 Replies
JaimeNeira
New Contributor II
Hi,

Besides binding to the appropriate product, you also need to initialize with the appropriate license code for that product. The example code is here:
http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#//0001000001s0000000

Hope it helps,

Jaime
0 Kudos
xxxlpmo
New Contributor
Thanks Jaime for your help.

I tried to bind the appropriate product and initialize with the appropriate license code for that product.

        

Private Sub MyApplication_Startup(ByVal sender As Object, ByVal e As Microsoft.VisualBasic.ApplicationServices.StartupEventArgs) Handles Me.Startup

         
            ESRI.ArcGIS.RuntimeManager.Bind(ESRI.ArcGIS.ProductCode.Desktop)


            Dim aoi As AoInitialize = New AoInitializeClass()

            Dim productCode As esriLicenseProductCode = esriLicenseProductCode.esriLicenseProductCodeArcView
            If aoi.IsProductCodeAvailable(productCode) = esriLicenseStatus.esriLicenseAvailable Then
                aoi.Initialize(productCode)
            End If
         

        End Sub



But in execution, the data is not loaded in the mapControl and TOCcontrol. like this :

[ATTACH=CONFIG]14164[/ATTACH]

Note that my MXD file display the data when i open it with ArcMAP. and my application work when i initialize with Engine in the developpement computer.

any idea please?
0 Kudos
JaimeNeira
New Contributor II
Hi 'Saidman',

As far as I know, the issue that the screenshot shows is with the location of the data (programming issue is solved!).

I think that you could, in Visual Studio, in design view, set the Map Control's Map document property and set it to show it in 'preview' to confirm if, in design view, you are neither seeing the map. Verify the map's data location, the map document's Pathnames property (is it storing relative pathnames to data sources?) and be sure to open in the engine application exactly the same map document (not a copy) that you are opening in ArcMAP.

Regards,

Jaime
0 Kudos