Community
CFD Forum
Welcome to Autodesk’s CFD Forums. Share your knowledge, ask questions, and explore popular CFD topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

QT Script Getting Started Simulation CFD 2015 wrong/not updated?

4 REPLIES 4
Reply
Message 1 of 5
e1028439
653 Views, 4 Replies

QT Script Getting Started Simulation CFD 2015 wrong/not updated?

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!

Tags (2)
4 REPLIES 4
Message 2 of 5
marco.mueller
in reply to: e1028439

try "new" ?!

Dipl.-Ing. (FH) Marco Müller
Application Engineer Digital Simulation
Mensch und Maschine Deutschland GmbH
www.mum.de/cfd

Message 3 of 5
e1028439
in reply to: marco.mueller

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!)!

---

Message 4 of 5
ajay.kanade
in reply to: e1028439

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

 

 

 

 

Message 5 of 5
e1028439
in reply to: e1028439

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

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report