Skip to content

Latest commit

 

History

History
35 lines (25 loc) · 1.1 KB

adding_steppable_to_simulation_using_twedit++.rst

File metadata and controls

35 lines (25 loc) · 1.1 KB

Adding Steppable to Simulation using Twedit++

In the above example Python steppable was created by a simulation wizard. But what if you want to add additional steppable? Twedit++ lets you do it with pretty much single click. In the CC3D Project Panel right-click on Steppable Python file and choose Add Steppable option:

image7

Figure 8 Adding seppable using Twedit++

The dialog will pop up where you specify name and type of the new steppable, call frequency. Click OK and new steppable gets added to your code.

image8

Figure 9 Configuring basic steppable properties in Twedit++.

Notice that Twedit++ takes care of adding steppable registration code in the main Python script:

from cellsortingSteppables import MyNewSteppable
instanceOfMyNewSteppable=MyNewSteppable(_simulator=sim,_frequency=1)
steppableRegistry.registerSteppable(instanceOfMyNewSteppable)