Robo Pro Coding Übernahme von Funktionen von einem Projekt ins andere
Forumsregeln
Bitte beachte die Forumsregeln!
Bitte beachte die Forumsregeln!
Robo Pro Coding Übernahme von Funktionen von einem Projekt ins andere
Hallo Zusammen,
vielleicht bin ich ja zu alt oder zu dämlich, aber gibt es eine einfache Möglichkeit schon einmal in einem Projekt definierte Funktionen in ein neues Projekt zwecks Wiederverwendung zu importieren ohne die Funktionen immer wieder neu zu erstellen. Mit einem Mac bekomme ich z.B. eine FT Projektdatei entpackt und sehe auch dort die einzelnen Dateien z.B. im lib Verzeichnis. Ich bekomme aber keine funktionstüchtige Datei wieder gepackt die ich dann mit Robo Pro Coding wieder importieren kann.
vielleicht bin ich ja zu alt oder zu dämlich, aber gibt es eine einfache Möglichkeit schon einmal in einem Projekt definierte Funktionen in ein neues Projekt zwecks Wiederverwendung zu importieren ohne die Funktionen immer wieder neu zu erstellen. Mit einem Mac bekomme ich z.B. eine FT Projektdatei entpackt und sehe auch dort die einzelnen Dateien z.B. im lib Verzeichnis. Ich bekomme aber keine funktionstüchtige Datei wieder gepackt die ich dann mit Robo Pro Coding wieder importieren kann.
Re: Robo Pro Coding Übernahme von Funktionen von einem Projekt ins andere
Wenn ich mich recht erinnere, habe ich entpackt, ungewünschte Inhalte entfernt, das ganze wieder gezippt, von .zip in .ft umbenannt und die entstandene Datei erfolgreich laden können.
Du solltest also ein Projekt entpacken, eine Library von einem anderen Projekt hineinkopieren, dann wieder packen und umbenennen können.
Ob das elegant ist, ist eine andere Frage...
Schönen Abend
Techum
+ unter Windows
Du solltest also ein Projekt entpacken, eine Library von einem anderen Projekt hineinkopieren, dann wieder packen und umbenennen können.
Ob das elegant ist, ist eine andere Frage...
Schönen Abend
Techum
+ unter Windows
Zuletzt geändert von Techum am 11 Jan 2022, 20:02, insgesamt 1-mal geändert.
Re: Robo Pro Coding Übernahme von Funktionen von einem Projekt ins andere
Wäre es in Anknüpfung des Vorschlags von Zungara ein gangbarer Weg eine bestimmte Funktionalität herauszustellen und unter eigenem Namen zu speichern?
Dann kann diese Funktionalität einzeln hinzugefügt werden, wenn sie gebraucht wird.
Dann kann diese Funktionalität einzeln hinzugefügt werden, wenn sie gebraucht wird.
- KarlKarlson
- Beiträge: 10
- Registriert: 29 Nov 2021, 17:22
Re: Robo Pro Coding Übernahme von Funktionen von einem Projekt ins andere
Die bequemste Möglichkeit Funktionen zu übernehmen, die ich kenne, ist per Copy&Paste.
Also entweder über Rechtsklick "Kopieren" und "Hier einfügen" oder klassisch über Strg+C und Strg+V. Es scheint allerdings so als könnte man das nur in der gleichen Instanz von ROBO Pro Coding nutzen, d.h. Funktion aus bestehendem Projekt kopieren, neues Projekt anlegen oder ein bestehendes importieren und dort die Funktion einfügen. Ich hoffe man versteht, was ich meine, ansonsten schreibe ich es noch mal detaillierter.
Also entweder über Rechtsklick "Kopieren" und "Hier einfügen" oder klassisch über Strg+C und Strg+V. Es scheint allerdings so als könnte man das nur in der gleichen Instanz von ROBO Pro Coding nutzen, d.h. Funktion aus bestehendem Projekt kopieren, neues Projekt anlegen oder ein bestehendes importieren und dort die Funktion einfügen. Ich hoffe man versteht, was ich meine, ansonsten schreibe ich es noch mal detaillierter.
Re: Robo Pro Coding Übernahme von Funktionen von einem Projekt ins andere
Only inside a project.
Copy past between .py files in a project, select object, right mouse klick: change .py module, right mouse click:
Copy past between .py files in a project, select object, right mouse klick: change .py module, right mouse click:
- MasterOfGizmo
- Beiträge: 2722
- Registriert: 30 Nov 2014, 07:44
Re: Robo Pro Coding Übernahme von Funktionen von einem Projekt ins andere
He was explicitly asking for a way to copy between projects and the other posters have already answered with useful replies.
Arduino für fischertechnik: ftDuino http://ftduino.de, ftDuino32 http://ftduino.de/32
Re: Robo Pro Coding Übernahme von Funktionen von einem Projekt ins andere
So hatte ich mir das auch vorgestellt. Funktioniert bei mir leider nicht. Wenn ich den entpackten Ordner unter einem neuen Namen wieder packe kommt dann auch ein nettes Zip-Archiv heraus. Wenn ich dieses dann umbenenne (xyz.ft) und auch in den Preferencen angebe das dies eine FT-Datei ist die mit ROBO Pro Coding zu öffnen ist bekomme ich unter Robo Pro Coding die Fehlermeldung "Dieses Projekt ist defekt und kann nicht repariert werden"Wenn ich mich recht erinnere, habe ich entpackt, ungewünschte Inhalte entfernt, das ganze wieder gezippt, von .zip in .ft umbenannt und die entstandene Datei erfolgreich laden können.
Du solltest also ein Projekt entpacken, eine Library von einem anderen Projekt hineinkopieren, dann wieder packen und umbenennen können.
Ob das elegant ist, ist eine andere Frage...
Re: Robo Pro Coding Übernahme von Funktionen von einem Projekt ins andere
Für eine Funktion geht es tatsächlich Projekt übergreifend. (Library Projekt importieren, Funktion kopieren, Zielprojekt importieren, Datei erstellen, Funktion einfügen, Ziel Projekt exportieren. Und der Spaß geht von vorne los) Eine Sammlung von Funktionen geht leider nicht! Da mit macht wieder verwenden von Code aber überhaupt keinen Spaß!Die bequemste Möglichkeit Funktionen zu übernehmen, die ich kenne, ist per Copy&Paste.
Also entweder über Rechtsklick "Kopieren" und "Hier einfügen" oder klassisch über Strg+C und Strg+V. Es scheint allerdings so als könnte man das nur in der gleichen Instanz von ROBO Pro Coding nutzen, d.h. Funktion aus bestehendem Projekt kopieren, neues Projekt anlegen oder ein bestehendes importieren und dort die Funktion einfügen. Ich hoffe man versteht, was ich meine, ansonsten schreibe ich es noch mal detaillierter.
Re: Robo Pro Coding Übernahme von Funktionen von einem Projekt ins andere
It is possible to open a .blockly XML file and copy/past parts of it into a new project.
However this ask a certain study of the structure and good understanding of the relations between the Blockly variable defined in other Blocklies.
The accompanying .py files is generated and not used when the project has been loaded into the development environment.
So copying parts of a project into a different project is possible but not obviously.
Here you can find the Blockly namespace definition file:
https://developers.google.com/blockly/r ... lockly.Xml
https://developers.google.com/blockly
However this ask a certain study of the structure and good understanding of the relations between the Blockly variable defined in other Blocklies.
The accompanying .py files is generated and not used when the project has been loaded into the development environment.
So copying parts of a project into a different project is possible but not obviously.
Here you can find the Blockly namespace definition file:
https://developers.google.com/blockly/r ... lockly.Xml
https://developers.google.com/blockly
Re: Robo Pro Coding Übernahme von Funktionen von einem Projekt ins andere
hi,
The problem must before. Perhaps it is a Mac special problem. I take a woking file like "test.ft". Then I uncompress this file. I get folder with some files. In the main directory there are 2 files. One "blocky" File and one "Python" file. And another Folder called "lib" The minimum file inside "lib" is controller.blockly and controller.py. So fare....
Now I compress the folder "Test" and I got the File "Test.zip" I rename the file "test.zip" into "test.ft". Now I try to import this file into Robo Pro Coding and I got the Error that the file is defect and cannot repaired.
The problem must before. Perhaps it is a Mac special problem. I take a woking file like "test.ft". Then I uncompress this file. I get folder with some files. In the main directory there are 2 files. One "blocky" File and one "Python" file. And another Folder called "lib" The minimum file inside "lib" is controller.blockly and controller.py. So fare....
Now I compress the folder "Test" and I got the File "Test.zip" I rename the file "test.zip" into "test.ft". Now I try to import this file into Robo Pro Coding and I got the Error that the file is defect and cannot repaired.
Re: Robo Pro Coding Übernahme von Funktionen von einem Projekt ins andere
I saved both projects in the gitlab (fischertechnik cloud) and does the copying in gitlab.
After that I was able to reload the second project.
And the second project was working fine.
So it is possible.
After that I was able to reload the second project.
And the second project was working fine.
So it is possible.
Re: Robo Pro Coding Übernahme von Funktionen von einem Projekt ins andere
Yes it is. I is a Mac problem. With Windows it was possible to unzip the file and to add some files and than to zip it again and to import it to RoboPro Coding.
I think the problem is the missing json file.
I think the problem is the missing json file.
Re: Robo Pro Coding Übernahme von Funktionen von einem Projekt ins andere
Or maybe character coding?
Re: Robo Pro Coding Übernahme von Funktionen von einem Projekt ins andere
I do not know. I make the invisible files visible (Apfel Shift Punkt) I compress the Folder again. Now the json file is inside the archive. I rename the file from zip to ft. I check that the renaming is correct (not *.ft.zip common problem) Import the file but Robo Pro Coding still tells me that the file is corrupted