From a2626eb783159b99174a835c01aa7227146f5a3c Mon Sep 17 00:00:00 2001
From: Manuel Grizonnet <manuel.grizonnet@cnes.fr>
Date: Thu, 19 Oct 2017 14:30:10 +0200
Subject: [PATCH] BUG: EnableParameter method should be used to activate
 EmptyParameter in Python API in the ref documentation

---
 Documentation/Cookbook/Scripts/otbGenerateWrappersRstDoc.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Documentation/Cookbook/Scripts/otbGenerateWrappersRstDoc.py b/Documentation/Cookbook/Scripts/otbGenerateWrappersRstDoc.py
index 59019e33e2..70d55ce7c9 100755
--- a/Documentation/Cookbook/Scripts/otbGenerateWrappersRstDoc.py
+++ b/Documentation/Cookbook/Scripts/otbGenerateWrappersRstDoc.py
@@ -344,8 +344,8 @@ def GetApplicationExamplePythonSnippet(app,idx,expand = False, inputpath="",outp
             #app.SetParameterString(param,value)
             output+= "\t" + appname + ".SetParameterString(" + EncloseString(param) + "," + EncloseString(value) + ")" + linesep
         if paramtype == otbApplication.ParameterType_Empty:
-            app.SetParameterString(param,"1")
-            output+= "\t" + appname + ".SetParameterString("+EncloseString(param)+",\"1\")" + linesep
+            app.EnableParameter(param)
+            output+= "\t" + appname + ".EnableParameter("+EncloseString(param)+")" + linesep
         if paramtype == otbApplication.ParameterType_Int \
                 or paramtype == otbApplication.ParameterType_Radius \
                 or paramtype == otbApplication.ParameterType_RAM:
-- 
GitLab