|
POST
|
Sorry for the late reply guys, just saw all the posts thanks to Patrick. So what I did is attach the measure action on the maps PreviewMouseDown (that is if the tool is selected). This way when it is finished, it is not tied right back into the map. Also, with the release of the 2.2 API, we can now stop a measure action by calling MeasureAction.Detach(). Here are some of my methods:
protected void AttachMeasureAction(Map map)
{
if (!MeasureActionSelected && map != null)
{
MeasureActionSelected = true;
//ToolLock = true;
map.Layers.CollectionChanged += Layers_CollectionChanged;
MeasureAction.Attach(map);
MeasureAction.Execute();
}
}
protected void StartMeasureAction()
{
DisableMeasureAction();
foreach (Map map in InternalMaps)
{
map.PreviewMouseDown += Map_PreviewMouseDown;
map.Cursor = Cursors.Hand; //Need to reset cursor because measure action changes it upon finish
}
}
protected void DisableMeasureAction()
{
MeasureAction.Detach();
foreach (Map map in InternalMaps)
map.PreviewMouseDown -= Map_PreviewMouseDown;
MeasureActionSelected = false;
//ToolLock = false;
}
//Events
protected void Map_PreviewMouseDown(Object sender, System.Windows.Input.MouseButtonEventArgs e)
{
DisableMeasureAction();
AttachMeasureAction((Map)sender);
}
protected void Layers_CollectionChanged(Object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
{
//Restart measure action when finished
if(MeasureActionSelected)
{
if (e.OldItems != null)
{
for (Int32 i = 0; i < e.OldItems.Count; i++)
{
if (e.OldItems is GraphicsLayer && ((GraphicsLayer)e.OldItems).ID == null)
{
StartMeasureAction();
break;
}
}
}
}
}
Hope this helps!
... View more
08-10-2011
02:36 PM
|
0
|
0
|
2146
|
|
POST
|
Well, I ended up contacting support about this and got this response: I investigated further and found that a product defect had already been logged for this issue. #NIM065082- Add-in ComboBox dropdown is not under the ComboBox, it appears under the caption. The current status of the Bug is 'Rejected'- Reason for Rejection is "as designed" Unfortunately, this is by design and part of the add-in framework. The workaround would be to keep the showCaption="false". This makes absolutely no sense though. I don't think I have ever seen a ComboBox that was "designed" this way... even ESRI's own ComboBox's don't behave this way (ex. Spatial Analyst Toolbar). I sent an enhancement request back asking for an option to adjust this alignment then, but kind of doubt this will happen. Sorry, don't mean to rag on ESRI, they do exceptional development work... just don't understand their position on this one.
... View more
08-05-2011
09:14 AM
|
0
|
0
|
2093
|
|
POST
|
I am trying to use Morten's cool "OnDemand MapTip" in a WPF XBAP on a clustered FeatureLayer. It mostly works but with two problems... 1) The SizeChanged event does not always get fired: I'm not sure of any logical pattern yet, but mousing over some features fires this event, and others not. It seems like it happens mostly after zooming in... But that might be just because the cluster is being broken up more, so more to test. I tried using the LayoutUpdated event too, and that works better, but it is fired much more than it is needed. Any ideas to fix SizeChanged to always be called? Or any ideas on another event to call instead? 2) Map tip sometimes empty: This might be fixed with the above issue, but using both the SizeChanged and the LayoutUpdated events, even though the event may not be fired, sometimes it skips the "busy" template and goes straight to the "completed" but with an empty map tip. This happens much more with the SizeChanged event. With the LayoutUpdated event, it seems that I get these empty map tips after zooming or trying to access a map tip while the map is still loading; maybe it is caching an empty map tip? Any ideas to fix these empty map tips (potential caching problem)? Thanks a lot for any help!
... View more
07-06-2011
08:00 AM
|
0
|
0
|
862
|
|
POST
|
We are running Oracle 10g (soon to be 11g) with ArcSDE 9.3.1 (soon to be 10). All the ArcGIS Desktop clients are at version 10. Is there any way to use an Oracle bind variable from within an ArcMap layer's definition query? Thanks a lot!
... View more
06-23-2011
01:42 PM
|
0
|
4
|
1864
|
|
POST
|
ESRI support helped me out... When creating a new attribute index, the �??unique�?� option is disabled (grayed out) for versioned feature classes. The only way around this is to make a copy of the feature class (which will not be versioned), delete the original and rename this new one�?� then you must create ALL unique indexes before registering as versioned.
... View more
06-02-2011
01:02 PM
|
0
|
0
|
436
|
|
POST
|
We are using ArcCatalog 10 with an Oracle 10g ArcSDE 9.3.1 database. When trying to add a new attribute index, the "unique" option is disabled (grayed out). I see this option is not available for file and SQL Server geodatabases, but it should with Oracle... we have used this in the past. Any ideas? Thanks a lot!
... View more
06-02-2011
08:50 AM
|
0
|
2
|
2459
|
|
POST
|
Marcus, From what I can tell, 2.2 Beta has this issue, but the 2.2 Final will have it fixed (not released yet). Check out the post I made here: http://forums.arcgis.com/threads/27909-MeasureAction-in-Web-Mercator-Issues...?highlight=web+mercator
... View more
06-01-2011
06:35 PM
|
0
|
0
|
1918
|
|
POST
|
Yep, just signing the assembly with a strong name key fixes the problem... don't even have to change the version number on the assembly. Thanks for all your help Richard!
... View more
05-24-2011
10:35 AM
|
0
|
0
|
1155
|
|
POST
|
Hmmm, you have to use a strong name to use versioning... I wonder if all I need to do is sign the assembly and provide a strong name key... I'll try that out and report back.
... View more
05-24-2011
08:56 AM
|
0
|
0
|
1155
|
|
POST
|
There are many options. You might try changing the version of the shared code and then have the assembly which references the shared code set the properties on the reference to indicate that it is version specific. Unfortunatly you can not set the Specific Version flag when the reference is to another project. Suppose I could compile the assembly and reference that, not ideal though. Not sure if this will work either... There are many options. Create a different assembly for each project, i.e. share the actual underlying C# files but have a different Visual Studio project which builds a different assembly. Again, not ideal, but should work... There are many options. Literally install the shared assembly in the GAC (I understand why XCopy is easier). Kinda defeats the appeal of add-ins in my opinion if we go this approach. I'll see what I can come up with... thanks!
... View more
05-24-2011
08:51 AM
|
0
|
0
|
1155
|
|
POST
|
Sounds like your problem might be your approach to shared code. For example, I think that if the sharedcode assembly is already loaded from a previous add-in then it will not reload. Perhaps the references should be Version Specific? I agree, this is exactly the problem... and this is what I am trying to work out. I have tried incrementing the referenced assemblies build number, and the add-in project is referencing this new version number... but it still seems to use the older assembly from one of the other add-ins... Am I missing something? I don't need to give the assembly a unique filename, say with the build number in it, do I (that would be a bit annoying to manage)? Thanks a lot for all the help so far Richard!
... View more
05-24-2011
07:07 AM
|
0
|
0
|
1155
|
|
POST
|
Thanks for the reply Richard! The add-ins are being delivered by placing the .esriAddIn file on a network share. The users have this share location set in their registry's "AddInFolders" key. The assemblies are deployed inside each of the .esriAddIn files, so if the assembly is used in several different add-ins (shared), then it is zipped into both add-in packages. They are not registered and not in the GAC. We just want to do an xcopy like deploy... I have never used "fusion log viewer", I will check it out. Thanks a lot!
... View more
05-23-2011
07:57 PM
|
0
|
0
|
1155
|
|
POST
|
Any chance you could post the MapSplitter control? Hi Yeltad, I can't share too much code since it technically belongs to the company I work for... but I have attached this control with a few little things stripped out. I wrote this code back when I was learning WPF, so it may not be the best either :P. Hope it helps some though. Sorry for the late reply, I was out on vacation...
... View more
05-23-2011
10:21 AM
|
0
|
0
|
3100
|
|
POST
|
We have some standard library projects that are shared among multiple different add-in projects. As I have been bouncing back and forth getting these different add-ins ready to go into production, I realized that when I would make a change to one of the libraries, and then recompile a specific add-in, it would crash at runtime saying it couldn???t find the method or something of that nature. It seems that it is using the DLL from another add-in it has loaded already. 1) Is there a way to tell it to use the DLL that is bundled within its own add-in? 2) If I increment the build version number on each DLL with each test deploy will it then use the right one? This doesn't seem to work 😞 Is there any easy way to not have to re-deploy all our add-ins when just wanting to update one with a small tweak/update in a shared dll? Thanks a lot for any info.
... View more
05-06-2011
02:18 PM
|
0
|
9
|
1294
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 10-24-2023 10:43 AM | |
| 1 | 10-02-2023 02:23 PM | |
| 1 | 11-16-2016 02:05 PM | |
| 1 | 07-05-2017 09:30 AM | |
| 15 | 11-19-2010 08:05 PM |
| Online Status |
Offline
|
| Date Last Visited |
05-01-2024
08:25 PM
|