|
POST
|
#NIM076610 While the bug report specifically refers to a console application, I have determined that it also occurs in ArcMap.
... View more
12-30-2011
12:37 PM
|
0
|
0
|
736
|
|
POST
|
It does seem that ST_GEOMETRY is the culprit. I migrated my test data to SDELOB and the test succeeded, then migrated it back to ST_GEOMETRY and the problem reappeared. This morning I thought that I was getting SDELOB to fail with production reports, but it turns out I was not pointing them to the test GDB. The SDELOB storage is working fine so far, so unless I can get my tests to fail I'm still going to recommend migrating our production data away from ST_GEOMETRY.
... View more
12-28-2011
08:10 AM
|
0
|
0
|
736
|
|
POST
|
End of the year reporting is here, and our GIS reports are crap since we migrated our geodatabase to ArcSDE 10 SP3/Oracle 11g. I finally pinpointed the problem: nested queries using ArcObjects corrupt the outermost feature cursor so that it repeatedly loops through the first 1900-2000 features. This was, I most emphatically add, not an issue in ArcGIS 9. I've submitted this incident to tech support. I'm posting for two reasons: 1) To encourage others to look for the problem. The simplest workaround at this point is to run your reports against a file geodatabase copy of your enterprise GDB. 2) To encourage the ESRI geodatabase team to elevate this to the highest levels. In an ideal world this would be an isolated incident, and there's simply something wrong with our geodatabase migration that can easily be fixed. At worst, this could be an egg in the face of GIS departments worldwide.
... View more
12-28-2011
04:19 AM
|
0
|
5
|
1083
|
|
POST
|
One more question: how do I control the units it displays? I can set english vs. metric, but what if I always want it to display feet?
... View more
11-22-2011
04:20 AM
|
0
|
0
|
2724
|
|
POST
|
Thanks, I had only seen the first example in the docs and not the second.
... View more
11-22-2011
03:58 AM
|
0
|
0
|
2724
|
|
POST
|
The ScaleLine really seems to be a step backwards. Is there any way (i.e. an ACTUAL EXAMPLE) to get it to look and behave the way the ScaleBar did?
... View more
11-21-2011
09:01 AM
|
0
|
0
|
2724
|
|
POST
|
Multiple add-ins, multiple dialogs, no problem. Button, ComboBox, and RadioButton events work fine; I haven't tested any others. One other quirk I noticed: print, when executed from a dialog, does not output to the Python window.
... View more
11-16-2011
07:46 AM
|
0
|
0
|
2960
|
|
POST
|
I can get wxPython to work in an add-in, EXCEPT that Destroy() doesn't work. For example:
import arcpy
import pythonaddins
import wx
class TestButtonClass(object):
"""Implementation for wxTest_addin.TestButton (Button)"""
dlg = None
def __init__(self):
self.enabled = True
self.checked = False
def onClick(self):
if self.dlg is None:
self.dlg = TestDialog()
else:
self.dlg.Show(True)
return
class TestDialog(wx.Frame):
def __init__(self):
wxStyle = wx.CAPTION | wx.RESIZE_BORDER | wx.MINIMIZE_BOX |wx.CLOSE_BOX | wx.SYSTEM_MENU
wx.Frame.__init__(self, None, -1, "Set DataFrame Name", style=wxStyle, size=(300, 120))
self.SetMaxSize((300, 120))
self.SetMinSize((300, 120))
self.Bind(wx.EVT_CLOSE, self.OnClose)
panel = wx.Panel(self, -1)
self.lblStatus = wx.StaticText(panel, -1, "OK", pos=(8, 8))
wx.StaticText(panel, -1, "Title:", pos=(8,36))
self.tbTitle = wx.TextCtrl(panel, -1, value="", pos=(36, 36), size=(200,21))
self.btnSet = wx.Button(panel, label="Set", pos=(8, 66))
self.Bind(wx.EVT_BUTTON, self.OnSet, id=self.btnSet.GetId())
self.Show(True)
def OnClose(self, event):
self.Show(False) # self.Destroy() doesn't work
def OnSet(self, event):
# Use str() to strip away Unicode crap
sTitle = str(self.tbTitle.GetValue())
mxd = arcpy.mapping.MapDocument("CURRENT")
df = mxd.activeDataFrame
df.name = sTitle
arcpy.RefreshTOC()
app = wx.PySimpleApp()
app.MainLoop()
I haven't yet investigated the consequences of having more than one add-in using wxPython.
... View more
11-15-2011
09:02 AM
|
0
|
0
|
2960
|
|
POST
|
I notice that threading.Timer, or indeed any implementation of threading, doesn't work in ArcMap Python. I'm assuming this is a related issue?
... View more
11-14-2011
10:28 AM
|
0
|
0
|
2960
|
|
POST
|
arcpy.da blows away ArcObjects for accessing table fields in a file gdb: ArcObjects/comtypes (Shape_Area): 13 sec arcpy.SearchCursor (Shape_Area): 65 sec arcpy.da.SearchCursor (Shape_Area): 2 sec arcpy.da.SearchCursor (SHAPE@AREA): 14 sec
... View more
11-11-2011
05:37 AM
|
0
|
0
|
859
|
|
POST
|
I've been really busy this year and only just now started looking at the 10.1 beta. I noticed that the current version of comtypes croaks when trying to wrap esriSystem.olb. Fortunately, you can remedy this by adding the following entry to the _ctype_to_vartype dictionary in automation.py: POINTER(BSTR): VT_BYREF|VT_BSTR, If there's a better approach I'd like to hear about it. Also note that arcpy.da approaches ArcObjects via comtypes in terms of performance. To query and hydrate ~500,000 polygons from a file GDB feature class: ArcGIS 10.0SP3: --------------- ArcObjects/comtypes: 31 sec arcpy.SearchCursor: 96 sec ArcGIS 10.1 Beta: ----------------- ArcObjects/comtypes: 21 sec arcpy.SearchCursor: 85 sec arcpy.da.SearchCursor: 27 sec
... View more
11-10-2011
09:39 AM
|
0
|
6
|
1241
|
|
POST
|
This thread has been brought to my attention, and it seems there are some misconceptions floating around. You do NOT need Visual Studio, or the MIDL compiler, or even PythonWin in order to use ArcObjects in Python; all you need is the comtypes package. My presentation included an advanced exercise in creating a COM component using Python, but that was meant for UberPyGeeks. The snippets.py file contains all the examples you need.
... View more
04-18-2011
06:53 AM
|
0
|
0
|
1674
|
|
POST
|
The old ArcScripts site had a mechanism for contacting the author. I don't like the new systems but I hear they're changing. Anyway, my website has an email link: www.pierssen.com
... View more
03-30-2011
11:24 AM
|
0
|
0
|
3034
|
|
POST
|
In theory it can be done, but you always have to watch out for controls that have restricted content, keeping them from rendering to a WriteableBitmap (WBM). Basically, create a WBM the size of your layout, create a WBM for each child control, and paste it all together. Pretty much all the code you need is in the PDFExporter class itself: check out the AddElements method.
... View more
03-29-2011
02:11 PM
|
0
|
0
|
3034
|
|
POST
|
Sorry I'm not understanding the organization of your app. If MainApp creates both Home and PDFExporter objects, and Home contains the map object, you could simply add a property or method on Home that MainApp could call to get a handle to the map and pass on to the exporter.
... View more
03-01-2011
10:44 AM
|
0
|
0
|
3034
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 01-04-2012 06:42 AM | |
| 1 | 09-23-2021 10:42 AM | |
| 2 | 09-28-2021 07:07 AM | |
| 1 | 04-07-2021 10:31 PM | |
| 3 | 03-21-2021 01:14 PM |
| Online Status |
Offline
|
| Date Last Visited |
01-07-2022
08:31 AM
|