#4471 Fill in "import rips" and other example code when creating a Python script from within ResInsight

This commit is contained in:
Gaute Lindkvist committed 2019-07-30 13:15:23 +02:00
1 parent 357c722b4b
commit 1d04f1034f
1 file changed
+5
@@ -114,6 +114,11 @@ void RicNewPythonScriptFeature::onActionTriggered(bool isChecked)
return;
}
else
{
QTextStream stream(&file);
stream << "# Load ResInsight Processing Server Client Library\nimport rips\n# Connect to ResInsight instance\nresInsight = rips.Instance.find()\n# Example code\nprint(\"ResInsight version:\" + resInsight.app.versionString())\n";
}
RicRefreshScriptsFeature::refreshScriptFolders();