Select to view content in your preferred language

arcpy and pmf

4988
23
02-02-2010 10:29 AM
TedCronin
MVP Honored Contributor
Will the generation of pmf files be supported with arcpy?  I don't remember seeing anything in the help.
0 Kudos
23 Replies
MarkCederholm
Regular Contributor II
As far as I can tell, there is no Publisher support in arcpy, nor can you use it to check out the license.  This is a textbook situation where you want to use ArcObjects instead (see my presentation at the upcoming DevSummit).  I've attached an example script.
0 Kudos
TedCronin
MVP Honored Contributor
yes, comtypes is pretty cool, thanks for the script, will give it a spin.
0 Kudos
BartHound
New Contributor
Mark -

Have you looked at IronPython with clrtypes, to do all the arcobjects, just inquiring?
0 Kudos
MarkCederholm
Regular Contributor II
Not yet; I plan to eventually, though I hear IronPython's performance leaves something to be desired.  Right now, I'm focusing on the Python shipped with ArcGIS.
0 Kudos
MarkCederholm
Regular Contributor II
FYI, I've now added IronPython to my list of COM interop performance benchmarks.  Here are the relative scores for calculating the average area of 500+K polygon features at 9.3.1:

VBA:   1.00
C++/Native:  1.00
Python/comtypes:  3.54
VB .NET:   3.54
Python/arcgisscripting: 3.62
IronPython:  4.78
0 Kudos
TedCronin
MVP Honored Contributor
Which version of Ironpython does this refer to?  What's interesting to me is the tie:

Python/comtypes:  3.54
VB .NET:  3.54

kinda makes you not want to use vb.
0 Kudos
MarkCederholm
Regular Contributor II
IronPython is 2.6, CPython is 2.5.1, comtypes is 0.6.1
0 Kudos
TedCronin
MVP Honored Contributor
Any testing with 2.6.2 with arcpy? Or is comtypes not ready for 2.6?
0 Kudos
JasonScheirer
Regular Contributor II
Have you tried benchmarking your Python scripts against Python with psyco enabled? I wonder how much it would help, if the bottlenecks on the Python side can be significantly optimized away.
0 Kudos