CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   ParaView (http://www.cfd-online.com/Forums/paraview/)
-   -   PARAVIEW from C code: system(...) (http://www.cfd-online.com/Forums/paraview/13039-paraview-c-code-system.html)

simone Marras February 24, 2007 09:57

PARAVIEW from C code: system(...)
 
Hello, I need to tell my code written in C that I want to view the grid I compute by launching Paraview from within the code by using the comman "system(...)".

The question is:

What script do I need to use when I call paraview and want it to open directly in the file of interest (analogoue to what "paraFoam" does when I type paraFoam <input> <output>)?

ex. system("paraview ...???...") so that paraview opens and directly open the file I want to look at

I hope the question is clear since I realize it seems quite tricky for my english!

Thank you

simone marras

Renato. February 26, 2007 08:57

Re: PARAVIEW from C code: system(...)
 
Just type paraview --help to see the available options. I guess that you can do what you want by simply using

paraview --data=<your_data_file>

cheers

Renato.


simone Marras February 26, 2007 09:36

Re: PARAVIEW from C code: system(...)
 
Hello Renato, thank you for the hint. I actually type paraview --data (in my case file99.vtk for ex), or also paraview --help but in both cases it just opens paraview without opening any file or any help options in the terminal.

I use the X11 to open it on the Mac osX

Thanks a lot

simone

Renato. February 26, 2007 11:44

Re: PARAVIEW from C code: system(...)
 
>> I use the X11 to open it on the Mac osX

It's not the best way for using PV if you've been using it remotely...

anyway, have you tried to write the full path of your data file with the --data option? Without the full path PV will try to look for the data file within the PV root directory (I guess).

Regards

Renato.

ps.: I tried here in a Windows machine and the --data option worked perfectly.

simone Marras February 26, 2007 12:00

Re: PARAVIEW from C code: system(...)
 
Hello Renato, this is what I actually put in X11:

> paraview /MYPATH/file.vtk

or even

> paraview --/MYPATH/file.vtk

but it still oopens PV without opening the file.vtk

Anyway, maybe it's because of my installation on my machine or it might be a Mac characteristc when running PV.

Thanks anyway. I let u know if I solve it in any other way

Regards,

Simone

Renato. February 26, 2007 12:48

Re: PARAVIEW from C code: system(...)
 
try it:

paraview --data=/MYPATH/file.vtk

simone Marras February 26, 2007 13:30

Re: PARAVIEW from C code: system(...)
 
Negative also this one. Im beginning to think it depends on the installation and architecture since you can get it to work on windows.

Thank you very much for trying to help;

are you italian for any chance?

Best regards,

simone


All times are GMT -4. The time now is 12:45.