|
POST
|
Good day, I am new to python and am having the following problem. If I type the following code into the Python window in ArcMap: import arcpy
MXD=arcpy.mapping.mapdocument('CURRENT')
dataframe = arcpy.mapping.ListDataFrames(MXD, "Layers")[0]
dataframe.zoomToSelectedFeatures()
arcpy.RefreshActiveView() It works when run from the python window. If I save it as a python script and add it to a modelbuilder model then try to run it from there it does not work. This is the message that displays: -------------------------------------------------------------------------------------------------------------------------------------- Executing (Zoom To Selected Feature): ZoomToSelected Start Time: Wed Apr 06 14:30:39 2016 Running script ZoomToSelected... Failed script ZoomToSelected... Traceback (most recent call last): File "X:\GIS\LUAM\Dev\Scripts\ZoomToSelected.py", line 2, in <module> MXD=arcpy.mapping.mapdocument('C:\ESRIPress\GTKModelbuilder\Maps\EX06B.mxd') #get access to the current mxd AttributeError: 'module' object has no attribute 'mapdocument' Failed to execute (Zoom To Selected Feature). Failed at Wed Apr 06 14:30:39 2016 (Elapsed Time: 0.08 seconds) -------------------------------------------------------------------------------------------------------------------------------------- What am I doing wrong with trying to get this to work from modelbuidler? Thanks, Chris
... View more
04-06-2016
01:32 PM
|
0
|
2
|
3733
|
|
POST
|
Thanks Kristian. This sounds promising. Is there an ETA on 4? I see it's been out in beta for a while. Chris
... View more
04-05-2016
10:36 AM
|
0
|
0
|
1640
|
|
POST
|
Hello everyone, I am wondering if it would be possible to build an application with the following functionality. This would be kind of like a CityEngine - lite. The application would have: 3D perspective view of parcels/roads you can click 1 or many parcels has tools to apply mass modeling to the selected parcel(s), offset, height... has a report window displaying gfa/far/sq ft for what you just modeled able to save the work into a text file so it could be loaded again at a later date This is just something we've been throwing around in discussions and so I thought I'd put it up here to see. Let me know if this is better off in another area of geonet. It is very much CityEngine related, but I thought something like this may be more appropriate in the JavaScript area? Thanks, Chris
... View more
04-04-2016
11:00 AM
|
0
|
4
|
4843
|
|
POST
|
Wondering if there is a more appropriate space/place where I should post this? Am I able to post a thread to more than one space/place? Thanks
... View more
02-26-2016
01:28 PM
|
0
|
2
|
1086
|
|
POST
|
Good day everyone, We have an application using the Map Journal template. It looks like this initially: As you scroll down though the journal the map changes as you get to each Ward. Within each ward there are 4 different graphs showing number of applications/permits by community within the ward (Land Use Applications; Subdivision Applications; Development Permits; Building Permits). When you click the title (i.e. "Land Use Applications (LOC)" in the above picture, the map will change to display the map showing the locations of the selected application / permit): What I would like to do is have the map display change on it's own so that when the journal scrolls to where the graph is displayed, that the map display would just change to show that data and not require the user to click the header (Land Use Applications (LOC)). As is I don't think it's intuitive enough for them to realize that they need to click the title to have the display change. If this is doable can it be done without having to download the template and change code? If it can only be done by downloading the template, then it could no longer be hosted on ArcGIS Online, am I correct in that? Thanks, Chris
... View more
02-25-2016
08:55 AM
|
0
|
3
|
2979
|
|
POST
|
Hi Kyle, couldn't figure out the connection thing. Would you mind sending me an email at Chris.holmes@calgary.ca<mailto:Chris.holmes@calgary.ca> when you get a chance and I'll send you the link? Chris
... View more
01-22-2016
11:16 AM
|
0
|
0
|
499
|
|
POST
|
Yes but at the moment I am testing using a friends web server, not our corporate. So I will send you the url through geonet. I think I have to connect/friend you first? Tks
... View more
01-22-2016
08:01 AM
|
0
|
0
|
499
|
|
POST
|
It's Lat/long and it did work fine when I downloaded the file and used Add Item > Item from my computer (from My Content). Chris
... View more
01-22-2016
07:18 AM
|
0
|
5
|
2888
|
|
POST
|
So, I did the Add Layer From Web, entered the url to my sample csv file, clicked the "Add Layer" button and nothing happens, the form just closes, no message no nothing. The url to the csv file is a .biz domain, I can't imagine that would have any effect on it? Thanks
... View more
01-22-2016
07:06 AM
|
0
|
7
|
2888
|
|
POST
|
Thanks Kyle. Yes it does make sense. So if you have a document link, which in my case is a csv file on a web server which gets regularly updated, how would you go about mapping that data in AGOL? Thanks, Chris
... View more
01-21-2016
12:39 PM
|
0
|
10
|
2888
|
|
POST
|
Good day all, From My Content I selected Add Item > From the Web (chose Document) and entered the url to my document which is a csv file. This worked fine and AGOL created a Document Link to my csv file. Selecting View Item Details gives only one option under the Open tab (that being Open). It gives the choice of Open/Save/Save As. I could have swore I clicked open and it opened the csv file in Excel but then in IE it opened a new tab which displayed the REST URL for the document link. I cannot find nor get back to that REST URL now. So I'm thinking that maybe it was for something else and that maybe document links do not have REST URL's?? Someone tell me if I'm out to lunch here, it is close to lunch time and I haven't eaten today, so very possible. Thanks! Chris
... View more
01-21-2016
10:46 AM
|
0
|
12
|
5338
|
|
POST
|
Great, thanks for sharing that link Tim. Just taking a scroll through your source file. Cheers, Chris
... View more
01-14-2016
10:22 AM
|
0
|
0
|
1884
|
|
POST
|
Congratulations Tim, I see you got third place with this app! I'm going to try to see if I can take a similar approach with redesigning our Ward Maps report. I'm sure I will be getting back to you with more questions down the road. Hope you don't mind. Thanks and have a good day. Chris
... View more
01-14-2016
10:05 AM
|
0
|
2
|
1884
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 11-10-2020 03:34 PM | |
| 1 | 02-23-2021 11:53 AM | |
| 1 | 02-16-2021 09:15 AM | |
| 1 | 12-10-2020 07:46 AM | |
| 1 | 01-18-2019 09:54 AM |
| Online Status |
Offline
|
| Date Last Visited |
04-22-2021
04:31 PM
|