Hey guys,
i am trying to get a basic Design Study set up with QT script, but not even the Getting Started Example is working...
With python i was able to find the files and read the code, so any differences between the docs and the code were not a huge problem, but with qt i am stuck...
I changed 2 lines in the Getting Started Example,
1)
>>> study.path = C:/models”; ---> study.path = C:/Users/<>/Desktop/sims”;
2)
>>> study.open(“poppet-valve.x_t”); ---> study.open(“teststudy.x_t”); (i also tried the full path, which is "C:/Users/<>/Desktop/sims/teststudy.x_t")
the message i get in the logfile is:
>> Creating new design study...
>> ERROR: Error: 'teststudy.x_t' is not a design study file
>> ERROR: <anonymous>()@C:/Users/<>/Desktop/sims/script.js:13
>> ERROR: Script failed
somehow study.open() does not load a cad file any more, but a study file... i tried "study.add()" too, which tells me "No active design study"...
Can anyone give me a working example of this Getting Started?
Cheers!
Dipl.-Ing. (FH) Marco Müller
Application Engineer Digital Simulation
Mensch und Maschine Deutschland GmbH
www.mum.de/cfd
Thanks for your reply,
but there is no "new()" on DesignStudy,
and:
---
s = new DesignStudy();
s.name = "Test";
s.path = "C:/Users/<>/Desktop/sims";
s.save(); <<--- This crashes the SimCFD process (Yes, folder exists!)!
---
Copy-paste from the documentation link is creating some bad characters. Also a "quote" is missing around C:/Models" (our bad).
Save the attached getting_started.script on your machine. Open Simulation CFD -> Design Study Tools -> Script Editor -> File -> Open -> getting_started.script. Tools -> Run should execute the script.
Below is what is happning in the script.
log.showConsole(); // used to debug scripts study = new DesignStudy; // gets handle to design study study.path = "C:/Models"; // sets the path for files to be loaded (geometry for example) study.name = "poppet"; // study name study.createFrom("poppet-valve.x_t"); // load geometry
You must have C:\Models\poppet-valve.x_t on your machine for the above to work.
study.open is used to open an existing design study (.cfdst file).
Feel free to ask scripting questions to me at ajay.kanade at autodesk.com
First of all,
thank you very much for your answer, i will try it as soon as i get back to my desktop machine.
Please allow me to mark your answer as solution myself,
once i got the time to test it, and it works.
Greetings