extracting the subtitle
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, ... |
Re: extracting the subtitle
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.
|
Re: extracting the subtitle
Is this rhyming-slang?
|
Re: extracting the subtitle
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.
|
Re: extracting the subtitle
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"; } |
Re: extracting the subtitle
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. |
Re: extracting the subtitle
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. |
All times are GMT -4. The time now is 05:03. |