Autor Beitrag
Roboman
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 115

WinXP
Delphi 2005 Prof.; Delphi 6 Prof.; C++; C; Basic
BeitragVerfasst: So 17.12.06 11:17 
Servus Leute,
mich beschäftigt schon länger ein Problem. Ich möchte Daten aufnehmen (kein Problem) und die grafisch darstellen (auch kein Problem). Daten werden in einer *.dat Datei gespeichert und über eine *.plt-Datei von Gnuplot aufgerufen und grafisch dargestellt. Auch noch kein Problem. Sieht halt besser aus als mit Excel.

Die *.dat-Datei und die *.plt-Datei wird das kleinste Problem sein selbst zu erstellen. Wenn man die Befehle kennt. Aber stellt mich jetzt nicht wirklich vor ein Problem.

Jetzt kommt mein Problem. Wie kann ich z. B. in Delphi einen Button mit nem Befehl versehen, damit ich ein Programm wie z. B. Gnuplot starten kann, so dass das im Hintergrund läuft und mir dann meine Daten grafisch ausgibt.

Kurz als Info, mit dem Befehl load [Dateiname.plt] lade ich die entsprechende Skriptdatei in Gnuplot zum ausführen der Darstellung der Daten in einem Diagramm.

Ich hoffe es kann mir jemand helfen, auch wenn er Gnuplot nicht kennt, aber irgendwie sollte man doch Programme mit Übergabe von Parametern aufrufen können, oder nicht?

Ich wünsch euch schon mal einen schönen Sonntag und freue mich über jeden Kommentar.


Gruß aus der Eifel

Michael
Andreas L.
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1703
Erhaltene Danke: 25

Windows Vista / Windows 10
Delphi 2009 Pro (JVCL, DragDrop, rmKlever, ICS, EmbeddedWB, DEC, Indy)
BeitragVerfasst: So 17.12.06 11:50 
ausblenden Delphi-Quelltext
1:
 ShellExecute(0'open', PChar(extractfilepath(application.ExeName) + 'bla.exe'), pchar('param1'), nil, sw_show);					
Roboman Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 115

WinXP
Delphi 2005 Prof.; Delphi 6 Prof.; C++; C; Basic
BeitragVerfasst: So 17.12.06 12:24 
Servus Andreas,
danke für die Information, da hätte ich lange suchen können. Ich werde es direkt mal ausprobieren.

Muss ich dafür bei "uses" noch irgendwas spezielles einbinden?
klezmor
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 558


delphi 6 personal delphi 2005 personal
BeitragVerfasst: So 17.12.06 12:55 
Unter der VLC musst du noch unter uses: shellapi einbinden, wie das unter der CLX ist weiß ich leider nicht, aber nach ein wenig suche findest du das bestimmt.

_________________
"Beware of bugs in the above code; I have only proved it correct, not tried it." Donald Knuth
Roboman Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 115

WinXP
Delphi 2005 Prof.; Delphi 6 Prof.; C++; C; Basic
BeitragVerfasst: So 17.12.06 13:22 
Servus,
danke für den Hinweis. Leider öffnet sich das Programm nicht. Es kommt aber auch keine Fehlermeldung. Seltsam. Kann doch nicht so schwer sein. Hat eventuell schon jemand Erfahrung mit dem Programm "Gnuplot"?
Roboman Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 115

WinXP
Delphi 2005 Prof.; Delphi 6 Prof.; C++; C; Basic
BeitragVerfasst: Mi 27.12.06 15:18 
Servus Leute,
ich hab mich über die Feiertage mal hingesetzt und probiert. Leider vergeudete Zeit. Ein Kumpel hats mir gezeigt. GnuPlot muss mit der Pfad-Angabe und einer Umgebungsvariable eingetragen werden damit es funktioniert. Dumm gelaufen, hätte man auch von alleine drauf kommen können. ;)

Wünsche allen schon mal vorab einen guten Rutsch ins neue Jahr.
Roboman Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 115

WinXP
Delphi 2005 Prof.; Delphi 6 Prof.; C++; C; Basic
BeitragVerfasst: Mi 27.12.06 16:06 
Thema beendet
delphijanka
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 151

WinXP
D 2009 Arc., Java, C
BeitragVerfasst: Mi 14.10.09 12:25 
Roboman schreibt:

"GnuPlot muss mit der Pfad-Angabe und einer Umgebungsvariable eingetragen werden damit es funktioniert."

Meine Frage ist, wie man das macht. ich sitze nämlich am selben Problem und komme nicht weiter.
Roboman Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 115

WinXP
Delphi 2005 Prof.; Delphi 6 Prof.; C++; C; Basic
BeitragVerfasst: Fr 30.10.09 20:37 
Ja Servus,
sorry das ich jetzt erst antworte. Hab es gerade erst gesehen. Mensch, ist schon lange her. Aber ich denke das mit den Umgebungsvariablen war unter Windows, so das man dort den Verzeichnispfad für Gnuplot angeben musste. Hab das schon ewig nicht mehr gemacht, aber ich glaub so war das damals gewesen.

Viel Erfolg.
delphijanka
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 151

WinXP
D 2009 Arc., Java, C
BeitragVerfasst: Di 03.11.09 10:33 
@Roboman

Hallo. Hoffentlich verschwindest du jetzt nicht wieder :)
Also ich habe den Pfad für Hnuplot in den Umgebungsvariablen festgelegt, aber funktionieren tut es immer noch nicht. Etwas läuft wahrscheindlichen schief, und ich brauche die Hilfe ganz ganz dringend. Hoffentlich wirst du mir gute Tips geben können.
delphijanka
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 151

WinXP
D 2009 Arc., Java, C
BeitragVerfasst: Do 05.11.09 16:37 
Problem gelöst, habe ShellExecute falsch benutzt.

Folgender Aufruf ist richtig:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
ShellExecute(
0
'Open'
PChar(GNUPLOT_ADRESS + GNUPLOT_EXE), 
PChar(GNUPLOT_ADRESS + COMMAND_FILE), 
PChar(GNUPLOT_ADRESS), 
SW_SHOWNORMAL);


Moderiert von user profile iconKlabautermann: Delphi-Tags hinzugefügt