CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > Siemens > STAR-CCM+

Macro execution

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 7, 2013, 12:36
Default Macro execution
  #1
New Member
 
Bastian Schammann
Join Date: Mar 2012
Posts: 5
Rep Power: 14
BastianS is on a distinguished road
Hello together,

at this time I got headache from my problem so I thought it´s time to ask you.

I´ve 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 i´ve 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
BastianS is offline   Reply With Quote

Old   May 2, 2013, 08:20
Default
  #2
Senior Member
 
Zeppo's Avatar
 
Sergei
Join Date: Dec 2009
Posts: 261
Rep Power: 21
Zeppo will become famous soon enough
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?
Zeppo is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
StarCCM+ Command line options and Macro execution isidp STAR-CCM+ 8 January 29, 2013 06:00
Pause macro execution ryancoe STAR-CCM+ 4 March 26, 2012 15:19
Macro Trouble -Winows Explorer Crashes with Macro Martin Castillo FLUENT 1 July 25, 2007 05:18
Macro problem cfddummy Siemens 1 April 9, 2007 13:37
Call a macro from a macro Flav Siemens 2 July 1, 2004 06:42


All times are GMT -4. The time now is 23:29.