DOC
|
This is a great sidekick tool, useful in any AGS development scenario. Installed on my development machine since the early stages of development. Must have for us GIS folks.
... View more
01-12-2016
08:47 AM
|
1
|
0
|
374
|
POST
|
You can also create the object like this: <fx:Object myCustomTextElement="{customcontent}"/> Thanks for the suggestion. Unfortunately, that did not work for me - no errors thrown, but the custom text element displayed the default value defined in the template mxd. For some reason the object binding just won't work from the markup. I have to force-feed the value during component initialization. FB 4, all updates installed.
... View more
08-17-2012
09:43 AM
|
0
|
0
|
690
|
POST
|
I made this work directly from the markup, with a bit of ActionScript thrown in the mix. Assuming that the custom template contains a text element named "myCustomTextElement" and the template has been registered with AGS:
[Bindable] private var customcontent:String ='This is line one.\nThis is line two.';
[Bindable] private var customTextElems:Object;
private function init():void{
customTextElems = new Object;
customTextElems.myCustomTextElement = customcontent;
this.printParameters.layoutOptions.customTextElements = customTextElems;
printTask.getServiceInfo();
}
<esri:PrintParameters id="printParameters"
format="PDF"
layoutTemplate="MyCustomTemplate"
<esri:layoutOptions>
<esri:LayoutOptions author="Author: ArcGIS for Flex Team"
copyright="Copyright: © ArcGIS for Server"
title="My Map">
</esri:LayoutOptions>
</esri:layoutOptions>
</esri:PrintParameters>
For the record, I tried to implement everything in the markup but the Flex compiler did not allow me to bind a fx:String element. This is strange, as Adobe documentation has an example for string binding. Anyway, if the fx:String value is hard-coded, then the code works. <esri:PrintParameters id="printParameters"
format="PDF"
layoutTemplate="MyCustomTemplate"
map="{map}" >
<esri:layoutOptions>[INDENT]<esri:LayoutOptions author="Author: ArcGIS for Flex Team"
[/INDENT]
[INDENT] copyright="Copyright: © ArcGIS for Server"
[/INDENT]
[INDENT] title="My Map">
[/INDENT]
[INDENT=2]<esri:customTextElements>
[/INDENT]
[INDENT=3]<fx:Object>
[/INDENT]
[INDENT=4]<fx:myCustomTextElement>
[/INDENT]
[INDENT=5]<fx:String id="actualText">{customcontent}</fx:String> (error raised �??Data binding expression not allowed here�?�)
[/INDENT]
[INDENT=4]</fx:myCustomTextElement>
[/INDENT]
[INDENT=3]</fx:Object>
[/INDENT]
[INDENT=2]</esri:customTextElements>
[/INDENT]
[INDENT]</esri:LayoutOptions>
[/INDENT]
</esri:layoutOptions>
</esri:PrintParameters>
... View more
08-17-2012
09:09 AM
|
0
|
0
|
690
|
POST
|
Here's a free ESRI tutorial: http://training.esri.com/gateway/index.cfm?fa=catalog.webCourseDetail&CourseID=1868 A paid one: http://training.esri.com/gateway/index.cfm?fa=catalog.courseDetail&CourseID=50121644_10.x Check out also the DevSummit proceedings: http://proceedings.esri.com/library/userconf/devsummit11/index.html http://proceedings.esri.com/library/userconf/devsummit10/tech.html Tons of other Python tutorials online. I usually search with Google and then select on the left pane More search tools/last year. Python connects to Oracle through cx_Oracle - this works just fine. Interfaces - wxPython or TkInter Regards, Valentina Boycheva
... View more
11-03-2011
06:33 AM
|
0
|
0
|
361
|
POST
|
Glad the 1st part worked out. You probably have a button that executes the macro. What you need is a form, displaying the combobox and two buttons - one to retrieve the selected feature, store it in memory, run the Oracle query and populate the combobox, and another one to update the field with the selected row. So, open Visual Basic Editor, then create a form (Insert/UserForm). Then select View/Toolbox, if its window is not visible. You can bring more controls through Tools/Additional Controls. The form itself is called through a UIButtonControl. Another way to go is create a custom toolbar and add to it UIButtonControls and UIComboboxControl. Just as a side note - ArcMap 10 is the last version to support VBA. Once you get comfortable with ArcObjects and rapid development in VBA, it's better to move on to the NET languages and/or Python. http://blogs.esri.com/dev/blogs/arcgis/archive/2011/09/30/update-to-arcgis-10-and-10.1-deprecation-plan.aspx Good luck! Valentina Boycheva
... View more
11-03-2011
06:08 AM
|
0
|
0
|
361
|
POST
|
To your first question: Get the feature's class and cast it to a dataset. Then compare the dataset's name/fullname with the featurelayer's name. Dim pDS As IDataset
Set pDS = pFeat.Class
If pDS.Name = "..." 'your code
To your second question: Create an OID array of all features that belong to the Service Location layer. Then, when the user selects one particular feature, get the feature with IFeatureLayer.FeatureClass.GetFeature(OID) and then update the values. And finally, if you do bulk updates and want to speed up the processing, instead of retrieving the index inside the loop like this: pfeat.Value(pfeat.Fields.FindField("STATUS")) = SlStat get all indexes outside the loop: idxStat = pfeat.Fields.FindField("STATUS")
etc... Then inside the loop: pfeat.Value(idxStat) = SlStat Cheers, Valentina Boycheva
... View more
11-02-2011
01:42 PM
|
0
|
0
|
361
|
POST
|
I haven't used the DEM tools in version 10 yet, so these are general considerations. Did you try inserting print statements after each critical step? At least you will figure out what exactly causes the crash. You mentioned renaming - I would use very short dataset names (starting with a letter), no slashes/underscores and other fancy symbols, location for FGDB and PGDB - just one level below root (C:\, D:\, etc), no UNC paths. Also try with a smaller subset - could be a matter of size (know this from my own bitter experience). Regards, Valentina Boycheva
... View more
11-02-2011
01:23 PM
|
0
|
0
|
418
|
POST
|
Thank you, Robert! The type annotation (star type) helped, indeed. The code wrapping feature had jumbled a bit your snippet. I am including it again for anyone interested. var id:Number = ViewerContainer.getInstance().widgetManager.getWidgetId(widgetLabel); //correct
var bWidget2:IBaseWidget;
bWidget2 = ViewerContainer.getInstance().widgetManager.getWidget(id,false);//returns LayerListParcelsWidget
var vLLW2:* = bWidget2;
//Call some var or public function on the widget
//of course you will not have code completion for it though.
vLLW2.someVarriable or public function
There is another wrinkle, though: unless LayerListParcelsWidget is preloaded as open or at least minimized, bWidget2 will always be null. Which, of course, is not at all what I want. In the meanwhile, I realized that my solution architecture can be optimized. So, instead of 3 widgets, I have one widget with a ViewStack. This worked just fine and I avoided widget communication. One thing to remember with ViewStacks: to have all views loaded at completion time, include <creationPolicy="all">. As for the original question - I wonder whether the casting will be possible between inherited components; that is if the new widget is not an exact copy but rather an extension of the original. No time to test now - just a note to myself. Thanks again! Valentina Boycheva
... View more
11-02-2011
07:53 AM
|
0
|
0
|
283
|
POST
|
Here's the scenario: I have created 3 new widgets, all identical copies of the LayerListWidget component, except for the widget label. At some point I want to execute a public function on those 3 widgets; its definition remains the same. Even after following Robert Scheitlin's advice from this old thread and forcing the same application domain on all widgets ( ESRI recommendation), I am still unable to cast an instance of the new widget to the generic LayerListWidget (the original LayerListWidget is loaded as a module.) var id:Number = ViewerContainer.getInstance().widgetManager.getWidgetId(widgetLabel); //correct
var bWidget2:IBaseWidget;
bWidget2 = ViewerContainer.getInstance().widgetManager.getWidget(id,false);//returns LayerListParcelsWidget
var vLLW2:LayerListWidget = bWidget2 as LayerListWidget;//returns null The application domain is defined in WidgetManager.mxml as: wgtInfo.load(ApplicationDomain.currentDomain, null, null, moduleFactory); Compiler arguments: -locale en_US -source-path=locale/{locale} -keep-all-type-selectors=true FlexViewer 2.4 (July 2011), Flex 4.1, ArcMap 10.0, SP1 It looks like casting is not possible between identical component copies. Is there another way to do the casting? Thanks, Valentina Boycheva
... View more
10-31-2011
12:08 PM
|
0
|
2
|
468
|
POST
|
From a regular non-spatial webservice, I would bring read the results as XMLList, then traverse it and build an arraycollection of the data series, which will be made a dataprovider for the graph. If you are reading results from map service, then you have to summarize the table by station and again build an arraycollection. The station names can be kept in a dictionary. This example shows how to aggregate two data series into one array (mySeries) and feed it to the chart and legend. http://livedocs.adobe.com/flex/3/html/help.html?content=charts_intro_7.html Hope this helps.
... View more
01-06-2011
09:48 AM
|
0
|
0
|
157
|
POST
|
Same error message for me. Finally made it work as follows in the command window: CalculateField SouthPoles junk x PYTHON "x = 'SouthPoles'" SouthPoles is the name of the feature class, junk is the field, x is the variable and the last expression is the code where the variable x is being assigned a string value, in this case the feature class name. ================================ In the Python script the syntax is: (fc is the feature class) fcname = str(fc) gp.CalculateField(fc, newField, "fcname", "PYTHON", "#") Note how the parameter fcname is surrounded by quotes - otherwise it won't calculate. ArcMap 9.3, Python 2.5.1
... View more
08-10-2010
08:20 AM
|
0
|
0
|
314
|
Title | Kudos | Posted |
---|---|---|
1 | 01-12-2016 08:47 AM | |
1 | 08-06-2015 04:01 PM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|