POST
|
Hi Chris, everything is working well right now! Thank's a lot! Very usefull help! Samuel
... View more
08-03-2011
04:39 AM
|
0
|
0
|
375
|
POST
|
Hi Chris!, thanks for the answer! As you suggested I did some changes in my code. As I run the code, the layer package failed to proceed (error 99999). I looked for common errors like "layer without a description" but everything is ok. I succeeded exporting manually the layer to a package so it's probably something missing in the script! Any idea? Here's the python script i've been using: # Import arcpy module
import arcpy
# Set the workspace
arcpy.env.workspace = "c:/LPK"
# Overwrite pre-existing files
arcpy.env.overwriteOutput = True
# Local variables:
mxd = arcpy.mapping.MapDocument(r"C:\LPK\Paquetage_de_Couche.mxd")
lyr = arcpy.mapping.ListLayers(mxd, "Test")[0]
Package = r"C:\LPK\Packaged_Layer.lpk"
# Process: Package Layer
arcpy.PackageLayer_management(lyr, Package, "PRESERVE", "CONVERT_ARCSDE", "DEFAULT", "ALL", "ALL", "CURRENT") thank's in advance! Best regards, Samuel Boisvert
... View more
08-02-2011
06:53 AM
|
0
|
0
|
375
|
POST
|
Hi, I was wondering if there is a way to use a python script from outside ArcMap that export a series of layer packages to a given folder. I built the following script mainly with Model Builder inside the .mxd from which I want to export the packages, as a matter of fact that script works well when I start it inside my ArcMap document.... The problem is that I want it to run from outside ArcGIS. So I have to find a way to reference (inside my script) the mxd from which I want the layers package to be exported from. Does anyone have any solution on how I could do that? Hereâ??s my python script: # ---------------------------------------------------------------------------
# JavaScript.py
# Created on: 2011-07-13 08:38:45.00000
# (generated by ArcGIS/ModelBuilder)
# Description: To be added...
# Auteur: Samuel Boisvert
# ---------------------------------------------------------------------------
# Import arcpy module
import arcpy
# Set the workspace
arcpy.env.workspace = "c:/LPK"
# Overwrite pre-existing files
arcpy.env.overwriteOutput = True
# Local variables
Layer = "Layer"
Paquetage = "C:\\LPK\\LPK.lpk"
# Process: Package Layer
arcpy.PackageLayer_management("Layer", Paquetage, "PRESERVE", "CONVERT_ARCSDE", "DEFAULT", "ALL", "ALL", "CURRENT") Thank you Best regards, Samuel Boisvert
... View more
07-22-2011
07:59 AM
|
0
|
4
|
870
|
POST
|
I had the reverse problem, I wasn't able to display my "2d" package (got an error while importing), my default view was set to 3D, I switched back to 2D view and was able to import it without a problem! Isn't a 2d layer supposed to drap over the relief even in 3d view? Any tip from esri or anyone on the source of this problem would be appreciated! It sounds like a random problem to me.
... View more
07-22-2011
07:31 AM
|
0
|
0
|
100
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|