I have written a code in VBA, I am passing parameters to Python and creating a buffer there. After that I am passing that buffer layer and further processing in VBA again.
Here is the code for reference:
'Create Buffer using Python Shell
LayerPath = ""
LayerPath = GetWorkspacePathWithLayerName(EdgeLayer) & ".shp"
Dim OutputFolderPath As String
Dim OutputFileName As String
Dim OutputPath As String
Dim BuffDist As Double
OutputFolderPath = GetPath(EdgeLayer) & "\Buffer"
OutputFileName = Replace(getUniqueFileName("Buffer_" & EdgeLayer.Name), ".", "") & ".shp"
OutputPath = OutputFolderPath & "\" & OutputFileName
BuffDist = ConverUnitsFromMetersToMapUnits(txtMinAngle)
'TRYING to CALL PYTHON and PASSING Parameters
Shell "c:\Python26\ArcGIS10.0\Python.exe " & " D:\Createbuffer.py" & " " & LayerPath & " " & OutputPath & " " & BuffDist, vbMaximizedFocus
**addToCurrentView** OutputFolderPath, OutputFileName
I want VBA to halt addToCurrentView till Python shell completes its process (creating buffer). Right now it is giving error as there is a lock clash for the file. Can anyone help me as to how to do that.
Thanking in advance for the answers and comments