|
POST
|
Hi Destiny. So sorry for these problems. Unfortunately, as stated in the user's guide, a network dataset that uses the special transit evaluator will not work on any machine that has not had the transit evaluator "registered" to it, and you'll see that negative FDO error message number if you try to open it or add it to the map. The network dataset itself should work fine back to ArcMap 10.1, as long as the machine has the evaluator installed. It's only the Create Network Dataset From Template tool that requires 10.6 or higher, and that's only used to create the network. Once it's created, it should be good to go in any ArcMap version. Regarding the Model Builder model: Probably, as you said, the model disappeared because it referenced the transit network dataset, and your professor's machine didn't have the evaluator installed. Not the greatest behavior on ArcMap's part, I agree, but in using this custom transit evaluator, you're kind of out on the fringes of supported functionality anyway. Please feel free to show this response to your professor if you want to argue your points back. I'd also be happy to speak to your school's systems administrator if you want to try to get this installed on one of the school machines and they need an Esri staff member to explain what the thing does.
... View more
05-08-2018
03:33 PM
|
2
|
1
|
2196
|
|
POST
|
Probably there's something wrong with the way you've set up your Streets_UseThisOne evaluators for your Transit_TravelTime attribute. You need to make sure the walk time is being calculated correctly. Otherwise, you might get weird results like this because the network thinks you can walk super fast and get pretty much anywhere within 10 minutes. Can you post a screenshot of the evaluators dialog for that attribute?
... View more
05-08-2018
09:44 AM
|
1
|
8
|
2196
|
|
POST
|
Oops, sorry, just realized I told you wrong earlier. Don't use "is not null". Use "is not None". Sorry, my brain got python and Javascript garbled together.
... View more
05-07-2018
03:50 PM
|
0
|
1
|
1648
|
|
POST
|
Are you able to share your data? If so, please zip up your entire gdb and post it somewhere I can download, and I can take a look. Otherwise, honestly at this point you might really need to contact Support, if you're able. This question is getting pretty complicated, and they would be better equipped to walk you through the process.
... View more
05-07-2018
03:45 PM
|
0
|
2
|
1648
|
|
POST
|
Did you remember to switch the language picker to python instead of VBScript?
... View more
05-07-2018
03:07 PM
|
0
|
3
|
1648
|
|
POST
|
You can use more than one field in a field evaluator. You can pass in multiple fields to your function. Here's a made-up example: def SetCost(lim, dist):
cost=10000
if lim is not null:
cost=lim/dist
return cost
Value = SetCost(!SPEED_LIM!, !DISTANCE!)
... View more
05-07-2018
02:03 PM
|
0
|
6
|
2850
|
|
POST
|
Now you're on the right track. Try something more like this: def SetCost(lim):
cost=10000
if lim is not null:
cost=lim
return cost
Value = SetCost(!SPEED_LIM!) In the Value= box, you have to pass in the field value. Then, in the function, it retrieves the value as an argument. As it was, you were passing nothing to the function, and the function was trying to get the value from the field, but it doesn't know how to do that. With all that said, the logic here doesn't make sense to me. You're saying that the cost should be 10,000, unless the input field has a non-null value, in which case the cost should equal the speed limit. Shouldn't the cost be a function of the speed limit and the length of the street (assuming you're calculating time)? Maybe at this point you should tell me what your goal is. What are you really trying to calculate? Then perhaps I can better advise on the best way to achieve this.
... View more
05-07-2018
01:41 PM
|
0
|
0
|
2850
|
|
POST
|
Field evaluators allow you to read from the fields in the source feature classes and do simple script-related operations with them. When you build the network, the values are read from the data and any associated script is run, and the values themselves are baked into the network at that time. Script evaluators are meant for doing more complex and customized calculations that require access to multiple other network attributes and their parameters, network edge and junction properties, and other fancy things. The scripts here are evaluated at solve time rather than during the network build, so they are much slower. Rather than just looking up a stored value, they have to actually evaluate the script. Since, during the previous discussion, you were still using a script evaluator, that explains why changing the value to 0 did not require a re-build. However, it also explains why my suggestions did not work for you, since they were based on the assumption that you were now using a field evaluator. Don't worry. This stuff is confusing, and you're right that the documentation does not always provide good examples.
... View more
05-07-2018
01:37 PM
|
0
|
8
|
2850
|
|
POST
|
I can't explain why your simple test with Value=SetCost(0) worked. However, speaking as an member of the Network Analyst development team, I can vouch for the fact that you DO need to rebuild your network when you make any changes to the attributes and their evaluators. Otherwise the changes will not get properly baked into the network, so at that point all bets are off. To re-build your network, find it in the Catalog pane, right-click it, and choose Build. Alternatively, use the Build Network geoprocessing tool. Please try this and see if it fixes the problem.
... View more
05-07-2018
12:54 PM
|
0
|
12
|
2850
|
|
POST
|
0 is not equivalent to Null in this case. You would have to check "is null" or just "if not value". This might be a stupid question, but after you made the changes to your evaluator, did you re-build the network? If not, it won't have picked up any of the changes, so you would still get the same error as before.
... View more
05-07-2018
11:50 AM
|
0
|
14
|
4348
|
|
POST
|
What's in your SPEED_LIM field in your data? Maybe it has null values that need to be handled separately. If there were a null value, then the script would fail (because 100/null is undefined) and would return an error.
... View more
05-07-2018
11:32 AM
|
0
|
1
|
4348
|
|
POST
|
Hello Patricia. From the error message, it sounds like the tool cannot find the python script it needs in order to run. In Windows Explorer, go to the folder where you saved the Display GTFS in ArcGIS toolbox. There should be a subfolder called "scripts". Inside there, there should be a file called "DisplayGTFSRouteShapes.py". If that file is missing (or if the entire "scripts" folder is missing), then the tool will fail. If that's the case, try downloading a fresh copy of the toolbox.
... View more
05-07-2018
09:08 AM
|
2
|
1
|
2463
|
|
POST
|
Unfortunately, there's no way to solve this all in one go. You'll have to run multiple analyses, as you've suggested.
... View more
05-07-2018
08:59 AM
|
0
|
0
|
1035
|
|
POST
|
Are you just trying to read a value from the RoadsClipped attribute table and use that to derive the cost? If so, you don't need a Script evaluator. You can use a Field evaluator. Like with script, click on Evaluator Properties to open up the dialog where you can set up some pre-logic script code. This was your python example from before: def SetCost(value):
a=Edge.AttributeValueByName(value)
c=0
if l!=0:
c=100/a
return c
value=SetCost("SPEED_LIM") Note that for a field evaluator, you do not need Edge.AttributeValueByName(value). In this case, "value" will be the field value read from the RoadsClipped attribute table. So, let's just say the speed limit is 30, as an example. You don't need the "a" variable at all. You can just use "value". def SetCost(value):
c=0
if l!=0:
c=100/value
return c
value=SetCost("SPEED_LIM") What is "l"? I think this is where your problem lies. As Dan says above, this variable isn't defined.
... View more
05-07-2018
08:50 AM
|
0
|
1
|
4348
|
|
POST
|
I can't see the screenshots, either. Only the first one with the connectivity policy.
... View more
05-07-2018
08:38 AM
|
0
|
0
|
1778
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | a month ago | |
| 1 | 04-21-2026 08:39 AM | |
| 1 | 04-15-2026 02:24 PM | |
| 1 | 02-03-2026 11:41 AM | |
| 1 | 03-16-2026 08:58 AM |
| Online Status |
Offline
|
| Date Last Visited |
a month ago
|