Make ParView run detached

A subforum specific to the development of the OpenFoam-based workbenches ( Cfd https://github.com/qingfengxia/Cfd and CfdOF https://github.com/jaheyns/CfdOF )

Moderator: oliveroxtoby

Post Reply
ReneSci
Posts: 23
Joined: Thu Aug 18, 2022 4:30 pm

Make ParView run detached

Post by ReneSci »

In the "Analysis Control":
ParaView is started by pressing "Paraview" - when the user then presses "Close",
2022-11-01 12_54_07-FreeCAD 0.20.1.png
2022-11-01 12_54_07-FreeCAD 0.20.1.png (7.14 KiB) Viewed 1369 times
then Paraview is also closed.
Could this be changed so Paraview continues to run ?

Code: Select all

OS: Windows 10 Version 2009
Word size of FreeCAD: 64-bit
Version: 0.20.1.29410 (Git)
Build type: Release
Branch: releases/FreeCAD-0-20
Hash: f5d13554ecc7a456fb6e970568ae5c74ba727563
Python 3.8.10, Qt 5.15.2, Coin 4.0.1, Vtk 8.2.0, OCC 7.6.3
Locale: Danish/Denmark (da_DK)
Installed mods: 
  * A2plus 0.4.60
  * ArchTextures
  * Assembly4 0.12.4
  * CfdOF 1.19.4
  * Defeaturing 1.2.0
  * Dracula 0.0.2
  * ExtremeProDark 2.5.3
  * IconThemes
  * lattice2 1.0.0
  * Manipulator 1.4.9
  * MeshRemodel 1.8919.0
  * parts_library
  * Plot 2022.4.17
  * sheetmetal 0.2.58
  * workfeature
Last edited by ReneSci on Tue May 23, 2023 7:08 am, edited 1 time in total.
markrmau
Posts: 37
Joined: Fri Jan 03, 2020 4:03 am

Re: Change suggestion

Post by markrmau »

If you edit the following file with a text editor:

Code: Select all

%AppData%\FreeCAD\Mod\CfdOF\CfdOF\Solve\TaskPanelCfdSolverControl.py
Remove the following line (roughly line 107) and restart freecad...

Code: Select all

self.open_paraview.terminate()
It will never close the paraview session. Note that you could then open multiple paraview sessions.

The same thing could be done with the paraview mesh viewer for consistancy. Not sure if there would be any objections for this change - perhaps others could comment if this would cause problems?
User avatar
adrianinsaval
Veteran
Posts: 5541
Joined: Thu Apr 05, 2018 5:15 pm

Re: Change suggestion

Post by adrianinsaval »

perhaps do this as a configurable option?
ReneSci
Posts: 23
Joined: Thu Aug 18, 2022 4:30 pm

Re: Change suggestion

Post by ReneSci »

Thanks for the help :-)
chrisb
Veteran
Posts: 53934
Joined: Tue Mar 17, 2015 9:14 am

Re: Change suggestion

Post by chrisb »

@ReneSci, would you mind changing the subject of the first post which is also the title of the topic to something more descriptive by adding what it is about?
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
oliveroxtoby
Posts: 812
Joined: Fri Dec 23, 2016 9:43 am
Location: South Africa

Re: Change suggestion

Post by oliveroxtoby »

ReneSci wrote: Tue Nov 01, 2022 12:01 pm In the "Analysis Control":
ParaView is started by pressing "Paraview" - when the user then presses "Close",
2022-11-01 12_54_07-FreeCAD 0.20.1.png
then Paraview is also closed.
Could this be changed so Paraview continues to run ?
Yes, I had been meaning to do this. It now runs detached.
Post Reply