Select to view content in your preferred language

arcpy and pmf

5305
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
Frequent Contributor
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
Emerging Contributor
Mark -

Have you looked at IronPython with clrtypes, to do all the arcobjects, just inquiring?
0 Kudos
MarkCederholm
Frequent Contributor
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
Frequent Contributor
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
Frequent Contributor
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
Esri Alum
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