CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > ParaView

PARAVIEW from C code: system(...)

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   February 24, 2007, 09:57
Default PARAVIEW from C code: system(...)
  #1
simone Marras
Guest
 
Posts: n/a
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
  Reply With Quote

Old   February 26, 2007, 08:57
Default Re: PARAVIEW from C code: system(...)
  #2
Renato.
Guest
 
Posts: n/a
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.

  Reply With Quote

Old   February 26, 2007, 09:36
Default Re: PARAVIEW from C code: system(...)
  #3
simone Marras
Guest
 
Posts: n/a
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
  Reply With Quote

Old   February 26, 2007, 11:44
Default Re: PARAVIEW from C code: system(...)
  #4
Renato.
Guest
 
Posts: n/a
>> 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.
  Reply With Quote

Old   February 26, 2007, 12:00
Default Re: PARAVIEW from C code: system(...)
  #5
simone Marras
Guest
 
Posts: n/a
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
  Reply With Quote

Old   February 26, 2007, 12:48
Default Re: PARAVIEW from C code: system(...)
  #6
Renato.
Guest
 
Posts: n/a
try it:

paraview --data=/MYPATH/file.vtk
  Reply With Quote

Old   February 26, 2007, 13:30
Default Re: PARAVIEW from C code: system(...)
  #7
simone Marras
Guest
 
Posts: n/a
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
  Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
The FOAM Documentation Project - SHUT-DOWN holger_marschall OpenFOAM 242 March 7, 2013 13:30
Open Source Vs Commercial Software MechE OpenFOAM 28 May 16, 2011 11:02
Paraview not found fusij OpenFOAM Installation 2 January 1, 2011 21:44
code for solving block tridiagonal system cfd Main CFD Forum 22 December 24, 2010 18:15
Distributed ParaView and PV3FoamReader micalil OpenFOAM Paraview & paraFoam 4 July 1, 2010 05:09


All times are GMT -4. The time now is 06:02.