|
POST
|
Just an idea (without seeing the whole code) but with the cursor have you set SubFields property and not included "RIP_CYCLE" by mistake?
... View more
03-13-2012
08:41 AM
|
0
|
0
|
2602
|
|
POST
|
Michael, I'm just throwing some ideas around as I'm not so good with Python. I've never used that .join method before so I had to look at the online help. The format they give is: string.join(list,separator) you have f.write('\n'.join(output)) maybe the following will work instead? string.join(output,'\n') Your error log says it found 4650229 rows, thats quite a lot of data! Maybe there is some sort of limit on doing a write to a text file with the method you are using? You could try stepping through the list and writing out each item one at a time? If none of these work it maybe a dreaded geoprocessor memory leak? I find I cannot run python scripts more that a few hundred times when calling Spatial Analyst tools, it just bombs out. Duncan
... View more
03-09-2012
07:41 AM
|
0
|
0
|
727
|
|
POST
|
Cécile, Have you tried to recompile your VBA project? Go into VBA editor and click on the menu option Debug > Compile Project. If it bombs out at the same line I recon you have some sort of namespace conflict. In this case prefix it with the object library as shown below MsgBox esriArcMap.Application.Templates.Item(esriArcMap.Application.Templates.Count - 1) Duncan
... View more
03-09-2012
06:55 AM
|
0
|
0
|
816
|
|
POST
|
Graeme, Just thinking off the top of my head here (also assuming you are using ArcGIS 10). Why don't you create a model and then use a get count tool to feed into the calculate value tool to do an if/then statement the output being a boolean. This could act as a precondition to the copy features tool? Duncan
... View more
02-26-2012
10:45 AM
|
0
|
0
|
1549
|
|
POST
|
Kimo, It looks like I am going to have to apologies here. What I said is correct for ArcGIS 9.3 but ESRI has disappointingly removed this functionality from ArcGIS 10. I was not aware that they had killed this off until I just tried it. It's discussed here and it seems to be something to do with a limited version of VBA. So unless you can figure out how to access arcobjects from python (here is a presentation that discusses this, you may have seen it already) you'll need to get to grips with ArcObjects in VB or c#. It's a real shame that ESRI have removed this ability. From my developers point of view about the only thing ESRI have done good with the release of version 10 is the ESRIAddIn, this makes deploying buttons and toolbars developed in .Net a whole lot easier. So sorry for getting your hopes up, thats "progress" for you... Duncan
... View more
02-22-2012
12:26 AM
|
0
|
0
|
6115
|
|
POST
|
Claire, Instead of writing a Python script, why not use model builder? You could have a feature iterator that spews out a polygon one for each row (or even grouped by a case field) and this simply feeds into a clip raster tool as the clipping polygon? Duncan
... View more
02-21-2012
12:40 AM
|
0
|
0
|
1075
|
|
POST
|
I just want to compliment Richards answer. When a python script is run from within ArcGIS as a scripting tool it's possible to call arcobjects within the calculate field tool. I've used this approach sometimes when I wanted to access the fine grade geometry tools that ArcObjects has. The QueryPointAndDistance method on IPolyline is certainly a very useful bit of wizardry I use it regularly!
... View more
02-21-2012
12:35 AM
|
0
|
0
|
6115
|
|
POST
|
Hi, I tried this code (note I do not set a workspace) and it copied the featuredataset and the featureclasses within it without error.
import arcpy
i = r'C:\Scratch\fGDB_Scratch.gdb\test'
o = r'C:\Scratch\fGDB_AIS_Cleaned.gdb\test'
arcpy.Copy_management(i,o,"FeatureDataset")
Duncan
... View more
02-21-2012
12:07 AM
|
0
|
0
|
770
|
|
POST
|
Just an idea but have you tried to link to the database using ArcCatalog? This will at least prove that you can connect to it (so not some weird permission issue) and you'll be able to see the properties of the connection so you can ensure you have a correct connection string? Well thats what I would do first...
... View more
02-20-2012
06:43 AM
|
0
|
0
|
1052
|
|
POST
|
You can do this in one of 2 ways, create a geoprocessor object and call the spatial analyst CON tool. If you want to stay within the arcobject environment then you need to be using the IConditionalOp Interface and do a conditional operation (if nodata set to zero else use existing cell value). Duncan
... View more
02-20-2012
06:21 AM
|
0
|
0
|
554
|
|
POST
|
Mustafa, Are you using ESRI software? If so why not simply use the geoprocessor and call the Project tool? If you don't want or can't use ESRI software then you could try to use something like OGR in GDAL which is open source? Duncan
... View more
02-10-2012
08:14 AM
|
0
|
0
|
596
|
|
POST
|
Halil, Looking at your sample code I believe the sample you have found is specific to MS Access. If you want to open a website using VBA in ArcMap 9.3 use this code instead: Dim iE As Object Set iE = CreateObject("InternetExplorer.Application") iE.navigate "www.rivex.co.uk" iE.Visible = True Duncan
... View more
02-10-2012
08:06 AM
|
0
|
0
|
782
|
|
POST
|
To future proof your tool and as you know vba I would start using vb. Net. You will need visual studio 2010. In version 10 they have introduced addins which are much easier to distribute.
... View more
02-02-2012
09:47 AM
|
0
|
0
|
1273
|
|
POST
|
Mesut, I am having similar problems getting old 9.3 VBA projects up and running in 10. I too was getting unexplained compile problems on seemingly innocent lines of code. This is what I did: Save a copy as a version 10 mxd and work from that go into vba editor menu > references and untick all esri references. recompile vba project and save. In 9.3 recompiling would have caused arcmap to say don't know IMap etc and one would add back the appropriate object library but in 10 it seemed to know and add them back, may happen for you? recompile and if it objects to a line go to it. I found for example it did not like my reference to IStatusbar so I had to re-write the line to include the library so I was retyping dim pSB as esriSystem.IStatusbar. Recompile and correct any other lines. So no code needed altering other than declaration lines. All very odd! Duncan
... View more
02-02-2012
05:37 AM
|
0
|
0
|
1273
|
|
POST
|
Gavin, I must apologies I had made a mistake. I can replicate your issue such that you get 2 AXF files not one when one layer is checked out and the other is a read only layer. So I can't back track fast enough! 😮 Yeah looks like you cannot achieve what you were looking for just 1 AXF file. But in my experience the more you jam into it the less stable it becomes and the device crashes more often. I do what you are planning to, I have a layer checked out that I'm populating and everything else is read only shapefiles. Duncan
... View more
02-01-2012
12:02 AM
|
0
|
0
|
1205
|
| Title | Kudos | Posted |
|---|---|---|
| 3 | Monday | |
| 1 | 02-15-2023 05:45 AM | |
| 1 | 2 weeks ago | |
| 1 | 2 weeks ago | |
| 1 | 04-15-2026 07:35 AM |
| Online Status |
Offline
|
| Date Last Visited |
Monday
|