Ms. Haipeng Liu
-
Content Count
6 -
Joined
-
Last visited
Posts posted by Ms. Haipeng Liu
-
-
Hi Joerg, thanks a lot for your sample. It helps a lot!
-
Hi Haipeng,
you have to write a feature inside the project, which writes a file. This can be the code for the feature:
ffile file(getResultsDir()+"/"+filename) if (!file.openWrite()) echo("Failed to open file \"" + file.getAbsolutePath() + "\" for writing") break() endif // use file.write() or file.writeLine() to write to the file. file.writeLine(""+p:x+"\t"+p:y+"\t"+p:z) //close file when done with it file.close()
To write this code I simply used the feature templates.
Then in the fsc script you have to write a line:
exportFile.run()
This will update the feature and trigger the export.
best regards
Carsten
Thanks a lot for your advice. It works well in my project.
-
Hi Caeses Team,
I used the batch file to export geometry before. Now I want to export a x value of the point into an excel or text. How could I write this programming command inside the .fsc file?
Many thanks!
-
Dear Haipeng,
Have you tried to export the hull form, and to close the project and also CAESES after all (as shown in that post you've mentioned)? See this screenshot again: sweepfsc.png
It seems that the project gets opened, and maybe the value has been set. But in your fsc-file, there is nothing else such as an export or closing CAESES again. Running CAESES in batch mode should be super easy, so maybe there is a problem that I haven't seen yet in your setup?!
Dear Joerg,
Thank you very much for your reply!
I had those export and closing information at the end. Because the input information is long so I didn't show this part in last example. If I run the batch file manually, I don't have any problem in getting the new hullform. The problem is when I link the .fsc file to VBA, batch file stopped before opening the project in CAESES.
I am eager to link the batch file to ModeFrontier, do you know any other way to do this?
Thanks a lot for the help in advance!
-
Hi CAESES Team,
I was trying to use CAESES software as a hullform generator.The parametric model has been generated already. The next step is to link the CAESES with another optimisation software ModeFrontier through Visual Basic Application in Excel.
This is the reference I used:
https://www.caeses.com/forum/index.php?/topic/284-batch-mode/%3fview=getnewpost
In VBA, "Shell" function is used to run the batch file. But the process stopped before the batch file trying to open CAESES software (I put all the files in a same folder already).
Image 1: run batch file manually
Image 2: run batch file through VBA (stopped with this status)
Image 3: .bat
Image 4: input (.fsc)
I am wondering, is there any special reference or setting I should add in controlling CAESES automation?
I got stuck in this problem for a few days. Could someone help me to solve this problem? Thank you very much!
export result in excel though batch mode
in Post-Processing
Posted · Report reply
Hi Carsten and Joerg,
Is that possible to write the result into an existing excel instead of a new .txt?