AnsweredAssumed Answered

Cannot add lasd to map using python script in 10.2.2

Question asked by mnigrell on Nov 13, 2014
Latest reply on Aug 20, 2019 by jborgion

I created a python script which creates a las dataset and adds it to the map. It worked fine in 10.1. I just installed 10.2.2 and now it gives me an error when I run the script. Is there something wrong with my script or did something change between 10.1 and 10.2.2 in terms of programmatically adding a lasd layer to a map?


Here's the offending subset of my script:, OutputLASD, "NO_RECURSION", "", "", "", "RELATIVE_PATHS")

        Output_LASD_Layer = arcpy.CreateUniqueName("OutputLASD.lasd"), Output_LASD_Layer)

        addlayer = arcpy.mapping.Layer(Output_LASD_Layer) = Output_LASD_Layer_String

        arcpy.mapping.AddLayer(DataFrame, addlayer)


I get a value error:

Traceback (most recent call last):

  File "", line 138, in <module>

    addlayer = arcpy.mapping.Layer(Output_LASD_Layer)

  File "c:\program files (x86)\arcgis\desktop10.2\arcpy\arcpy\arcobjects\", line 389, in __init__

    super(LayerMixin, self).__init__(lyrfile)

  File "c:\program files (x86)\arcgis\desktop10.2\arcpy\arcpy\arcobjects\", line 47, in __init__

    for arg in args))

ValueError: Object: CreateObject Layer invalid data source