|
POST
|
Are you trying to update SDE datasources? I ask because I have a script that updates SDE datasources for feature classes, but I am unable to update standalone tables because I cannot access the SDE connection properties for a standalone SDE table. Is this a situation that you are encountering? Currently I just log the location of standalone tables and change them manually after the script has completed. I can justify this because there a very few standalone SDE tables compared to SDE feature classes. I'm hoping that ESRI exposes the connection properties for SDE standalone tables with the release of ArcMap v10.2.
... View more
06-14-2013
08:04 AM
|
0
|
0
|
1067
|
|
POST
|
I have added code to update the datasource of standalone tables that are sourced from an SDE database. The coding is very similar to SDE feature classes, especially when setting the connection properties. The behavior is odd because I can see that the connection properties of the standalone table have been updated immediately after running the Add-In, but the feature class connection properties do not appear to be updated immediately. I need to save the mxd and then close and re-open the mxd in order to see the updated connection properties. Does anyone know why this is occurring? Does anyone know how to get the connection properties of SDE feature classes in mxds to show changes immediately after the Add-In has finished running? Any help or hints are greatly appreciated.
... View more
06-12-2013
05:03 AM
|
0
|
0
|
692
|
|
POST
|
Thank you Neil, but the last line of your suggestion when used with Intellisense does not expose the ConnectionProperties object. Update: Your code did work. I changed Workspace to Workspace2 assuming that Workspace2 was the same but just exposed additional properties. But Workspace2 exposes less properties which include ConnectionProperties. Once I changed it to Workspace I was able to access ConnectionProperties.
... View more
06-11-2013
08:03 AM
|
0
|
0
|
617
|
|
POST
|
To All ArcObjects Developers: I am writing an Add_In to change the properties of a standalone SDE table in ArcMap. I have the following code that I thought would get the connection properties, but it keeps crashing the Add-In. pStndAloneTbl = pTableColl.StandaloneTable(k) 'Instantiate the property set object pPropset = New PropertySet pDataLayer2 = pStndAloneTbl pDatasetName2 = pDataLayer2.DataSourceName pWorkSpaceName2 = pDatasetName2.WorkspaceName pPropset = pWorkSpaceName2.ConnectionProperties The code crashes at pDatasetName2 = pDataLayer2.DataSourceName even though Intellisense tells me that the DataSourceName method is available from the pDataLayer2 object. Can anyone please tell me what I am doing wrong here as it seems to me like this code should work? Any help or hints are greatly appreciated.
... View more
06-11-2013
07:32 AM
|
0
|
2
|
1137
|
|
POST
|
Thank you Ken. The combination of your 2 posts allowed me to trap if the raster layer originated from an SDE database.
... View more
06-07-2013
11:49 AM
|
0
|
0
|
1359
|
|
POST
|
Tamadie: On your scheduled task under the General tab, do you have it set to Run whether user is logged on or not and Run with highest privileges I had issues in the past if I did not have Run with highest privileges set on the scheduled task. Does the service account you are using have Administrator privileges on the server? You probably need this as well.
... View more
06-07-2013
10:21 AM
|
0
|
0
|
2591
|
|
POST
|
Ken: Do you know what objects I need to expose to go from the ILayer object to IWorkspace object?
... View more
06-07-2013
04:35 AM
|
0
|
0
|
1359
|
|
POST
|
Can you post one of your python scripts that is not working in 10.1?
... View more
06-06-2013
10:48 AM
|
0
|
0
|
959
|
|
POST
|
I am now trying to use the following code to determine data source, but it is crashing ArcMap: pDataLayer = pLayer pDatasetName2 = pDataLayer.DataSourceName - Intellisense provides DataSourceName as an member of pDataLayer but this is where the code crashes ArcMap I would then like to use pDatasetName2.Category to determine if the data is "SDE Feature Class" Does anyone know what I am doing wrong here?
... View more
06-06-2013
04:40 AM
|
0
|
0
|
1359
|
|
POST
|
At this point is the task executing, but the actual update to the SDE database is not occurring? Do you have any error checking enabled in your python script to determine what is not working? Can you run the python script through IDLE and see if it updates the SDE database as you would expect, completely separate from the scheduled task?
... View more
06-06-2013
04:12 AM
|
0
|
0
|
2591
|
|
POST
|
To All GIS VB.NET Developers: What object of ILayer (layer in an mxd) can I use to determine if the layer is sourced from an SDE database? In the past if I had a raster layer from SDE I used the RasterLayer.FilePath object which provides the path to where the SDE layer was created. This did not work when I copied a raster SDE layer from one mxd to another. In this case it showed the path to the SDE layer but did not include the .sde connection. Any help or hints are greatly appreciated.
... View more
06-05-2013
11:56 AM
|
0
|
5
|
2444
|
|
POST
|
Can you provide your python script? Are you writing to a file geodatabase on a network drive?
... View more
06-05-2013
05:57 AM
|
0
|
0
|
3490
|
|
POST
|
Tamadie: Go into Windows Explorer and navigate to a python file Right click on the python file and select Properties from the drop-down menu Make sure the General tab then has the focus when you are in Properties Near the top there is Opens with: Notepad.exe Change button - I'm thinking this is what it looks like for you It should say Opens with: python.exe So hit the Change button and select python.exe, hit OK and then hit Apply in the General tab Now when you right click on the python file you should see "Edit with IDLE" as the 2nd item in the drop-down menu (Right now when NotePad is the default application to open you just see "Edit" as the 2nd item in the drop-down menu I hope this helps.
... View more
06-05-2013
05:25 AM
|
0
|
0
|
3490
|
|
POST
|
Tamadie: You might want to check with IT people at your organization to see if this server gets automatic OS updates. If so, you might want to see if there was an update on May 29. If there was, you might want to see if they can revert back to the OS before this update and then see if your scheduled task runs. You could also try running your scheduled task from a bat file that calls the python script.
... View more
06-04-2013
10:20 AM
|
0
|
0
|
3490
|
|
POST
|
Sorry Tamadie as my last post gave you incorrect information Cut the path from Start in and paste it into the Add arguments box then try running your script I usually use bat files to call python scripts, but this should now work.
... View more
06-04-2013
08:29 AM
|
0
|
0
|
3490
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 08-19-2024 10:38 AM | |
| 1 | 4 weeks ago | |
| 1 | 02-23-2026 05:32 PM | |
| 2 | 02-11-2026 10:42 AM | |
| 1 | 12-22-2025 10:08 AM |
| Online Status |
Online
|
| Date Last Visited |
4 hours ago
|