CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   STAR-CCM+ (http://www.cfd-online.com/Forums/star-ccm/)
-   -   Macro execution (http://www.cfd-online.com/Forums/star-ccm/115806-macro-execution.html)

BastianS April 7, 2013 11:36

Macro execution
 
Hello together,

at this time I got headache from my problem so I thought its time to ask you.

Ive recorded a Macro in Java (a very simple one to create a geometry, mesh it and afterwards run a simulation).

I also used Netbeans to create a GUI with a "Simulation" Button. So as you know ive got two classes (both in the same package).

When the button is pressed the simulation shall start.

Class ONE: Macro code recorded from java with "execute0" for the methode to create geometry, mesh and run simulation.

Class TWO: GUI with "Simulation" Button.

I used in Class TWO:

ONE start = new ONE();
...
...
...
SimulationButtonActionPerformed(...){

start.execute0();

}


If I run the macro the GUI is shown correctly. BUT I always get a Nullpointerexception at

CadModel cadModel_0 =
simulation.get(SolidModelManager.class).createSoli dModel();


Can you please help me with this problem.

Thanks a lot in advance

Best regards,

Bastian

Zeppo May 2, 2013 07:20

Have you tried running your macro file with class ONE? Click the button "Play Macro" and select the file ONE.java. Does it work properly? Could you show all the jave-code of your class ONE declaration?


All times are GMT -4. The time now is 16:22.