|
[Sponsors] |
September 21, 2001, 14:52 |
extracting the subtitle
|
#1 |
Guest
Posts: n/a
|
Is there a way to extract the subtitle from an existing case using a script? Usually cdsave can be used to get information about most settings in the .mdl file, but the subtitle is not saved there.
Next problem: is there a command to list all existing plla's with the contents, position, ... |
|
September 24, 2001, 09:45 |
Re: extracting the subtitle
|
#2 |
Guest
Posts: n/a
|
If you do a "status" while in the plot module, it will list all plla's with complete information. I don't think there is anyway to extract the subtitle.
|
|
September 24, 2001, 10:12 |
Re: extracting the subtitle
|
#3 |
Guest
Posts: n/a
|
Is this rhyming-slang?
|
|
September 25, 2001, 08:57 |
Re: extracting the subtitle
|
#4 |
Guest
Posts: n/a
|
You say that you use the cdsave command to get the model title. I assume that you open the generated .inp file and read the title from there. You could do something similar with a plot file or a postscript file generated out of it. Make a plot with at least the title and subtitle on it. As they are normally located at the same position, you can easily find out the location where the subtitle is generated in the plot or postscript file and then read it from there.
|
|
September 25, 2001, 09:09 |
Re: extracting the subtitle
|
#5 |
Guest
Posts: n/a
|
I already did it
Here is the perl script to extract title and subtitle from the plot file: #!/usr/bin/perl ################################################## #################### # (c) Joern Beilke , 2001 ################################################## #################### if (!defined $ARGV[0]) { print "USAGE : subtitle.pl casename\n"; exit; } my $casename = $ARGV[0]; open(IN , "<${casename}.plot") || die "Datei '${casename}.plot' ist nicht vorhanden"; @alles = <IN>; $text = join("",@alles); $text =~ s/\n//g; while ($text =~ /.*2,0.15,0.7,5,1,([\d]+),(.{120}).*/g) { $i = $1; $title = substr($2,0,$i); print "TITLE: $title\n"; } while ($text =~ /.*2,0.15,0.45,5,1,([\d]+),(.{120}).*/g) { $i = $1; $title = substr($2,0,$i); print "SUBTITLE1: $title\n"; } while ($text =~ /.*2,0.15,0.2,5,1,([\d]+),(.{120}).*/g) { $i = $1; $title = substr($2,0,$i); print "SUBTITLE2: $title\n"; } |
|
October 8, 2001, 12:40 |
Re: extracting the subtitle
|
#6 |
Guest
Posts: n/a
|
The line
@alles = ; must be changed to @alles = <IN>; The correct version was posted but one has to look at the html-source to get it. The "<IN>" was interpreted as a html-command. |
|
October 8, 2001, 13:17 |
Re: extracting the subtitle
|
#7 |
Guest
Posts: n/a
|
Even when I put in the correct html command to create the "less than" sign, it does not work correctly.
So please look at the "page source" to get the correct version. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
extracting the data | usker | Siemens | 1 | October 4, 2008 10:15 |
extracting output from the udf | brusly | FLUENT | 0 | April 25, 2008 02:10 |
Extracting Ux Uy and Uz from probed U | retech | OpenFOAM Running, Solving & CFD | 1 | January 7, 2008 10:31 |
Extracting data. | Sham | FLUENT | 2 | August 16, 2005 11:39 |
Extracting *.msh | Y | FLUENT | 7 | February 25, 2005 04:33 |