POST
|
I have some grunt tasks that run to create the widgets, and what is missing is adding it into the application. I was hoping to just add another task that reads the json, prompts the Developer for position of the widget, and updates and saves out the file. I have been tasked to work out a dev workflow. We would like to keep the builder out of the flow as much as possible.
... View more
04-25-2017
08:42 AM
|
0
|
3
|
2003
|
POST
|
Is there anybody out there with tips or samples for updating WAB config.json file? More specifically adding a widget through Javascript. I am trying to read in the json, find where i need to add, and update the json file. I know how to just open and manually adding the widget. Robert Scheitlin, GISP ---hoping you have some tips. DevelopersWeb AppBuilder Custom Widgets
... View more
04-25-2017
08:21 AM
|
0
|
9
|
4365
|
POST
|
Hi John, the preferred is no the da.SearchCursor, but that is probably not the issue. Can you add a bit more information for us to look at. SearchCursor (dataset, {where_clause}, {spatial_reference}, {fields}, {sort_fields}) Can you provide the dataset parameter: fieldsLry came from where, and did you provide yourself access to the objects.datasource attribute? Also, when you have parameters that are not being filled out, just helpful to place "" for empty. Just a practice I do, just to make sure. Particularly with the old SearchCursor.
... View more
08-14-2014
07:16 AM
|
0
|
0
|
734
|
POST
|
How come your using this OO formatted python script? Seems like a few added steps, for what may seem to cut time.
... View more
08-07-2014
11:42 AM
|
0
|
1
|
1090
|
POST
|
You are correct, but I have raster datasets inside another GDB that i am using to test with. What are you setting for your env? I feel like your env, is not set to a GDB.
... View more
08-07-2014
10:32 AM
|
0
|
0
|
1135
|
POST
|
can you also copy in the config.xml here. When you see the the actual tool/button/* it can be a combination of things, but more than likely an issue with the config build not matching up with the python. I would just like to look over them both and make connections.
... View more
08-07-2014
09:02 AM
|
0
|
1
|
1505
|
POST
|
This is not helpful to the problem, but just curious why the choice for a python toolbox. I just haven't found a reason to do this yet. I am currently looking into your problem though.
... View more
08-07-2014
07:13 AM
|
0
|
3
|
778
|
POST
|
Hi Ryan, Just looking over the Bulk of the scipt and have questions:
arcpy.env.workspace = "SET TO A GDB"
You have your environment set to a GDB. raster_list = arcpy.ListRasters() Listing Rasters from the environment. I don't think you going to get a list of Rasters, they are stored in Raster Datasets within a GDB. When i Print the list it is NONE. The environment should be set to a folder where the Rasters are stored. def create_cost_paths(**ARGUMENTS**): Your create_cost_paths() function has no Arguments() So when you set variables referenced to "route_one_cost" (RASTER) it doesn't reference anything. It doesn't find anything. This is because you carry nothing into in the function from the environment or list from the environment. You can fix this be either taking your arcpy.env.workspace and moving it into the function, or you can add the LIST from the environment as argument for the function that uses it.
... View more
08-07-2014
06:16 AM
|
0
|
0
|
1135
|
POST
|
You have setup to capture any error. That is good. So what are you seeing. Is the Add-in Installed, but just broken, showing no buttons or tools?\ Just to make sure, save a document with the Python window open. Then reinstall the addin - open the MXD and look at what the error says in the python window. Just a thought, not a solution to the problem.
... View more
08-06-2014
10:30 AM
|
0
|
2
|
1505
|
POST
|
Hi Matthew, The two mentioned modules are excellent, and I use them when needed to traverse excel and making edits or new sheets. The deeper you want to manage your excel assets will make it more cumbersome; i.e. a new MODULE. For what you want to accomplish you are going to need to access the application, or atleast that is what I have done in the past. Python for Windows extensions - Browse Files at SourceForge.net import win32com.client
xl = win32com.client.DispatchEx("Excel.Application")
You will need to access Excel so you can so you can refresh your connections. wb = xl.workbooks.open("***YOUR EXCEL FILE LOCATION***")
xl.Visible = True
Next call the refresh all() wb.RefreshAll() Next of course save. wb.Close(savechanges=1)
xl.Quit()
In addition to save and close. If you need to run a macro, but you shouldn't need to for refreshing. xl.run('**MACROFILE LOCATION*** !macro')
... View more
08-05-2014
11:58 AM
|
1
|
4
|
13240
|
POST
|
Hi MC5, I think it is best to keep the self.editable = true I have placed the part where my items list is populated within the onFocus function. def onFocus:(self, focused):
self.items = []
**** THE PART THE POPULATES THE LIST ****
self.items.append(**VALUE**)
The onSelChange fuction: def onSelChange(self, selection)
self.refresh()
X = selection This function is used to do something with the selection that is made, setting the selection parameter to a variable. I believe the reason why you are not getting anything in the box is because of the editable attribute being false. You may be better served to look into putting an item in the List just as a starter. "Please Pick From the Dropdown." Then when the onFocus is triggered it would empty the list items, and populate with new items that you want.
... View more
08-05-2014
08:41 AM
|
0
|
0
|
638
|
POST
|
Hi Johannes, One check: Go over the spelling, location, special characters.... Just make sure it is all correct. Second: Feature Class to Shapefile there are some limitations that are present for shapefiles: (taken from ArcGis resources) Shapefiles have many limitations compared to feature classes in a geodatabase. For example, shapefile attributes cannot store null values, they round up numbers, they have poor support for Unicode character strings, they do not allow field names longer than 10 characters, and they cannot store both a date and time in a field. Additionally, they do not support capabilities found in geodatabases such as domains and subtypes. Third: The Error is telling me OUTPUT FOLDER, but the print out is a path for a shapefile. This is not a folder. So if the output needs to be a folder location, not a shapefile. The Tool is looking for a folder to output the shapefile, not a shapefile that already exists. Just a few things, but lets explore this more if you want.
... View more
08-05-2014
06:38 AM
|
0
|
0
|
813
|
Title | Kudos | Posted |
---|---|---|
1 | 10-11-2018 04:31 PM | |
1 | 05-13-2019 07:01 AM | |
1 | 08-05-2014 11:58 AM | |
1 | 07-14-2014 01:51 PM |
Online Status |
Offline
|
Date Last Visited |
12-06-2020
01:34 AM
|