POST
|
I am able to create the gpk using the above mentioned link instructions. However, when I attempted to create a gpk using my own data, I got an error message each time (General function failure ERROR 999999: Error executing function). When I researched this error, I didn't find anything helpful. I am using a map document that contains a Network Dataset created from a Shapefile Feature class. The settings that I use to create the package are . . . Support ArcGIS Runtime enabled (other two options are disabled) Summary and Tags detail filled in Is there any way to find out more info on the error? I don't know why it's failing, but I keep changing little details and trying it again. Thanks, Renee
... View more
10-02-2012
09:49 AM
|
0
|
0
|
335
|
POST
|
Thank you Feng. I plan to try one of these out and let you know how it goes. Have a great day!
... View more
07-10-2012
09:52 AM
|
0
|
0
|
309
|
POST
|
I've been investigating using Arc Hydro Tools for research that I've been doing involving ponding (sinks) areas. I was just wondering if Arc Hydro Tools can be called in C# code using Arc Objects. Thanks, Renee
... View more
07-09-2012
04:33 AM
|
0
|
2
|
878
|
POST
|
Thanks Pat - I finally figured that out. Now, I'm just doing the following: IEngineNetworkAnalystEnvironment naEnv = new EngineNetworkAnalystEnvironmentClass(); IEngineNAWindow naWindow = naEnv.NAWindow; naWindow.ActiveCategory = naWindow.get_CategoryByNAClassName("Barriers"); naWindow.ActiveCategory.Layer.Name = "Line Barriers"; naWindow.UpdateContent(naWindow.ActiveCategory); This allows me to use the Location tool to put point barriers on the map. However, I really want to place line barriers (that's why the last 2 lines are in there). How can I place line or polygon barriers instead of point barriers? Thanks again! Renee
... View more
11-23-2011
06:23 AM
|
0
|
0
|
636
|
POST
|
Sorry, Patrick, it's been a while since I checked this. Anyway, I resolved the issue with the code crashing. I know (after a lot of trial and error) how to use this object. I'm close to having an answer with this, but am still having problems with the code. Since I can't insert screen shots here, it's hard to explain. However, here is a small portion of the code . . . 1 for (int j = 0; j < aCompLyr.Count; j++) 2 { 3 pLayer = aCompLyr.get_Layer(j); 4 aStr = pLayer.Name; 5 if (aStr == "Line Barriers") 6 { 7 naWindow.ActiveAnalysis = (INALayer)pLayer; 8 9 } 10 } I get an error on line #7 that reads as follows: Unable to cast COM object of type 'System.__ComObject' to interface type 'ESRI.ArcGIS.NetworkAnalyst.INALayer'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{667B776B-5905-4450-9C94-18B214ECE8FB}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)). I would appreciate any suggestions. Thanks!
... View more
11-23-2011
04:43 AM
|
0
|
0
|
636
|
POST
|
When I'm tracing down through the code, this is what the naEnv object looks like before the code crashes. Do you know what could be going on with this?
... View more
11-18-2011
04:41 AM
|
0
|
0
|
636
|
POST
|
When I got to the following line, I had a catastrophic failure (COM exception). I will research to learn more about the object "IEngineNetworkAnalystEnvironment". IEngineNAWindow naWindow = naEnv.NAWindow;
... View more
11-18-2011
02:39 AM
|
0
|
0
|
636
|
POST
|
Thanks for all your help Patrick! I am using the following line to define naLayer: INALayer naLayer = Layers.FindNetworkLayerInMap(map, "Line Barriers"); I'll see how this goes.
... View more
11-17-2011
10:43 AM
|
0
|
0
|
636
|
POST
|
Is naLayer an INALayer2 object? As in . . . var naLayer = (INALayer2)Layers.FindNetworkLayerInMap(map, "Route"); Is the Route layer that shows up in the table of contents something different from the layers in the Network Analyst Window? Thanks!
... View more
11-17-2011
10:20 AM
|
0
|
0
|
757
|
POST
|
I was just looking at the AppRef class: "Since AppRef is a singleton, you should use the Activator class to create an instance of it. // Get the actual underlying COM type Type t = Type.GetTypeFromCLSID(typeof(AppRefClass).GUID); // Or if ProgID or CLSID is known, use it directly //Type t = Type.GetTypeFromProgID("esriFramework.AppRef"); //Type t = Type.GetTypeFromCLSID(new Guid("e1740ec5-9513-11d2-a2df-0000f8774fb5")); System.Object obj = Activator.CreateInstance(t); IApplication app = obj as IApplication;" What you sent me looks more friendly. I'll try out the code that you sent and let you know. Thanks!
... View more
11-17-2011
10:12 AM
|
0
|
0
|
757
|
POST
|
I may be on the right track, but I've never used an IApplication object, so I'm not sure what to do about that.
... View more
11-17-2011
09:52 AM
|
0
|
0
|
757
|
POST
|
Right now I am looking into using the INAWindow object for what I need to do: http://edndoc.esri.com/arcobjects/9.2/ComponentHelp/esriNetworkAnalystUI/INAWindow_ActiveCategory.htm I need to somehow select one of the barrier layers in the N.A. Window.
... View more
11-17-2011
09:14 AM
|
0
|
0
|
757
|
POST
|
I'm not sure how, but I must have inadvertently created a new user login for myself with that last thread. Sorry about that.
... View more
11-17-2011
09:04 AM
|
0
|
0
|
757
|
POST
|
I want the user to be able to draw the barriers using the "Create Network Location Tool"
... View more
11-17-2011
08:59 AM
|
0
|
0
|
757
|
Title | Kudos | Posted |
---|---|---|
1 | 05-02-2017 07:16 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|