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

This commit is contained in:
Gaute Lindkvist 2019-07-30 13:12:19 +02:00
parent 357c722b4b
commit 1d04f1034f

View File

@ -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();