POST
|
Hi, I am trying to derive the minimum and maximum measure for each segment from a PolylineM feature. In the past I used the below VB code from an old colleague in ArcMap 9.3.1 which worked perfectly. I am now trying to do this in Model Builder in 10.1, however, I understand 10.1 does not support VB codes anymore. I am a bit weak on coding so maybe someone can help me rework this code in Python? Or if they know a better way to do this? Thanks! VB Code: Dim pGeometry As IGeometry Dim dMMax As Double Dim pMAware As IMAware Dim pMColl As IMCollection If (Not IsNull([Shape])) Then Set pGeometry = [Shape] If (Not pGeometry.IsEmpty) Then Set pMAware = pGeometry If pMAware.MAware Then Set pMColl = pGeometry dMMax = pMColl.MMax End If End If End If
... View more
08-30-2013
11:32 AM
|
0
|
2
|
2316
|
POST
|
Curt, You're probably going to think I'm crazy but now I need to do this in 10.1. What is the syntax I should be using? Thanks.
... View more
04-15-2013
12:26 PM
|
0
|
0
|
2009
|
POST
|
That worked!! Thank you very much for your help on this!!
... View more
04-03-2013
11:01 AM
|
0
|
0
|
2009
|
POST
|
Curt, I tried using the fully specified path of the table and I got this error: ERROR 000539: Error running expression: CalcDiff(r"C:\Export_Output.dbf", "PIPELENGTH", "DISTANCE") <type 'exceptions.TypeError'>: 'geoprocessing cursor object' object is not iterable Failed to execute (CalculateValue). Any ideas? Thanks.
... View more
04-02-2013
08:28 AM
|
0
|
0
|
2008
|
POST
|
Curt, Thank you for responding! I am very interested in your recommendation of the Calculate Value tool. I tried running the tool using the expression and code you provided, however, I am having some issues. I am getting the following error: ERROR 000539: Error running expression: CalcDiff(r"Export_Output.dbf", "PIPELENGTH", "DISTANCE") <type 'exceptions.RuntimeError'>: ERROR 999999: Error executing function. A locator with this name does not exist. Failed to execute (CalculateValue). Do I need to change anything in the Code Block to reflect my specific data? Does the table need to be in the ArcMAP TOC? My Python skills are similar to my VBA skills.....weak! Thanks for your help on this.
... View more
04-01-2013
10:53 AM
|
0
|
0
|
2008
|
POST
|
Hello, I have a field in my attribute table representing pipe lengths. In an empty field (Distance) I would like to subtract each pipe length from the previous value, thereby calculating the distance. Also, in the field calculator, I need to be able to sort the Pipe_Length field in ascending order before doing the calculation. For example: Pipe_Length.........Distance 0........................0 1615...................1615 4494...................2879 4630...................136 I have ArcGIS 9.3 and this MUST be done in the field calculator. I have no access to ArcGIS 10 nor can I download an evaluation copy of it. It must be done using 9.3 in the field calculator. The sort ascending must also be done in the field calculator before doing the calculation. Unfortunately I am not able to divert from 9.3 or the field calculator. The result must be exactly how it shows in the above example. My VB logic skills are pretty weak so that it why I am posting here! Thank you for your help!
... View more
03-29-2013
06:17 AM
|
0
|
8
|
5264
|
POST
|
Does anybody have a solution for this in 9.3? I would like to include this in modelbuilder
... View more
03-28-2013
12:52 PM
|
0
|
0
|
206
|
POST
|
Thank you for your suggestions, however model builder does not give me the option to set the data in the temporary geodatabase as "intermediate." Is there another way to delete the data from the geodatabase? Thank you.
... View more
06-08-2012
01:43 PM
|
0
|
0
|
496
|
POST
|
Hello, I have a temporary geodatabase where several feature classes are created during the process of a model run. Once the model completes I would like to delete all the features in this geodatabase without deleting the geodatabase itself. I have tried simply adding a "delete" tool in model builder after the last process, however, there seems to be a schema lock on the data while the model is still running. Is there a way around this? Can I make the delete tool run "on completion of the model?" Thanks.
... View more
06-06-2012
01:24 PM
|
0
|
3
|
1067
|
POST
|
I may be a bit slow when it comes to programming, where do I need to apply this code? Do I need to a create a python script? Can I put this into model builder? How could I set it up to delete all empty feature classes in a geodatabase? Thanks so much for your help and patience.
... View more
05-30-2012
07:02 AM
|
0
|
0
|
168
|
POST
|
I see, I was using the wrong term, thanks for clarifying! Unfortunately we are still on 9.3.1 so Arcpy will not work, is there a way to do it otherwise using sql? Thanks.
... View more
05-30-2012
06:49 AM
|
0
|
0
|
807
|
POST
|
Mathew, The feature class is completely empty, there are no rows in the attribute table. Thanks.
... View more
05-30-2012
06:26 AM
|
0
|
0
|
807
|
POST
|
Mathew, using that expression does not seem to prevent the feature class from being created. It still creates the feature class with empty geometry. Is there another approach? Thanks.
... View more
05-30-2012
05:46 AM
|
0
|
0
|
807
|
POST
|
Mathew, I am using "feature class to feature class" tool to export the layers from SDE to the geodatabase. Do I need to add something (null) to the 'expression' box inside the "feature class to feature class" tool to omit the layer if it has no geometry? Thanks for your help.
... View more
05-29-2012
02:04 PM
|
0
|
0
|
807
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|