Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(5)  |  Call(5)  |  Derive(0)  |  Import(0)

src/l/a/ladybug-HEAD/src/ladybug_ladybug.py   ladybug(Download)
            studyLayerPath = parentLayer.Name + '::' + studyLayer.Name
            # Add The layer if it's not already created
            studyLayerIndex = rc.DocObjects.Tables.LayerTable.FindByFullPath(layerT, studyLayerPath, True)
            if studyLayerIndex < 0: studyLayerIndex = layerT.Add(studyLayer)
 
            else:
                layerPath = parentLayer.Name + '::' + studyLayer.Name + '::'+ layerName + '_' + `l`
                layerIndex = rc.DocObjects.Tables.LayerTable.FindByFullPath(layerT, layerPath, True)
                if CheckTheName:
                    while layerIndex > 0: # if layer existed rename the layer
                        l = l + 1
                        layerPath = parentLayer.Name + '::' + studyLayer.Name + '::'+ layerName + '_' + `l`
                        layerIndex = rc.DocObjects.Tables.LayerTable.FindByFullPath(layerT, layerPath, True)
                # nLayerIndex = rc.DocObjects.Tables.LayerTable.Find(layerT, nLayer.Name, True)
 
                nLayerIndex = rc.DocObjects.Tables.LayerTable.FindByFullPath(layerT, layerPath, True)
                if nLayerIndex < 0: nLayerIndex = layerT.Add(nLayer)
                # study = 1; # do it once in a rotation study
 
                newLayerFullPath = parentLayer.Name + '::' + studyLayer.Name + '::'+ layerName + '_' + `l` + '::' + newLayer.Name
                newLayerIndex = rc.DocObjects.Tables.LayerTable.FindByFullPath(layerT, newLayerFullPath, True)
                # newLayerIndex = rc.DocObjects.Tables.LayerTable.Find(layerT, newLayer.Name, True)
                if newLayerIndex < 0: