|
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
|
1130
|
|
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
|
1130
|
|
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
|
1075
|
|
POST
|
All, I have developed some code that uses the IGeoProcessor object. It was bombing out when I was adding a Toolbox with an incorrect path. I realised my mistake and decided to add a bit of error trapping by using the Exist method to check if the toolbox exists before trying to add it to the GeoProcessor. So my code looks like this: Dim pGP As IGeoProcessor2
pGP = New GeoProcessor
If pGP.Exists("C:\temp\test.tbx", "Toolbox") Then
pGP.AddToolbox("C:\temp\test.tbx")
End If In the help it says: Test the existence of a given parameter value (GPValue or catalog path) the type of the data is optional. So my catalog path is obviously C:\temp\test.tbx but my data type is not optional I have to put something there. I tried Nothing and even a string that contains nothing or any text I like. So the line of code below is accepted and runs without error returning true (as the toolbox exists). pGP.Exists("C:\temp\test.tbx", "Duncan is ace") So what do all the developers have to say about this? What should I put there for the non-optional parameter? I could just put Nothing or maybe I should put something sensible, but the Help gives NO help about what possible value I should put there, it says it should be a variant that represents pDataType. There is an interface call IGPDataType but as I can put anything there I find myself wondering what should really go there? Duncan
... View more
01-31-2012
07:12 AM
|
0
|
0
|
1955
|
|
POST
|
Gavin, In ArcPad 10 when in ArcMap I can use the Get Data for ArcPad wizard to check out data from different geodatabases into a single axf database and one layer can be editable the other read only. The read only never appears in the editable layers menu on ArcPad. You would set one layer as Action > Export as background data (to AXF layer) > Make read only and for the editable layer you code do Action > check out for disconnected editing > check out schema only. So yes you can have editable and read only in a single axf file. Duncan
... View more
01-31-2012
05:35 AM
|
0
|
0
|
1075
|
|
POST
|
Gavin, If you have layers that are only ever going to be read only maybe you should export those to Shapefile for better performance. AXF may be the all singing and dancing solution to most storage solutions but I have found them to be a bit flaky sometimes, especially when one has more than 4 layers in an AXF (well that's my experience anyway). Check this page out about ArcPad and Shapefiles. Duncan
... View more
01-30-2012
06:42 AM
|
0
|
0
|
1075
|
|
POST
|
Enrico, I think the short answer is no to both of your questions. Duncan
... View more
01-30-2012
05:44 AM
|
0
|
0
|
1054
|
|
POST
|
Demetris, I've restructured your code. Have a look. You should really get into the habit of documenting your code with comments, this is good programing as it allows others to follow the code easier. Duncan Dim pBlockBoundaryFC As IFeatureClass
Set pBlockBoundaryFC = pBlockBoundary.FeatureClass
Dim pBlockBoundaryFields As IFields
Set pBlockBoundaryFields = pBlockBoundaryFC.Fields
' Create Spatialfilter
Dim pGeom As IGeometry
Dim pSpatialFilter As ISpatialFilter
Set pSpatialFilter = New SpatialFilter
' Create a cursor over all BlockBoundary
Dim pBlockBoundaryCursor As IFeatureCursor
Set pBlockBoundaryCursor = pBlockBoundaryFC.Search(Nothing, False)
' Main BlockBoundary loop
Set pBlockBoundaryFeature = pBlockBoundaryCursor.NextFeature
Do Until pBlockBoundaryFeature Is Nothing
' Get block boundary polygon and update spatialfilter
Set pGeom = pBlockBoundaryFeature.Shape
With pSpatialFilter
Set .Geometry = pGeom
.GeometryField = "Shape"
.SpatialRel = esriSpatialRelTouches
End With
' I am assuming you have a NewParcelFC layer
set pNewParcelsCursor = pNewParcelFC.Search(pspatialfilter,False)
Set pNewParcelsFeature = pNewParcelsCursor.NextFeature
Do Until pNewParcelsFeature Is Nothing
FID = pNewParcelsFeature.Value(intposFID)
MsgBox FID
Set pNewParcelsFeature = pNewParcelsCursor.NextFeature
loop
' Get next Block boundary
Set pBlockBoundaryFeature = pBlockBoundaryCursor.NextFeature
Loop
... View more
01-30-2012
01:50 AM
|
0
|
0
|
722
|
|
POST
|
Diss, I created a VB AddIN and in the onclick event I put this code together and got it working. It looks like the input layer has to be a featurelayer object and not a string. Duncan ' Get handle input point layer
Dim pmap As IMap
pmap = My.ArcMap.Document.FocusMap
Dim pLayer As ILayer
pLayer = pmap.Layer(0)
Dim pFeatureLayer As IFeatureLayer
pFeatureLayer = pLayer
' Run geoprocessing tool
Try
' Create Minimum bounding geometry tool
Dim mbg = New ESRI.ArcGIS.DataManagementTools.MinimumBoundingGeometry()
With mbg
.geometry_type = "convex_hull"
.in_features = pFeatureLayer
.out_feature_class = "c:\temp\conhull.shp"
End With
' Cast as a GPProcess
Dim pGPProcess As ESRI.ArcGIS.Geoprocessor.IGPProcess
pGPProcess = mbg
' Create GeoProcessor
Dim GP As New ESRI.ArcGIS.Geoprocessor.Geoprocessor
GP.OverwriteOutput = True
GP.AddOutputsToMap = True
' Execute tool
Dim pResult As ESRI.ArcGIS.Geoprocessing.IGeoProcessorResult2
pResult = GP.Execute(pGPProcess, Nothing)
Catch ex As Exception
MsgBox(ex.Message)
End Try
MsgBox("finished!")
... View more
01-16-2012
01:08 AM
|
0
|
0
|
897
|
|
POST
|
Could try the tool feature vertices to points? http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/Feature_Vertices_To_Points/00170000003p000000/
... View more
01-15-2012
08:46 AM
|
0
|
0
|
1482
|
|
POST
|
Are you saying the vertices of the polygon contain z values? You could convert your polygon to points with z values then convert these to pixels with their z values.
... View more
01-14-2012
02:35 PM
|
0
|
0
|
1482
|
|
POST
|
Iraklis, There is a geo-processing tool called Polygon to Raster and its found in the Conversion > To Raster toolbox. Duncan
... View more
01-14-2012
05:24 AM
|
0
|
0
|
1482
|
|
POST
|
If you look at the help on this geoprocessing tool it says: The CONVEX_HULL, CIRCLE, and ENVELOPE options are only available with an ArcInfo license. Are you using ArcInfo?
... View more
01-14-2012
05:09 AM
|
0
|
0
|
897
|
|
POST
|
Jarek, I think its to do with correct topology of the polygon. If you look at the Help on the Check Geometry tool it mentions what direction an outer ring a polygon should be. I guess when you copy the polygon into the polyline featureclass ArcMap is enforcing correct topology for the polygon and consequently your polyline ends up clockwise. Well thats my guess of whats going on... Duncan
... View more
01-13-2012
01:35 PM
|
0
|
0
|
777
|
|
POST
|
James, Is your point data "stacked", i.e. you have lots of points that have the same XY coordinates? I think the tool ignores stacked points so may be this is reducing your dataset to less than 10? Also (not sure about this) may be you have set the output cellsize tool large and eveything falls within one cell? Duncan
... View more
01-13-2012
06:49 AM
|
0
|
0
|
726
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 04-15-2026 07:35 AM | |
| 1 | 04-14-2026 06:38 AM | |
| 1 | 04-14-2026 04:16 AM | |
| 8 | 03-30-2026 10:12 AM | |
| 2 | 03-18-2026 08:16 AM |
| Online Status |
Offline
|
| Date Last Visited |
2 weeks ago
|