POST
|
Also, do you know how to read A XML file, i am having difficulty in doing that. I am using following for this: Dim xmlStream As esriSystem.IXMLStream Dim xmlReader As esriSystem.IXMLReader Set xmlStream = New esriSystem.xmlStream xmlStream.LoadFromFile "D:\Directions.xml" Set xmlReader = New esriSystem.xmlReader xmlReader.ReadFrom xmlStream I don't know what to do after this. However, I tried several methods of IXMLReader but couldn't get anything working. Thanks, Nagendra
... View more
05-21-2012
11:57 AM
|
0
|
0
|
5
|
POST
|
Hi Jay, My goal is to count number of left and right turns in a route and turns should be made at an intersections. If nothing works out, I was thinking to read the XML file to get count of "left" and "right" words. Btw, how does ArcGIS decide left and right turns? Thanks, Nagendra
... View more
05-21-2012
09:28 AM
|
0
|
0
|
5
|
POST
|
Hi Jay, Then is there any way to get these turns through street direction? I can export the directions as a XML output but how can I get left and right turns from that? If i try to calculate angles between edges than it will increase the computing time. So, I am thinking if there is something in the results that can be used for this. Thanks, Nagendra
... View more
05-21-2012
08:24 AM
|
0
|
0
|
53
|
POST
|
Hi Jay, Thank you for the reply. I used the same VBA code for turns but output had nothing. Btw, if street directions are available doesn't it mean that turns are there too? if not then do we have to import turns separately? Thanks, Nagendra
... View more
05-21-2012
08:03 AM
|
0
|
0
|
53
|
POST
|
Hi, I am also trying to find no. of turns (left and right) along a route. But I have ArcGIS 9.3, and I guess, this add-in is for ArcGIS 10 as it doesn't recognize 9.3. So, it would be helpful for me if any one can please post the VBA code associated with the add-in? Also, I know that turns can be accessed via traversal but when I use that with my network data set it gives me a blank shapefile, however, junctions and edges outputs are perfectly fine. That left me wondering if it has anything to do with the way I set up my turns while creating the network dataset. That time, I checked "Yes" to the question "Do you want to model turns in this network?" with "Global turns" checked as the turn sources. Also, at the end, I established driving directions by just providing "Street Name Fields". Alternatively, I tried using INAStreetDirectionsAgent, but it gives me the directions in XML output. I couldn't find any other useful output from that. Even, with the XML output I don't know how to use it to get the number of turns. Any help is appreciated. Thanks, Nagendra
... View more
05-19-2012
03:16 PM
|
0
|
0
|
53
|
POST
|
Hi, I have a loop that adds two layers in every step, and both layers are from different folders. That means that the loop involves going through two different folders simultaneously. I know how to loop through one folder but don't know how to do it for multiple folders. Following is what I want to do:
inputfile1 = Dir(folder1 + "*.shp")
inputfile2 = Dir(folder2+"*.shp")
do while inputfile1 <> ""
' Add inputfile1 and inputfile2 to map
' go to next files in respective folders
inputfile1=Dir
inputfile2=Dir
Loop
Thanks, Nagendra
... View more
11-08-2011
08:44 PM
|
0
|
1
|
1567
|
POST
|
Thanks, Sandhu. Are line barriers possible in ArcGIS 9.3? or it's new in ArcGIS 10? Thanks, Nagendra
... View more
11-04-2011
11:28 AM
|
0
|
0
|
15
|
POST
|
Hi, I want to create a network dataset from a shapefile. It could be done if VBA code is written in ArcCatalog. But I am wondering if there is a way to do it from VBA code in ArcMap. Is it possible to control ArcCatalog operations from ArcMap? I have a loop where every step has to create a network dataset. Thanks, Nagendra
... View more
11-02-2011
08:31 AM
|
0
|
0
|
249
|
POST
|
Hi, For every iteration, I update my cost field and subsequently build the network dataset to reflect those changes. Following is the code I am using for building the network dataset.
Private Sub buildNetworkDataset()
Dim pWorkspaceFactoryM As IWorkspaceFactory
Dim pFeatureWorkspaceM As IFeatureWorkspace
Set pWorkspaceFactoryM = New ShapefileWorkspaceFactory
Set pFeatureWorkspaceM = pWorkspaceFactoryM.OpenFromFile("C:\data\", 0)
Dim pWSExtMgr As IWorkspaceExtensionManager
Dim pUID As New UID
Dim pWSExt As IWorkspaceExtension
Dim pDSCont As IDatasetContainer2
Dim pND As INetworkDataset
Dim pGeoDS As IGeoDataset
Dim pNB As INetworkBuild
Dim pReturnedExtent As IEnvelope
Set pWSExtMgr = pFeatureWorkspaceM
pUID.Value = "{4C1B151C-48C3-46C5-AB57-E6B941A1D00A}"
Set pWSExt = pWSExtMgr.FindExtension(pUID)
Set pDSCont = pWSExt
Set pND = pDSCont.DatasetByName(esriDTNetworkDataset, "Network_ND")
Set pGeoDS = pND
Set pNB = pND
Set pReturnedExtent = pNB.BuildNetwork(pGeoDS.Extent.Envelope)
End Sub
But it encounters a run-time error '-2147220937 (80040237)': Automation Error at the very last line:
Set pReturnedExtent = pNB.BuildNetwork(pGeoDS.Extent.Envelope)
Now, I can't figure out what is wrong with the code. Can anybody help me on this? Thanks, Nagendra
... View more
11-02-2011
07:15 AM
|
0
|
0
|
369
|
POST
|
Hi, I have created a network data set (ND) specifying the impedance. But I want to change the impedance value of few features every time I run the route solver. But it looks like once you have created the ND, no matter what are the new impedance values in the attribute table, route will be solved based on the original impedance values present while creating the ND. Is there a work around to use impedance values dynamically? Thanks, Nagendra
... View more
10-24-2011
11:51 AM
|
0
|
6
|
2132
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|