POST
|
I'm hoping someone may be able to help. ESRI explains that add-ins created for 10.0 are forward compatible and thus work in 10.1 and 10.2, without additional compilation. However, none of my users can install my 10.0 add-ins on 10.1/10.2 as it raises a ???No GUI components found. Not supported for this version???. I thought it was my code, but I created a blank add-in with a button and no additional code/references and the same issue occurs. Both computers are running .net framework 3.5. I even tried another running 10.1 and also unistalled/reinstalled the sdk & visual studio. I have removed the second part of the issue with adding the ???targets??? in the Config.esriaddinx to include 10.1 and 10.2 ??? but should this be necessary? The first part of the problem ???no gui components??? is still eluding me! Any help would be appreciated. Thanks in advance
... View more
04-13-2014
01:37 PM
|
0
|
2
|
3098
|
POST
|
Well, I have already find some way to get a point. However, they cannot work appropritately. For example, OnMouseDown event is not exist in Button Add-in classes. Furthermore, OnMouseDown Event in VB Forms can only work in side the form. So I sincerely asking for if there is any other way to obtain a point outside the form within Button Add-ins? If it is appropriate, would you like to show me the sample of codes? I will be really appreciate of it.:cool: What are you trying to do? It would appear to me that you want to create a tool rather than a button. Buttons should be used where you do not need a constant response from the user i.e. it does one job - opens a dockable window or windows form or runs a script. You can do the same with a tool. However, whilst the tool is switched on Arc will continue to send information on what the user is doing to the tool, hence the OnMouseDown event. In this way you can pass information to a form if you are using one. Personally I have not attempted what you are trying - but a google search did bring this up: http://stackoverflow.com/questions/5528543/getting-position-of-mouse-cursor-when-clicked-out-side-the-forms-boundary
... View more
12-09-2013
01:04 AM
|
0
|
0
|
298
|
POST
|
Are you certain that the error is occurring on that line of code? The error says it is unable to cast the object to ILayer2. Nowhere in the code you posted are you attempting a cast to ILayer2 (only ILayer) so I don't see any way for that exception to be thrown. Thanks Neil you inadvertently solved the issue. The code posted was from ArcGIS Online as I didn't have the code directly in front of me. The only difference in my code is that I implement ILayer2 since ESRI advises: Provides access to members that work with all layers. Note: the ILayer interface has been superseded byILayer2. Please consider using the more recent version. I changed code back to using ILayer - it works perfectly. Obviously ILayer2 has not been implemented for this particular layer.
... View more
12-05-2013
06:05 AM
|
0
|
0
|
211
|
POST
|
"Size String" is as you say the width of the actual combobox on the toolbar "Item Size String" is the width of it's drop down
... View more
12-05-2013
05:34 AM
|
0
|
0
|
373
|
POST
|
Afternoon everyone - The following works great... Dim uid As ESRI.ArcGIS.esriSystem.IUID = New ESRI.ArcGIS.esriSystem.UIDClass uid.Value = "{6CA416B1-E160-11D2-9F4E-00C04F6BC78E}" 'IDataLayer Try Dim enumLayer As ESRI.ArcGIS.Carto.IEnumLayer = map.Layers((CType(uid, ESRI.ArcGIS.esriSystem.UID)), True) ' Explicit Cast enumLayer.Reset() Dim layer As ESRI.ArcGIS.Carto.ILayer = enumLayer.Next Do While Not (layer Is Nothing) layer = enumLayer.Next() Loop Catch ex As System.Exception 'System.Windows.Forms.MessageBox.Show("No layers of type: " + uid.Value.ToString); End Try Until you add a basemap (e.g. light grey canvas map) Even though its "Reference" layer is not a data layer IEnumLayer is continually picking up the layer - so when you do layer = enumLayer.Next() you get this wonderful error: System.InvalidCastException was caught Message=Unable to cast COM object of type 'System.__ComObject' to interface type 'ESRI.ArcGIS.Carto.ILayer2'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{599DEE2E-2182-4E54-8A86-725145C9D989}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)). Has anyone else had similar difficulties? Thank You Alex
... View more
12-05-2013
04:59 AM
|
0
|
2
|
555
|
POST
|
Hi Eva, I have recently tried to implement multithreading and found it a complete nightmare. Arc was not built to work in a multi threaded environment! Someone prove me wrong, but I don�??t believe that arc allows multiple instantiations of the geoprocessor to run tasks in parallel. Rather you have to send tasks to the geoprocessor asynchronously using a thread safe method. The following article explains a little more: http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#//000100000100000000
... View more
05-21-2013
02:54 AM
|
0
|
0
|
252
|
POST
|
Hello everyone, I have a request from a client to view imagery inside ArcMap from a wms feed. We can get the imagery in using the wms (the wms is from an external company - so unfortunately cannot play around with it), but it is very slow making it unusable when you are panning/zooming. Is there a way to intercept the wms using arcobjects and store the received image locally so it is not so disruptive? WMS version is 1.3.0 & am using VB.NET Arc 10.0 Thank you in advance Alex
... View more
07-06-2012
03:46 AM
|
0
|
0
|
754
|
POST
|
VB.NET & ArcMAP Probably a rather simple question, but how do you get the background colour of the active view (in map view not layout). I.e. access the "date frame properties", "frame", "background colour". Am exporting the active view from arcmap into a png, but need to know the background colour to state what colour is transparent in the png. For the life of me i cannot work it out. Any help is much appreciated Thank You Alex
... View more
02-01-2012
01:08 AM
|
0
|
3
|
2966
|
POST
|
Hello All, I realise that this subject has come up on this forum more than once, but it still seems to never have been answered. This theory worked in previous version, but not now since the change hyperlink scripting: 1. Feature field contain URL to an geo raster(.tiff) geotiff. 2. On hyperlink click find path of raster from field sx8 for clicked feature. 3. Open raster to arcmap. 4. Display raster in the active view in the location determined by the geotiff This is almost like a raster catalog in which we show the bounding boxes of each image before click, and on click the hyperlink is found and it displays the actual image on top of the bounding box. I noticed that the only way to do this would be to use what the esri help says: <esri help > You can create a dispatch object within your script code to call functions from a custom library. This allows you to access ArcObjects through your hyperlink script via the dispatch object. In addition you can pass IFeature and/or IFeatureLayer down to the dispatch object so that you launch the hyperlink for the appropriate feature. An example of a hyperlink script that creates a dispatch object: Function OpenLink ( {IFEATURE}, {IFEATURELAYER} ) Dim hlauncher Set hlauncher = CreateObject("Hyperlink_Lib.Launcher") hlauncher.Launch {IFEATURE}, {IFEATURELAYER} End Function This example will call the function Launch from a Hyperlink_Lib library that you have created. <esri help > Forgive me for being dense but this is not explained very well as to how to actually do it - please can someone jargon bust this for me. I am using visual studio .net - so how to link the two is what im looking for. Thankyou in advance Alex
... View more
11-24-2011
12:46 AM
|
0
|
1
|
2117
|
POST
|
Thank You, Yes, but ends up dont need to do it that way, noticed that the application wasnt hooking correctly so the onclosedocument() DOES now fire BEFORE onshutdown(). However, it does remove the dockable window every time you open a new map (i.e. you then have to click it on again). For anyone elses benefit i am including my code (amalgamation from arcgis objects help).. Note that this was implemented on an extension, in a standard module i have an open/close event that shows/doesnt shown the dockable window depending on if the document is to be closed. Imports ESRI.ArcGIS.Carto Imports ESRI.ArcGIS.ArcMapUI Imports ESRI.ArcGIS.Framework Public Class SSIM_EventListening Inherits ESRI.ArcGIS.Desktop.AddIns.Extension Private m_docEvents As ESRI.ArcGIS.ArcMapUI.IDocumentEvents_Event Public Sub New() End Sub Protected Overrides Sub OnStartup() WireDocumentEvents() End Sub Protected Overrides Sub OnShutdown() 'You can remove handlers here, but not working here for me End Sub Private Sub WireDocumentEvents() Dim app As ESRI.ArcGIS.Framework.IApplication = CType(Hook, ESRI.ArcGIS.Framework.IApplication) If app Is Nothing Then Return 'Handle Document events Dim doc As ESRI.ArcGIS.Framework.IDocument = app.Document m_docEvents = CType(doc, IDocumentEvents_Event) AddHandler m_docEvents.CloseDocument, AddressOf OnCloseDocument End Sub Private Sub OnCloseDocument() Call openclose() End Sub End Class [/CODE Happy programming Alex
... View more
09-08-2011
07:00 AM
|
0
|
0
|
272
|
POST
|
Good afternoon/morning to all, I want to be able to close my dockable window (opened via a toolbar button) every time the application (not document) is closed. At the moment, if the dockable window is open when arcmap is closed , when arcmap is re-opened the dockable window loads itself again. This is rather irritating for my client. I was wishing to do this through my event listening extension i have created in my add-in project, which is persistent. I have been able to handle an ondocumentclose() and onshutdown() event in this, however only the onshutdown() will fire when the application is closed (i would have thought that since its closing the document before closing the application it would do the ondocumentclose() event first?). Alas i cannot figure out how to access the document before the application is closed. I cant imagine that no-one else has not wanted to do this, so it would be great if someone had the answer! Thank You Alex
... View more
09-08-2011
05:45 AM
|
0
|
2
|
2869
|
POST
|
Ha HA...an element of success. Have been able to fire the event for renaming, visibility of TOC etc using active view events.....uses .contents changed and .view refreshed, did not use after redraw as fires far too many time for my liking. Question remaining: how do i find out what caused the event? i.e. can i link it to a specific layer?
... View more
09-02-2011
03:38 AM
|
0
|
0
|
351
|
POST
|
Sounds a much better way of implementing it, have now attempted it this way around. My only problem now is handling the event...how exactly do i handle a TOC event such as rename or change of visibility of a layer so that it will fire custom response? Cannot seem to find anything that interacts with the TOC specifically - most use workarounds like events.activeviewchanged.
... View more
09-02-2011
02:34 AM
|
0
|
0
|
351
|
POST
|
Hi to all! I am currently building an add-in for ArcGIS desktop. The add is a dockable window with tool functions. Part of the interface has a sections similar to the TOC in which groups of specific layers (included with the add-in) may be turned on and off. This event would need to turn off/on the layers simultaneously so that when the group is turned off in the dockable window, so it is in the TOC and vice verse. I have it working as in dockable window syncing to TOC, but how do i listen for events from the TOC to update the dockable window. I have been racking my brain for several days now, and not getting anywhere. I have found the snippet for editor events, and the visual studio project for new/open documents and have looked at the help support on event listening.....but am still very confused. Essentially my questions are: where do i put the code for event listening i.e. top of my dockable window code? and how do i reference the TOC so i get events back? and will it slow the program down a lot to do this. Would be so grateful is someone could give me an inclination or code for what to do... Thank You so much Alex
... View more
09-01-2011
06:52 AM
|
0
|
4
|
1136
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|