|
POST
|
It looks like you are almost there. All you need to do is create the attribute fields you wish to populate in your output dataset. You do this by using the AddField tool and do that after you have called the createfeatureclass tool. You already have the code to extract data from your input file so you simply extract your attributes and write these to your new output row which you are calling feat. If you can't work out how to do that then upload a sample of your input file so people can see what fields you are wanting to pass to your output dataset. Duncan
... View more
10-10-2011
07:31 AM
|
0
|
0
|
981
|
|
POST
|
Have you tried contacting the Author of this script, they would have the best chance in correcting the error? You can contact them from the Arcscript page.
... View more
10-10-2011
07:23 AM
|
0
|
0
|
5272
|
|
POST
|
Search help for "RemoveLayer" it's a method in the arcpy mapping module.
... View more
10-10-2011
07:12 AM
|
0
|
0
|
873
|
|
POST
|
Alex, Below is some VBA code that I think achieves what you are asking. Interestingly it does not seem to adjust the setting in the dataframe > Properties > General > Units(display) drop down. Duncan Public Sub test()
Dim pMXDoc As IMxDocument
Set pMXDoc = ThisDocument
Dim pLatLonFormat As ILatLonFormat2
Set pLatLonFormat = New LatLonFormat
With pLatLonFormat
.ShowDirections = True
.ShowZeroMinutes = True
.ShowZeroSeconds = True
End With
Dim pReportUnitFormat2 As IReportUnitFormat2
Set pReportUnitFormat2 = pMXDoc
pReportUnitFormat2.CoordinateReadoutUnits = esriDecimalDegrees
Set pReportUnitFormat2.CoordinateReadoutLatLonFormat = pLatLonFormat
End Sub
... View more
10-10-2011
02:41 AM
|
0
|
0
|
596
|
|
IDEA
|
-->
I would like to see a simple addition to the context menu in the Table of Contents. If you click on the little button List by Source in the TOC you see your layers organised by their source location. Some of my layers use Domains on fields to control the entry of data. Domains are stored at the GeoDatabase level. The only way to view these are to go the GeoDatabase in the Catalog window and enter the properties window of the GeoDatabase. You cannot get to this properties window from the TOC when in List by Source mode. So I would like to see a new option when one right clicks on the geodatabase in the TOC (when in List by Source mode) to open location in the Catalog Window at which point I can drill down into the properties and edit my Domain. At the moment I have to manually open Catalog and navigate to the appropriate location where the GeoDatabase is and most of my MXD's are linking to multipe GeoDatabases across multiple drives.
... View more
10-03-2011
07:12 AM
|
9
|
4
|
1723
|
|
POST
|
Bruce, I've found the whole AXF root personally a bit flakey and have in the past lost data with it corrupting itself and refusing to check data back in. One silver lining is that ArcPad studio can now export the contents to a shapefile. So if your checking in is bombing out for what ever reason you can potentially recover the data from the AXF file by exporting it to a Shapefile. This will presumably negate any useful checking in/out you did. To export to shapefile open the AXF database in ArcStudio, expand the FeatureLayers and right click on the Layer and choose export... I think this has been a very useful and life saving addition to ArcStudio. Duncan
... View more
09-15-2011
03:30 AM
|
0
|
0
|
846
|
|
POST
|
I've just been working on a project developing a custom data capture project on a Trimble YUMA. My only problem with it was the 32Gb solid state Hard drive was not enough space, after Windows 7 and all the other software (Arcpad etc.) I was left with "only" 20Gb of space. I needed to supply the field surveyor with a huge amount of raster imagery for much of the Scottish coastline. The solution was to put that all on a 400GB USB drive and the surveyor has to bite the bullet and deal with the faff of manually deleting and copying folders when they moved to their next survey block.
... View more
09-15-2011
03:19 AM
|
0
|
0
|
743
|
|
POST
|
Open Arctoolbox window, right click on the root ArcToolbox and select environments... Duncan
... View more
09-15-2011
03:05 AM
|
0
|
0
|
840
|
|
POST
|
Hi Steve, I've looked at your code and there appears to be some nutty situation where you are looping through every 5th vertex of each polygon and repeating the loop. I think this is where your code is going amiss. So I've cleaned up the code for you and have reposted it. You also create objects then never use them... I've removed them too! You placed code that only needs to called once inside the loop so these have been moved out. As I don't have your data I was unable to test this code. Duncan
... View more
09-14-2011
08:03 AM
|
0
|
0
|
604
|
|
POST
|
All, I had been thinking of a work around all weekend to this problem so I came into the office with a way of resolving this problem, fired up help and was just doing some casual searching when I spotted AddItemsFromTable. So during design time we have a property of the ComboBox called listtable but during runtime it's called AddItemsFromTable. So my apologies to all for asking this question as I'm not used to objects having different names for the same property... Code is below. Duncan
Sub PopulateCombobox
' Get file path of APM file then use this to create a path to dBase file
Dim fp
fp = MAP.FilePath
Dim i
i = instrrev(fp,"\")
fp = left(fp,i) & "SpeciesList.dbf"
' Get control and refresh
Dim p
Set p = ThisEvent.Object
Dim c
Set c = p.Controls
Dim sc
Set sc = c.Item("cmbxSpecies")
sc.Clear
sc.AddItemsFromTable fp,"Species","Species"
End Sub
... View more
09-12-2011
01:15 AM
|
0
|
0
|
547
|
|
POST
|
All, I'm having real problems with this one and was hoping someone out there could help. I have a form with 3 pages, page 2 has a combobox on it where I have set the listtable to be a dbf file at design time. Page 3 has the ability to append a new entry to the end of the dbf file (This bit of code works fine). I want to be able to see this new entry if I tab back to page 2. I cannot seem to find any method that refreshes the combobox, is it possible? I've tried setting the listtable property of the combobox but it keeps bombing out saying that it's not a property... below is the code that is called by an onclick button event on page 3. Any ideas, I'm using Arcpad 10? Duncan Sub NewSpecies
' Description: Appends a new species to dbf file
'
' Created: 9/9/11
' Get species name
dim b
Set b = ThisEvent.Object
dim p
set p = b.Parent
dim c
set c = p.Controls
dim t
set t = c.Item("ebxNew")
dim s
s = t.Text
If s = "" then
msgbox "You must set the species name first!", vbExclamation, "Invalid species name..."
Exit Sub
End If
' Get file path of APM file then use this to create a path to dBase file
dim fp
fp = MAP.FilePath
dim i
i = instrrev(fp,"\")
fp = left(fp,i) & "SpeciesList.dbf"
' Open dBase file
Dim rs
set rs = APPLICATION.CreateAppObject("RecordSet")
rs.Open fp,2
' Find out what is the last ID and increment by 1
rs.MoveLast
dim id
id = rs.Fields.Item("ID").Value
id = id + 1
' Add new species
rs.AddNew
rs.Fields.Item("ID").Value = id
rs.Fields.Item("Species").Value = s
rs.Update
' Refresh combobox
dim cb
set cb = p.Parent.Pages("PAGE2").Controls.Item("cmbxSpecies")
msgbox cb.Name
set cb.listtable = "SpeciesList.dbf" '<<<<<<<<<<<< This does not work
cb.listtable = "SpeciesList.dbf" '<<<<<<<<<<<<<< nor does this!
Msgbox "Species " & s & " successfully added to list!",vbInformation,"List updated!"
End Sub
... View more
09-09-2011
11:13 AM
|
0
|
2
|
2453
|
|
POST
|
Justin, As I understand it a Feature is nothing more than a row in a table where one of the fields just happens to hold a geometry rather than all fields being non-spatial data. So I don't see why you can't have a row (feature) where all values are set to NULL, this should still be a valid row in your table (featureclass). Anybody out there do correct me if I am wrong? So you dataset is a "simple" shapefile and when you issue a delete is sets everything to NULL but does does not remove the row from the table? Maybe you could post up your code for us to see? Duncan
... View more
09-08-2011
08:19 AM
|
0
|
0
|
936
|
|
POST
|
Mele, I've never used it but have a go at using the Interface IDatasetEdit? Duncan
... View more
09-08-2011
08:11 AM
|
0
|
0
|
565
|
|
POST
|
You could try to run the MXD through MXD Doctor? I suggest you back up the file before you do that just in case it blitzes it. It's a tool under the Desktop Tools group if you are using version 10. Duncan
... View more
09-08-2011
07:24 AM
|
0
|
0
|
787
|
|
POST
|
Justin, I'm surprised the pFeature.Delete did not work which suggests to me the source of your problem is something else, what format is your data store as? If it's ArcSDE then maybe some weird locking is going on? I would try you code on a small sample of say a shapefile? Duncan
... View more
09-08-2011
07:14 AM
|
0
|
0
|
936
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | a month ago | |
| 1 | a month ago | |
| 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 |
a week ago
|