Controlling and Saving Data a Multibody produced...
Hi...
...I am looking for a smart way to see what some joints of a multibody object are doing. I thought about an iteration method that shows me the data in the main breve window and perhaps storing the data in a file. Right now i am not doing so well in this task so i would be happy about some ideas or suggestions. ;)
Mfg, David.

File class, or text commands in Control class
Check out the documentation for the File class, or look at the text methods in the Control class.
Also check out the Creatures demo for an example of how to add real-time text to the output display.
- jon
Done...
Done that, thanks for the tip...
Now i have a "live" data report in the log window that works via an iteration method.
The desired data is also feed into a list. But here i have a problem withe the archive command. I want to save the list but with this line:
legData(<-- list name) archive-as-xml file "legData123.xml".
i get a crash at the end of the program when it should save the data list (i wrote it in the "to destroy" method). It works fine with the self command:
self archive-as-xml file "legData123.xml".
but then i have tons of data i am not interested in. Is there a way to save >only< the list and not the hole program with all its objects etc.?
Mfg, David.
Can you give a bit more
Can you give a bit more detail about the crash? What error messages do you get ?
- jon
The program runs normal
The program runs normal until i stop it. Then the list full of the desired data should be saved, but instead i get a small window with the standard error message: "breveIDE.has detected a problem and needs to be quit" (i hope i translated that right?)
First detail window shows this:
AppName: breveide.exe AppVer: 0.0.0.0 ModName: breveide.exe
ModVer: 0.0.0.0 Offset: 005ddef8
The text from the second detail window can't be copied and i didn't find the saved-error-text on my hdd. (need a coup of coffee first i think...)
If i can help you with posting the whole program just tell me and i will do so. Thanks for your help so far.
Mfg, David.
sounds like a breve bug
Any crash triggered by a simulation is a bug in breve -- if you could send me your simulation file, I could run it and debug the problem.
As a side note, the command you're using:
legData(<-- list name) archive-as-xml file "legData123.xml".
... will probably not do what you want -- it will sequentially archive each element of the list to the same file (legData123.xml), meaning that when it's done, you'll only have the last element archived (the archive fully overwrites any existing files).
Instead, you'd want to iterate through the list, and archive each leg to a different file. Or, alternatively, you could have a class wrapper that holds the leg data (and has dependencies on the objects). Then you could archive it as a single call.
-- jon
- jon
Program...
Hi...
...i hope you had a relaxing weekend :). I wrote an email with my sim attached to jk@artificial.com. Thanks a lot for your help.
Mfg, David.
legData is a list of vectors
Okay, the problem is that you can't call methods on a list of vectors (legData). The crash is a bug in breve -- it should be printing out an error there instead. I've fixed that now.
The solution to the problem you're having is to place that list of vectors into a utility container class and archive that container:
container set-list to legData.
container archive-as-xml file "legData.xml".
- jon