POST
|
Would ListDatasets help you out? In 1 script where I need to access feature classes inside feature datasets, I loop through the feature datasets and then I loop through the feature classes inside the feature dataset that has the current focus. I'm not sure, do you have a sample of the looping through the fds and the the fc? Although I believe that the fc would be doing the for lyr in lyrList portion that I have already started. Thanks,
... View more
09-10-2013
11:44 AM
|
0
|
0
|
1176
|
POST
|
So, Has anyone figured out how to get the Feature Dataset name using Python when your data is residing in FeatureDatasets within the database? I see that the layer.datasetName is really the feature class name. Unfortunately, we have several feature classes within feature datasets for network and topology purposes and now that we are changing servers, I need to have a script that will change the source data. Alas, as of right now, I can't do it via script unless someone has a work around out there. I've been banging my head against the wall for a week now, because like some others, when a term 'dataset' is used, you would expect it to be related to the same things that it is elsewhere. I'd seriously consider an attempt to parse the name out, but we have several different former datasources referenced (even after changing them in the mxd - thanks for hardcoding ESRI) and the feature dataset names are many different lengths. Thanks if anyone has a workaround to help with this.
... View more
09-10-2013
08:39 AM
|
0
|
11
|
2578
|
POST
|
Hi All, Like many before me (and yes, I have perused the forums looking for pointers) I am having to change servers for one of the several SDE databases. I would like to have a script that can be run either from python or as a GP script in ArcCatalog. We have several mxd's that are in the same folder (as well as several folders with individual mxds) that need to be updated. I have grabbed code from several others that have done the same thing and attempted to get the end result as desired to no avail. I'm getting the saved second copy of the mxd in another directory and a partial output file telling me what it is doing (or not doing). The output file lists the mxd, the full path, and dataframe. I'd like to get the layers listed if they are part of the changing database and then have the datasource changed for each of those layers. We are only changing the server location of the database, the name and structure is remaining the same. I will be creating a sde connection file to pass to everyone (we use AD groups with windows login) to be placed in the ArcCatalog directory in the appdata directory for each user. I've tried several things, but it appears that it isn't getting past the layer list right now - yet, this was working when I had it just reporting back to me the listings. I'm also aware of the 'feature' where using ArcCatalog to change the data source in the mxd doesn't work as advertised. When I run this script, the only info returned besides the incomplete listing of data is, "returned exit code 0". Running ArcDesktop 10.0 SP2, SDE 9.3.1, Python 2.6 Thanks for any insight that can be offered. And I realize that it could be a simple typo or misplaced quote or something, but I just don't see it.
... View more
09-06-2013
01:27 PM
|
0
|
0
|
2074
|
POST
|
Hi All, I've been using FME to extract the start x, y; mid x, y; and end x, y from our street centerlines for another user. We've decided that rather than having this data move through multiple formats that we would like to attempt to do a view in the geodatabase that could then be used by other users. I have created a MV view of our street centerlines and the nodes (intersection points) that accomodates the delta tables with the business table. The intersection points (nodes) are real easy to get the x, y coordinate. Just used the MV view and the f table to get the eminx and eminy - as a point they are rather self evident as to what to use. This will also be used for another point table. Now.... I need to get the start point, mid point and end points for the centerlines. These could have 2 points or many points. In FME, there is a command to get the coordinates and it uses the index of the number of points, i.e. 0 for start, -1 for the end and then use mod of the number of points for the ones over 2, otherwise, simple math for the 2 point centerlines. How do you locate the coordinate list for vertices in SDE? I was thinking that it was in the s table, but not seeing that since even if there are mulitple sp_fid's the numbers are the same in the other columns. Thanks for any help! Thanks,
... View more
07-31-2013
10:22 AM
|
0
|
0
|
1790
|
POST
|
Hi All, I find myself needing to create child replicas of data that is edited inside the security of our firewall to a server that is outside our firewall. I remember reading about how to do that in 9.3, but cannot find the documentation anywhere right now. Our security guys want to know the ins and outs of doing the connection and I want to refresh my memory on how to do it as we will be doing another server very soon after this one. Thanks for pointing me in the right direction. J~
... View more
12-20-2011
09:16 AM
|
0
|
0
|
1034
|
POST
|
Well, SP2 and SP3 make no difference at all. Rats. So does anyone know if there is a pre-fetch setting hiding somewhere in ESRI? Maybe in one of the 'hidden' exe's that are buried in the program directory? I know there was one that controlled something like this in the mdb's in 9.1 or 9.2 - can't remember exactly which now.
... View more
11-10-2011
10:42 AM
|
0
|
0
|
542
|
POST
|
This happens to me with SDE (Arc10) on SQL Server 2008 about once a week. The table will only show 2048 records. If I close my ArcMap session and re-open then the table is fine. I've repeatedly searched these forums for someone else experiencing this problem so I kind of got excited when I saw this thread. I have had it happen with XY Events and Joins and it is never reproducible b/c a simple ArcMap close fixes the problem. Unfortunately, a reboot of machine and restart of ArcMap didn't solve this one. Guess I need to try Support, although maybe first check the dev machine that has SP2 on it and then one that has SP3 on it. We don't just install SP's cause they are available, we make sure that they don't break something that wasn't broken before (been there, done that).
... View more
11-10-2011
02:51 AM
|
0
|
0
|
542
|
POST
|
Wonder if it is more of an Oracle issue. I have a view created in SQL Server that has 108K rows in it that all show in the attribute table when the end of table arrow is pressed. This is also an x,y event layer. In the Oracle view, there are only 1714 rows where the x or y is null (and is expected). So the attribute table is still not showing 20K +/- rows.
... View more
11-09-2011
10:27 AM
|
0
|
0
|
542
|
POST
|
Yes, you are right the 2048 is the default value for the number of rows that ESRI returns at first so as not to overwhelm you when you have a half a million rows in a table like I do in some other tables. I have pressed the end of the table arrow and only get the 2048 - I want to know where the rest of the 20K are. Thanks
... View more
11-09-2011
09:24 AM
|
0
|
0
|
542
|
POST
|
Hi All, Has anyone else run into this? I have a view in Oracle that I am using for an x,y event layer in ArcMap (and by way of publishing, a mapping service). I have over 21K rows in the view when I query in Oracle. When I open the layer file in ArcMap, I SEE all of the points (at least the ones that have valid x y coords - there are a few nulls), but when I open the attribute table there are only 2048 in the list. Yet, I can go to one that is not showing in the attribute list and do an info tool and get the data. What kind of quirkiness is this? ETA: Win7 x64, Arc10 SP1, Oracle 10g, our server for SDE is SQL Server 2008 Thanks.
... View more
11-09-2011
09:13 AM
|
0
|
10
|
1185
|
POST
|
Hi, Is there a way of formating text that is in an AddMessage statement? I'd like to change the color and whether it is bold or not so that the message jumps out to my users on the geoprocessing window. Thanks, Jazmateta
... View more
08-23-2011
06:13 AM
|
0
|
1
|
3949
|
POST
|
Have one part of the script working, had to separate into two pieces though. As simple of a process that I am attempting write, it is a shame that it has to be separated. Anyway, over on the Python forum, they gave me help with getting a row count for the ungeocoded features, again it worked fine in the python window, but add it to a script and it fails! This is getting old! I have tried to run the script that was created using the wizard from Catalog opened thru ArcMap and as a tool in a toolbar in ArcMap - same errors both ways. These are the error messages: <class 'arcgisscripting.ExecuteError'>: ERROR 000622: Failed to execute (Make Feature Layer). Parameters are not valid. ERROR 000628: Cannot set input into parameter in_features. Failed to execute (ProcessCAUFile) Yet when I copy and paste each line from the script into the python window - NO errors. I've attached a copy of the script.
... View more
08-11-2011
07:38 AM
|
0
|
0
|
361
|
POST
|
Tried that, it worked great in the python window. Added to the script that will be a tool in ArcMap and it failed. Running script ProcessCAUFile... <class 'arcgisscripting.ExecuteError'>: ERROR 000622: Failed to execute (Make Feature Layer). Parameters are not valid. ERROR 000628: Cannot set input into parameter in_features. Failed to execute (ProcessCAUFile). The ultimate goal is to produce a tool for the toolbar in ArcMap. I keep getting where the python scripting works fine in the python window and then fails in the script. I am using the create tool wizard, have it run python script in process. The reason that I am looking for a number output from the selection query is to see if all features geocoded. If the number of rows is greater than 0, then the user needs to run the rematch/review tool, otherwise it tells them that all geocoded and they can proceed to the next step - another tool on the toolbar that copies the geocoded data for archiving and appends it to a yearly file for mapping - this one actually works.
... View more
08-10-2011
10:36 AM
|
0
|
0
|
1093
|
POST
|
Writing a python script and attempting to use the SelectLayerByAttribute_management command. I've tried it several different ways and keep getting a syntax error on the variable set, or if the variable set works, get invalid expression. I am querying against a file geodatabase. python snippet: where_clause = (r"Status = 'U'") arcpy.SelectLayerByAttribute_management("Crimes", "NEW_SELECTION", where_clause) I'd like to add .outputCount to this to see if there are any rows selected. I have done this once in the python window but can't remember how I did it now and didn't put it in my script when it worked. I've also tried various ways of putting quotes and single quotes with and without the r or the parenthesis. Syntax error or it doesn't get passed properly to the query and gives the Invalid expression. Help! Forgot to add: In the ArcMap window using the Select by Attributes dialog, the proper syntax is "Status" = 'U' and it works as expected. Just can't get the translation to python to work properly.
... View more
08-10-2011
09:13 AM
|
0
|
19
|
6736
|
POST
|
Yes, 'run in process' is selected. Tried the "Current" and it didn't seem to make a difference. Jazmateta
... View more
08-08-2011
07:35 AM
|
0
|
0
|
1413
|
Title | Kudos | Posted |
---|---|---|
1 | 03-29-2023 01:39 PM | |
1 | 09-28-2021 08:55 AM | |
5 | 11-22-2023 07:46 AM | |
1 | 10-10-2023 02:21 PM | |
1 | 08-18-2023 01:47 PM |
Online Status |
Offline
|
Date Last Visited |
01-12-2024
09:28 PM
|