Select to view content in your preferred language

lyr.saveACopy()

751
6
09-21-2010 06:21 PM
runegullstrom
Emerging Contributor
Hi All,

I'm trying to save layers from a mxd to layer files. It all works fine as long as I'm
not providing a version number. If I add a version number I get the message:
'function takes exactly 1 argument (2 given)'.

The doco's suggest otherwise as does the python script (mixins.py) where the error occurs.

Anybody ran into the same problem?

cheers
0 Kudos
6 Replies
KevinHibma
Esri Regular Contributor
My apologies, this has been logged as a defect; NIM058666 - saveACopy method fails when saving to the previous version.
At this time I'm unaware of any work arounds to saving an older version
0 Kudos
runegullstrom
Emerging Contributor
Thanks a lot Kevin,

I couldn't find it in the bug list and
I can't find it in the sp1 announcement, so I take it, it won't be fixed soon?

Rune
0 Kudos
KevinHibma
Esri Regular Contributor
Rune,

To the best of my knowledge, the list for SP1 is pretty set.
This one wont make it into that.
I've tagged it for SP2 - I can't make any promises between now and SP2, but in the very least it will be looked at.
0 Kudos
TedCronin
MVP Alum
what is the timeline for the Sp2 release.  Will that be around Feb-March timeframe?  Also, speaking of Sp1 will there be any outside testing of the SP, like a SP1 beta?
0 Kudos
danbecker
Frequent Contributor
after an hour of messing around w/ version number syntax, I found this thread!

Was nice to output all layers as .lyr, but not much help when the client who will receive all the .lyr files is still using 9.3...

one step forward, two steps back.
0 Kudos
RandyKreuziger
Frequent Contributor
after an hour of messing around w/ version number syntax, I found this thread!

Was nice to output all layers as .lyr, but not much help when the client who will receive all the .lyr files is still using 9.3...

one step forward, two steps back.


I too was wasting my time on this one.  Could ESRI please link their online help to known bugs!!! 
http://ideas.arcgis.com/ideaView?id=087300000008EiIAAU  Then your customers won't be wasting time on known bugs. 


I totally agree.  We installed verion 10.0 on a PC so we could fix MXDs and layer files as part of a ArcSDE migration.  The server name changed and we are moving away from SQL logins moving to Windows Authentication.  However, there are so many critical bugs in ArcPy that it just isn't usable!  Waiting for SP2 to fix this bug is disappointing at best!

dbecker88, here is my work flow.  Using a script I convert the layer files.  I then add them into ArcMap and save them out 1 by 1 as 9.3 overwriting the orginals.  This is doable because we only have about 50 layer files.
0 Kudos