|
POST
|
The problem is that when you select the 'ZoomIn' button and then the 'Measure' button, the 2 tools are active and are listening to map click event (==> random result depending on event order). When you click on the measure tool you need to disable the other tools. Example : add this code:
private void DisableDrawObject(object sender, RoutedEventArgs e)
{
MyDrawObject.IsEnabled = false;
}
And call it when the user clicks the measure button: <Button Style="{StaticResource MenuItem}" Click="DisableDrawObject"
Content="Measure" >
<i:Interaction.Triggers>
<i:EventTrigger EventName="Click">
<esriBehaviors:MeasureAction
AreaUnit="SquareMiles"
DisplayTotals="True"
DistanceUnit="Miles"
MapUnits="DecimalDegrees"
MeasureMode="Polygon"
FillSymbol="{StaticResource DefaultFillSymbol}"
TargetName="MyMap"/>
</i:EventTrigger>
</i:Interaction.Triggers>
</Button>
Thanks Dominique. That worked
... View more
07-27-2010
04:11 AM
|
0
|
0
|
335
|
|
POST
|
Good afternoon, Josh! I've seen that mentioned before, and pardon my lack of GIS knowledge (I'm a .NET/Silverlight developer by trade, and am very new to all things geographic), but could you clarify what you mean by print to scale, please? Thanks! Lisa Hi Lisa- So for instance in the Silverlight Print Function, the user would select that they want a PDF and they want it to be 1 inch = 100 feet. So there would probably be a dropdown with the option of 1" = 100' and 1" = 200', etc.. When the PDF is produced 1 inch on the PDF would be exactly 100 feet. Hope that helps
... View more
07-26-2010
01:10 PM
|
0
|
0
|
918
|
|
POST
|
Does Lisa's Print Function allow printing to scale? Many folks are asking for a way to print to scale before the PDF is created. If so can you email me your print function too Lisa? my email is josh_vickrey@swn.com Thanks Lisa -Josh
... View more
07-26-2010
11:59 AM
|
0
|
0
|
918
|
|
POST
|
Hi All- I added the exact XAML and C# used in the samples for the Toolbar sample. It works fine. I then added the code below that came from the UtilitySample (Measure Button) and when the website loads I can select the Measure Button and get measurements by clicking on the map. Then if I select a Tool on the Toolbar (Zoomin, Zoomout, etc) they will work just fine BUT if I select the Measure Button after using those tools on the Toolbar the focus is still on the Toolbar tools. The only way I can get the Measure Button to get focus is to select the Measure Button, then select the Zoomout, then select Measure again. Strange.. Can someone help me here? Attached is my XAML.
... View more
07-26-2010
11:35 AM
|
0
|
2
|
1155
|
|
POST
|
Hello All- I'm using Silverlight 3 I have added the proper XAML and C# to get the basic Toolbar to come into my Silverlight App. I now want to add the Measure Tool found in the Utility Actions sample at this link. http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#UtilityActions Is there a way I can add that tool into the toolbar? Please let me know. Thanks
... View more
07-26-2010
11:16 AM
|
0
|
9
|
1267
|
|
POST
|
Hello- I have Silverlight 3.0 and in Visual Studio when I add the XAML and CS code from the Toolbar example (below link) the map loads but the toolbar has no tools in it. This doesn't have anything to do with me not having Silverlight 4.0 does it? http://resources.esri.com/help/9.3/arcgisserver/apis/silverlight/samples/start.htm#ToolBarWidget
... View more
07-22-2010
12:03 PM
|
0
|
1
|
620
|
|
POST
|
did you have any luck? I'm hoping to print to scale using flex too
... View more
07-15-2010
10:12 AM
|
0
|
0
|
1361
|
|
POST
|
Are you creating it repeatedly in a loop? Did you try calling Marshal.ReleaseCOMobject on it once you're finished with it? Hi Kirk- Great to hear your quick reply. I'm not using it in a loop but I tried GC.Collect() I will try the Marshall method you mentioned. I have maybe 30 functions and about 10 of them use the Geoprocessor gp = new Geoprocessor(); I also tried your method which I believe is using GeoProcessor (capital P). Once one of these functions throws that "IClassFactory error" then the other functions that use Geoprocessor throw that error too. So you are thinking that C# program is not getting rid of the object properly? Or what is your explanation? I'm still learning 😉
... View more
06-25-2010
10:15 AM
|
0
|
0
|
1161
|
|
POST
|
Kirk, Neil, or anyone that can help.. I was wrong about my last post and I am not getting this to work consistently. I still get the IClassFactory error at times when I try to run a Geoprocessing tool like CreateFileGDB, etc. What is so WEIRD is that sometimes I get this error and sometimes it works. Please let me know if you know what I can do here.
... View more
06-25-2010
08:37 AM
|
0
|
0
|
1161
|
|
POST
|
I have the same problem too. The error seems to appear in the constructor code at "Geoprocessor gp = new Geoprocessor();". The returned exception message is (in French): La création d'une instance du composant COM avec le CLSID {5374EC4C-1AA2-4829-A811-DE624ECEC23F} à partir de IClassFactory a échoué en raison de l'erreur suivante*: 80010105.; à ESRI.ArcGIS.Geoprocessor.Geoprocessor..ctor() This error appeared "randomly"... I don't know why? David did you figure this out? I have the same problem
... View more
06-24-2010
04:17 AM
|
0
|
0
|
389
|
|
POST
|
Hi Kirk- 2 questions: What is the GUI for the Geoprocessor object not GeoProcessor? I was using Geoprocessor object because its execute method only takes 2 arguments. If I have to use GeoProcessor then the first parameter required is string Name. What is Name? The Name of the tool? FeatureClassToFeatureClass_Conversion? That worked Kirk. I used the below code and it worked for inserting my FC into SDE. It still baffles me as to why it fails otherwise but I'll stick with what works. Thanks Kirk and Neil. I wish I could give you guys points somehow like in the old forums.. IVariantArray vp = new VarArrayClass(); vp.Add(in_Features); vp.Add(out_path); vp.Add(out_name); Guid g = new Guid("5374EC4C-1AA2-4829-A811-DE624ECEC23F"); Type t = Type.GetTypeFromCLSID(g); Debug.Print(t.ToString()); GeoProcessor gp = Activator.CreateInstance(t) as GeoProcessor; gp.Execute("FeatureClassToFeatureClass", vp, null);
... View more
06-17-2010
01:33 PM
|
0
|
0
|
1161
|
|
POST
|
Please elaborate. what is the GUID for Geoprocessor? for GoeProcessor you are saying it is {5374EC4C-1AA2-4829-A811-DE624ECEC23F}. But I'm wondering for Geoprocessor (lower case p).
... View more
06-17-2010
01:27 PM
|
0
|
0
|
1161
|
|
POST
|
Here's the key I have (on Vista64): HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{5374EC4C-1AA2-4829-A811-DE624ECEC23F} Do you have this key (or its 32 bit equivalent) ? Does this code work for you? public static void TestGp()
{
Guid g = new Guid("5374EC4C-1AA2-4829-A811-DE624ECEC23F");
Type t = Type.GetTypeFromCLSID(g);
Debug.Print(t.ToString());
GeoProcessor gp = Activator.CreateInstance(t) as GeoProcessor;
Debug.Print(gp.OverwriteOutput.ToString());
} Hi Kirk- 2 questions: What is the GUI for the Geoprocessor object not GeoProcessor? I was using Geoprocessor object because its execute method only takes 2 arguments. If I have to use GeoProcessor then the first parameter required is string Name. What is Name? The Name of the tool? FeatureClassToFeatureClass_Conversion?
... View more
06-17-2010
01:18 PM
|
0
|
0
|
2011
|
|
POST
|
Sounds like this might be an install issue ... if you search your registry, do you find this key? If not, consider re-installing. Hi Kirk- I did a search in my registry and found that key in esriGeoprocessing.GeoProcessor. This is puzzling.. Thoughts?
... View more
06-17-2010
12:25 PM
|
0
|
0
|
2011
|
|
POST
|
Below is the code from a Windows service that I wrote a while back. I fully qualified the class names to avoid confusion with the old Geoprocessor class in the Geoprocessing library. ESRI.ArcGIS.ConversionTools.FeatureClassToFeatureClass fcToFcTool = new ESRI.ArcGIS.ConversionTools.FeatureClassToFeatureClass();
fcToFcTool.in_features = featureLayer;
fcToFcTool.out_path = outputDirectory;
fcToFcTool.out_name = newTableName;
if (!string.IsNullOrEmpty(query))
fcToFcTool.where_clause = query;
Geoprocessor gp = new ESRI.ArcGIS.Geoprocessor.Geoprocessor();
gp.Execute(fcToFcTool, null); Hi Neil- Thanks for the response. I have used nearly the same exact code before in my other functions and not got an error but for some reason I am still getting that IClassFactory error even if I use the fully qualified geoprocessor name. Any suggestions?
... View more
06-17-2010
10:18 AM
|
0
|
0
|
2011
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 11-15-2023 01:27 PM | |
| 1 | 05-02-2017 11:40 AM | |
| 1 | 06-16-2010 08:09 AM | |
| 1 | 05-02-2017 10:04 AM |
| Online Status |
Offline
|
| Date Last Visited |
10-16-2025
02:03 PM
|