[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/session.php on line 590: sizeof(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/session.php on line 646: sizeof(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/session.php on line 1068: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3843)
[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/session.php on line 1068: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3843)
[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/session.php on line 1068: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3843)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 113: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 5133: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3843)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 5133: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3843)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 5133: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3843)
Problem with TecUtilSystem() under Windows - Tecplot Talk

Problem with TecUtilSystem() under Windows

Tecplot's Add-on Developer's Kit

Moderators: davetaflin, salter, steve, jprenaud, straton, Chris Idso

[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1107: count(): Parameter must be an array or an object that implements Countable
tibetriver
Expert
Posts: 83
Joined: Fri Dec 22, 2006 3:45 pm
Location: Richland WA
Contact:

Problem with TecUtilSystem() under Windows

Postby tibetriver » Wed Jul 31, 2013 4:24 pm

I am trying to use the

TecUtilSystem() under Windows using the example given on the webpage description of

Use the polygrid utility supplied with Tecplot to translate a PolyGrid file to a Tecplot ASCII input data file.

IsOk TecUtilSystem("polygrid <sphere> sphere.dat", TRUE);


Under windows it does not work sphere.dat is not created, IsOk = TRUE, under Linux, no problem it works and creates the sphere.dat file. I am assuming the redirect symbols are not transmitted to the system correctly. Is there an escape sequence that would get this to work. I have tried using a \<and> that doesn't work either. Is there a trick to get this to work.

Thanks
Mike

JerimiahLee
Tecplot Employee
Posts: 81
Joined: Mon Oct 08, 2012 11:20 am
Location: Bellevue, WA
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1107: count(): Parameter must be an array or an object that implements Countable

Re: Problem with TecUtilSystem() under Windows

Postby JerimiahLee » Thu Aug 01, 2013 11:11 am

Hello Mike,

There are a few options that you could try.

1.) use the ^ to escape <and>
2.) Try using the full path to the exe
3.) Try creating a .bat file that contains the instructions to run polygrid. Call the bat file from the TecUtilSystem.

tibetriver
Expert
Posts: 83
Joined: Fri Dec 22, 2006 3:45 pm
Location: Richland WA
Contact:

Re: Problem with TecUtilSystem() under Windows

Postby tibetriver » Thu Aug 01, 2013 12:57 pm

1) polygrid ^<sphere>sphere.dat did not work
2) giving the complete path for polygrid did not work
3) straight batch file does not run,

Batch file will work if it is run using the cmd command

cmd /c batchfilename.bat will work,

sure would be nice if the redirections would work under windows, rather than having to write a batch file.

Mike

JerimiahLee
Tecplot Employee
Posts: 81
Joined: Mon Oct 08, 2012 11:20 am
Location: Bellevue, WA
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1107: count(): Parameter must be an array or an object that implements Countable

Re: Problem with TecUtilSystem() under Windows

Postby JerimiahLee » Thu Aug 01, 2013 2:13 pm

Mike,

Would you be able to provide us with a sample code that we can run some tests on?

tibetriver
Expert
Posts: 83
Joined: Fri Dec 22, 2006 3:45 pm
Location: Richland WA
Contact:

Re: Problem with TecUtilSystem() under Windows

Postby tibetriver » Thu Aug 01, 2013 3:01 pm

I sent the c code used on the windows machine in an email to support, I also included a tarball from the linux machine. If you don't get it let me know

JerimiahLee
Tecplot Employee
Posts: 81
Joined: Mon Oct 08, 2012 11:20 am
Location: Bellevue, WA
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1107: count(): Parameter must be an array or an object that implements Countable

Re: Problem with TecUtilSystem() under Windows

Postby JerimiahLee » Tue Aug 06, 2013 9:11 am

There does appear to be an issue with that command in Windows. A change to the Tecplot engine will be required to fix it. The command line work-around mentioned above will work.

If you have access to edit the source code for the executable another alternative would be to change the executable to take filenames as parameters and open them for reading and writing (instead of using stdin and stdout.)

The system command would be instead
runmyprogram infile outfile

There is currently no ETA on this fix.

tibetriver
Expert
Posts: 83
Joined: Fri Dec 22, 2006 3:45 pm
Location: Richland WA
Contact:

Re: Problem with TecUtilSystem() under Windows

Postby tibetriver » Sun Aug 11, 2013 9:38 pm

Further research has allowed me to find a a way to do this. The correct syntax under windows would be

cmd /c polygrid <sphere> sphere.dat

if polygrid is not in your path then the syntax would be

cmd /c "c:/Program Files/polygrid" <sphere> sphere.dat

The trick is to first invoke the cmd /c.

The alternative is to rewrite polygrid with arguments instead of redirection.

Mike

JerimiahLee
Tecplot Employee
Posts: 81
Joined: Mon Oct 08, 2012 11:20 am
Location: Bellevue, WA
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1107: count(): Parameter must be an array or an object that implements Countable

Re: Problem with TecUtilSystem() under Windows

Postby JerimiahLee » Tue Aug 13, 2013 11:09 am

Thanks for the update Mike.

I'll pass this information along.


[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1107: count(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1107: count(): Parameter must be an array or an object that implements Countable

Return to “Add-on Developer's Kit (ADK)”

Who is online

Users browsing this forum: No registered users and 4 guests