|
POST
|
I'm having some odd behavior with writing to the description of the layer in a mxd. I've used the code below to write to the description:
import arcpy
mxd = arcpy.mapping.MapDocument(r"C:\Data\GISData\GDG\GrabDataPy\test.mxd")
for lyr in arcpy.mapping.ListLayers(mxd):
print
print lyr.name
print lyr.description
lyr.description = "some text"
mxd.save()
del mxd
I can see based on the code above print statement and the date/time on the mxd that when I run the above code the mxd is updated. Since if I run this code a 2nd time, the print shows the new values, and the time changes on the file stamp of the mxd to when the code was last run. However, when I open the mxd in ArcMap 10.0 sp3, the change to the description is not present. It just has what was in it originally. Ideas??
... View more
11-24-2011
07:49 AM
|
0
|
0
|
1246
|
|
POST
|
No, but it would still be nice! I just haven't had the time to develop anything yet. Seems like something we all could use....
... View more
11-22-2011
04:44 AM
|
0
|
0
|
1007
|
|
POST
|
I know that that ESRI will be putting something like this out soon, but much better..... However, I had a project that I needed hundreds of popup.xml files, so I wrote a little python script to do it. I'm not aware of another utility out there to do this, but then again maybe there is. I'm sure it isn't perfect but it does work for me. Direction can be found within the zip file. There are two python scripts, one that allows you to point it to a feature class and generate a basic popup.xml file for the feature class. There then is another that you can point to a FGDB and generate popup.xml file for every feature class in it. In my experience it takes about 5 minutes to generate 50 popup.xml files. That's much faster then I can do it by hand. You can find it at: http://www.arcgis.com/home/item.html?id=6cef5fa8b15a4811b1575138b1ca604d Enjoy!
... View more
11-10-2011
06:17 AM
|
0
|
0
|
548
|
|
POST
|
Does anyone have the source code change they can provide?
... View more
11-02-2011
06:34 AM
|
0
|
0
|
646
|
|
POST
|
Any word on how to bump up query limit in AGS so it pumps out more then 1000 records?
... View more
10-03-2011
09:02 AM
|
0
|
0
|
302
|
|
POST
|
Jeremy, would you mind sharing your source code for that? It would be helpful as a starting point for some other stuff I have been looking into. Frank
... View more
10-03-2011
07:06 AM
|
0
|
0
|
394
|
|
POST
|
Ok, Got it, your right it doesn't have that function, so of course it would fail. So technically, if I just want to launch another widget, from widget "A" I just need this code:
var id:Number = ViewerContainer.getInstance().widgetManager.getWidgetId("Widget B");
var bWidget:IBaseWidget = ViewerContainer.getInstance().widgetManager.getWidget(id, true) as IBaseWidget;
Then if I want to pass values between the two I just need the following in Widget A:
var msArr:ArrayCollection = new ArrayCollection();
//Add an object or for example a string to the ArrayCollection
msArr.addItem("Text to pass to Widget B");
addSharedData("MiniSearch_Search", msArr);
And then I can drop this code from Widget A, since I'm not calling a function:
if (bWidget){
var vSW:* = bWidget;
vSW.queryFromURL("aaa",2,0);
}
If I'm wrong feel free to set me straight. Thanks yet again!
... View more
09-14-2011
12:45 PM
|
0
|
0
|
1861
|
|
POST
|
Robert per the document I implemented the code as follows to open up a widget
var id:Number = ViewerContainer.getInstance().widgetManager.getWidgetId(incidentCreateWidget);
var bWidget:IBaseWidget = ViewerContainer.getInstance().widgetManager.getWidget(id, true) as IBaseWidget;
if (bWidget){
var vSW:* = bWidget;
vSW.queryFromURL("aaa",2,0);
}
In the above "incidentCreateWidget" is a string variable that is set from the xml for the widget. It works great the first time the code is run (I'm running it from a button click event), however on the second time it throws the following error: ReferenceError: Error #1069: Property queryFromURL not found on widgets.FrEditIncident.FrEditIncidentWidget and there is no default value. Where "FrEditIncidentWidget" is the widget being called from the first one, where the code resides. Any ideas? Frank
... View more
09-14-2011
10:24 AM
|
0
|
0
|
1861
|
|
POST
|
Along the same line, is there any way to not have the widget not preload? On load of the viewer I don�??t want the widget to load up and I don�??t want to see it in the menu. I do want to call it from other widgets on demand and then have it appear. Seems like I�??m close by putting it in the UI Elements section, but I�??m missing some way to not have it load. Would be nice if there was a setting called preload = �??no�?� or preload = �??false�?�, but that doesn�??t seem to be there. Any ideas?
... View more
09-14-2011
08:41 AM
|
0
|
0
|
1008
|
|
POST
|
Thanks Robert! I appreciate the time you put into putting this document together for all of us. It will be a great reference! Frank
... View more
09-12-2011
08:32 AM
|
0
|
0
|
1861
|
|
POST
|
Thought I would tack on a question to this thread. I have popup.xml configured to show a variety of fields from a layer in FlexViewer 2.3. Some of these fields are coded domains. On all the fields but one this works just great. However on one field for some reason the popup gives the code value (e.g. "1") instead of the description of the domain. I've reviewed the information in the mxd that is being published and the text value comes up when I do an identify in ArcMap, so it looks right there. I've then reviewed the rest end point and it list the coded domain and the text values, just like the other coded domains in the dataset that work well with the popup.xml. So there seems to be no difference there. I have also added the feature layer to ArcGIS.com map and the domain all appear correctly there. So that leads me to believe the the service is rendering the information correctly. To add a twist to this, it appears that at some locations the value appears correctly in the popup in the Flexviewer and at others it displays the code. I have provided examples below, if this isn't very clear. Any idears?
... View more
09-08-2011
10:05 AM
|
0
|
0
|
1179
|
|
POST
|
I thought I would tack a little more info onto this thread, since I was having similar issues. Per my emails ESRI yesterday, apparently in in ArcGIS Mobile you cannot view attachments created by right clicking on a feature class, clicking "Attachments" and then clicking set and then saying "Create attachments" (via AC), in Version 10. (Side note: this is the only way to create attachments that are viewable in the FlexViewer) However, in version 10.1 these sort of attachments will be view-able using ArcGIS Mobile. In 10.1 I am told to do this you will need to: 1. Create GlobalID for your feature class in the database 2. Enable attachment for the feature layer 3. Create GlobalID for attachment feature class (Not the relationship class but the attachment class that�??s associated with the feature class) Hope this helps someone else,
... View more
09-08-2011
06:48 AM
|
0
|
0
|
988
|
|
POST
|
Kind of talking to myself here, but in case this will help someone else out. There is an issue with IE and client side caching, it can be overcome! In my case I was doing a query to fill a datagrid. So in this case I needed add setting to the querytask: "queryTask.disableClientCaching = true;" The same setting is available to the featurelayer, if that is something you need to be refreshed in IE: "editFeatureLayer.disableClientCaching = true;" Hope this helps someone!
... View more
08-19-2011
08:31 AM
|
0
|
0
|
259
|
|
POST
|
I have been working on an editing widget for the Flex Viewer2.3. I�??m using the sample called �??Edit without Editor�?� from the API samples as the template. The new widget seems to work great I can add polygons to a feature, and they appear (graphically) just fine in both IE andFirefox. I have another part of the applicationthat when you click on a accordion window it then goes out and does a query of the feature and populatesa datagrid with a list of records. This works fine with Firefox, however when the datagrid is populated in IE (Version 9.0) the new record doesn't show up. I can then fire up the map in Firefox and the new records show up in the datagrid, so I know they are being created ok. Does anyone know if this is some sort of a bug? I found this on the forum with the Javascript API: http://forums.arcgis.com/threads/9086-Feature-Layer-Refresh-not-working-in-IE?highlight=refresh+featurelayer+map
... View more
08-18-2011
06:50 AM
|
0
|
1
|
2024
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 03-05-2015 11:29 AM | |
| 1 | 09-04-2015 07:40 AM | |
| 1 | 02-08-2016 10:36 AM | |
| 2 | 12-22-2012 07:34 PM | |
| 3 | 02-17-2016 09:01 AM |
| Online Status |
Offline
|
| Date Last Visited |
10-21-2022
08:23 PM
|