POST
|
I get the same error with CopyFeatures as I do with Copy. It seems it was the pathname itself that was causing the issue. Thank you for your suggestion though.
... View more
08-05-2015
12:14 PM
|
0
|
0
|
350
|
POST
|
Yes, I think the issue was that there were spaces in the pathname. I've utilized r"pathname" before to account for this, however, it doesn't seem to work with pyspeech. I just tried it with a pathname without spaces and it works. Thank you for your help.
... View more
08-05-2015
12:11 PM
|
0
|
0
|
350
|
POST
|
Hello All, I've been doing some python development/scripting, trying to figure out how to complete Arcpy processes with speech recognition. At the moment I'm using pyspeech, which utilizes windows speech recognition, and as a test I'm having it do something simply like copy a set of point features. The script works as a stand-alone python script, however when I try to incorporate it into the pyspeech method, I get the an error that the file I'm trying to copy is not supported or doesn't exist. Which to me is wrong, as it works otherwise. Below are copies of the script, both with and without pyspeech, as well as the error I get when using it with pyspeech. Thank you in advance for any help with this issue. Winn ################################ Code without pyspeech: import os import arcpy from arcpy import env from datetime import datetime now = datetime.now() Ver_Date = str(now.strftime("%m/%d/%Y")) File_Date = str(now.strftime("%m%d%y")) workspace = r"C:\Users\ketchum\Documents\Python Projects\Field Work Master\FieldWork.gdb" gps_fc = workspace + "\\GPSLog_" + File_Date note_fc = workspace + "\\Notes_" + File_Date note_fc2 = workspace + "\\Notes_" + File_Date + "_Copy" arcpy.AddMessage('Copying notes.') arcpy.Copy_management(note_fc, note_fc2) ############################ Code with pyspeech: import speech import arcpy from datetime import datetime import time now = datetime.now() Ver_Date = str(now.strftime("%m/%d/%Y")) File_Date = str(now.strftime("%m%d%y")) workspace = r"C:\Users\ketchum\Documents\Python Projects\Field Work Master\FieldWork.gdb" gps_fc = workspace + "\\GPSLog_" + File_Date note_fc = workspace + "\\Notes_" + File_Date note_fc2 = workspace + "\\Notes_" + File_Date + "_Copy" speech.say('Ready for your instruction.') print File_Date def L1Callback(phrase, listener): speech.say(phrase) if phrase == "notes": arcpy.AddMessage('Copying notes.') arcpy.Copy_management(note_fc, note_fc2) speech.say('Notes have been copied.') if phrase == "goodbye": listener.stoplistening() L1 = speech.listenforanything(L1Callback) while L1.islistening(): time.sleep(1) ####################################################### Error when using AddNote_pyspeech.py: 072215 Copying notes. pythoncom error: Python error invoking COM method. Traceback (most recent call last): File "C:\Python26\ArcGIS10.0\lib\site-packages\win32com\server\policy.py", line 277, in _Invoke_ return self._invoke_(dispid, lcid, wFlags, args) File "C:\Python26\ArcGIS10.0\lib\site-packages\win32com\server\policy.py", line 282, in _invoke_ return S_OK, -1, self._invokeex_(dispid, lcid, wFlags, args, None, None) File "C:\Python26\ArcGIS10.0\lib\site-packages\win32com\server\policy.py", line 585, in _invokeex_ return func(*args) File "C:\Python26\ArcGIS10.0\lib\site-packages\speech.py", line 135, in OnRecognition self._callback(phrase, self._listener) File "C:\Users\ketchum\Documents\Python Projects\Voice Recognition\AddNote_pyspeech.py", line 35, in L1Callback arcpy.Copy_management(note_fc, note_fc2) File "C:\Program Files (x86)\ArcGIS\Desktop10.0\arcpy\arcpy\management.py", line 3010, in Copy raise e ExecuteError: Failed to execute. Parameters are not valid. ERROR 000732: Input Data Element: Dataset C:\Users\ketchum\Documents\Python Proj ects\Field Work Master\FieldWork.gdb\Notes_072215 does not exist or is not supported Failed to execute (Copy).
... View more
07-22-2015
02:56 PM
|
0
|
4
|
3297
|
POST
|
For all of those who may use Reportlab, I have a newbie question (should be simple to answer) that has been bugging me for the past day or so and after pouring over all online posts related to reportlab still can't be figured out. All I am trying to do is switch from landscape to portrait orientation in the same document. This will allow me to create a table of features (including links to the pictures of these within the table) and then put in the pictures so they can be linked to. Here is the code I have come up with so far to facilitate what should be a straight forward process: [INDENT]from reportlab.lib.enums import TA_LEFT, TA_RIGHT, TA_CENTER, TA_JUSTIFY from reportlab.lib import colors from reportlab.lib.pagesizes import letter, landscape from reportlab.platypus import SimpleDocTemplate, Paragraph, Spacer, Image, Frame, Table, TableStyle, NextPageTemplate, PageTemplate, BaseDocTemplate from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle from reportlab.lib.units import inch from reportlab.platypus.flowables import Flowable, PageBreak from pyPdf import PdfFileReader, PdfFileWriter import glob, os from reportlab.lib.pagesizes import letter, A4 doc = BaseDocTemplate("M:\GIS Mapping Services\Promotional\Automated Reports\PDF_ReportLab\NextPageExample.pdf",showBoundary=1,pagesize=landscape(letter)) elements = [] styles = getSampleStyleSheet() styles.add(ParagraphStyle(name='normal', fontSize=6, leading = 7, alignment=TA_LEFT)) ptemplate = PageTemplate(id='portrait', pagesize=portrait(letter)) elements.append(Paragraph("Table is here.",styles["normal"])) elements.append(NextPageTemplate('portrait')) elements.append(PageBreak()) elements.append(Paragraph("Pictures are to be placed here.",styles["normal"])) doc.build(elements) del elements [/INDENT] If you have any tips or would like to help me out with this can you please be specific and show me exactly what I am doing wrong or include a working example that goes from start to finish without any coding missing. Thank you in advance for your help, Winn
... View more
03-11-2013
02:02 PM
|
0
|
0
|
3758
|
POST
|
@mvolz47, Tried option #2 from your second post, and although it gave me no errors and seemed to print my results, it printed all data from the database and not just the data I was after using the search cursor. Not sure why it happened that way, but thank you again for the suggestions. Cheers, Winn
... View more
12-31-2012
09:04 AM
|
0
|
0
|
724
|
POST
|
Ok, I finally figured it out. I found this thread which helps, although now I just need to figure out what the language means: http://forums.arcgis.com/threads/66534-Select-from-user-input-variable?highlight=search+cursor+variable. Essentially the code looks like: [INDENT] b = 'Clausen Ranch Unit 34-70 29-1H' query = "Project_Name = '%s'" % (b)[/INDENT] where the %s provides the space to input the desired variable, in this case b. Tested it using the second part of my original post (i as the variable taken from a list), and that works as well. Thank you again for your posts @mvolz47 and I will try your other suggestions as well to see if they work.
... View more
12-31-2012
08:59 AM
|
0
|
0
|
724
|
POST
|
@mvolz47, Thanks for the reply. Unfortunately I am still getting the same error message.
... View more
12-31-2012
08:38 AM
|
0
|
0
|
724
|
POST
|
@Stakemill, Thanks for the reply. We've been using the camera on the Ashtech at high res just fine for the most part, although we have had some issues in the past. So it would be nice to have a backup, but from what I've heard from others as well is that the Ashtech isn't good at connecting to external cameras. We do have a ricoh, which takes ok pictures but has a very poor accuracy with regards to location of the point compared to the Ashtech, not to mention the extra steps involved with not having it in the attribute table.
... View more
12-31-2012
07:45 AM
|
0
|
0
|
191
|
POST
|
Ok, so I have been having a problem setting up a search cursor with python that uses a variable as the desired value. It seems that I am missing an operator, however, I am lost as to what operator I am missing. Below is a simplified version of the code that demonstrates the issue: [INDENT]import arcpy as arc arc.env.workspace = "M:\GIS Mapping Services\Promotional\Automated Reports\ImportExportFieldData.mdb" b = "Clausen Ranch Unit 34-70 29-1H" query = "'"+"Project_Name"+"=""'"+b+"'"+"'" rows = arc.SearchCursor("Inspection_Location",query) for row in rows: [INDENT]print row.Inspection_Location, row.Inspection_Type, row.Project_Name[/INDENT][/INDENT] And here is the error message I am getting: [INDENT]Traceback (most recent call last): File "M:/GIS Mapping Services/Promotional/Automated Reports/SearchCursorWithVariable.py", line 6, in <module> rows = arc.SearchCursor("Inspection_Location",query) File "C:\Program Files (x86)\ArcGIS\Desktop10.0\arcpy\arcpy\__init__.py", line 820, in SearchCursor return gp.searchCursor(*args) File "C:\Program Files (x86)\ArcGIS\Desktop10.0\arcpy\arcpy\geoprocessing\_base.py", line 357, in searchCursor self._gp.SearchCursor(*gp_fixargs(args))) RuntimeError: ERROR 999999: Error executing function. General function failure [Inspection_Location] Syntax error (missing operator) in query expression '( 'Project_Name='Clausen Ranch Unit 34-70 29-1H'' )'.[/INDENT] Also, if I took the b variable and put into a list and then called the variable from the list, would that be any different than what I was attempting to accomplish above? For instance: [INDENT]list = [] for i in list: [INDENT]query = "'"+"Project_Name"+"=""'"+listvalue+"'"+"'" rows = arc.SearchCursor("Inspection_Location",query) for row in rows: [INDENT]print row.Inspection_Location, row.Inspection_Type, row.Project_Name[/INDENT] [/INDENT] Thank you for any help in solving this problem.
... View more
12-31-2012
07:30 AM
|
0
|
5
|
1856
|
POST
|
Hello All, I was wondering if anyone knows of a good camera w/ wifi capabilities to use with the Ashtech MobileMapper 100 and ArcPad 10. The camera on the Ashtech is ok but not great and I would like a better camera for taking photos in the field. I've read the posts on the eye-fi card which may be an option as well. Thank you, Winn
... View more
12-17-2012
06:28 AM
|
0
|
2
|
2444
|
POST
|
It turns out Gustavo that you were right, it is the layer name in the table of contents. It seems that you have to reopen the map in order for the changes to take affect, and not just save the map as I did. So in summary, for all those with the same problem, it is a bug issue and ESRI does know about the issue. Essentially, in order for the ArcPad Data Manager to recognize the fields in a layer, the layer's name in the table of contents must match exactly the layer name in the geodatabase or shapefile. I.e., if you have underscores in the geodatabase you must also have them in the table of content's layer name.
... View more
09-20-2012
12:37 PM
|
1
|
1
|
443
|
POST
|
Thanks for the tip Gustavo. However, just tried it no spaces and it didn't fix the problem.
... View more
09-20-2012
10:31 AM
|
0
|
0
|
443
|
POST
|
Ok, so after some further testing in ArcPad 10 I noticed something interesting and neat. It seems that if you have a text field in your database named something that starts with "Photo", ArcPad will pick up on this and that field will be pre-selected in the picture tab. So if you don't care about what your field is named, name it Photo and let ArcPad choose it for you when taking a picture. And as long as your field people aren't devious and don't meddle with this while taking a picture it should work just fine. Although it is neat that ArcPad will recognize the name Photo it is still slightly annoying it won't recognize the field in Data Manager when trying to check out from ArcGIS. To further test that the Photo language is what ArcPad picks up on, I tried naming the photo field "Jack" and it wouldn't recognize it, instead picking the first text field. Hope this helps anybody having the same problem I did. I put in an incident to support center, so if I hear anything more I will post it here.
... View more
09-20-2012
09:47 AM
|
0
|
0
|
443
|
POST
|
I have been having an issue with ArcPad Data Manager which others seem to have, although nobody has posted a definitive solution yet or reason why it happens. The problem is that my photo fields are not recognized in Data Manager when checking out data for ArcPad. I am attaching two screenshots to show what I mean. The curious thing however is that Data Manager recognizes a the same field in my Waypoints feature class, but wont in the others. I am currently running ArcGIS 10 sp 5 and ArcPad 10 build 4. If anybody can help me understand how to fix this and why it occurs, I would be very appreciative. I will also submit an inquiry with ESRI into the matter. Thanks, Winn
... View more
09-20-2012
09:15 AM
|
0
|
5
|
3463
|
POST
|
Hi Everyone, I am working on performing a union of two multipatches that I created from extruding between two surfaces and a flat tin surface at a specific elevation. I have performed the Is Closed tool on both, which both are closed, and then merged the two. However, upon attempting to Union them, ArcCatalog, ArcPad, and ArcScene all crash. Could somebody please help me get them to union so that I have one completely enclosed geometry. They are in a file geodatabase in the attached folder Thanks in advance. Winn
... View more
09-16-2012
01:17 PM
|
0
|
1
|
1502
|
Title | Kudos | Posted |
---|---|---|
1 | 09-20-2012 12:37 PM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|