# Create Axes Model using CreateModels CLI

**URL:** <https://discourse.slicer.org/t/create-axes-model-using-createmodels-cli/674>\
**Category:** Development\
**Tags:** slicerigt\
**Created:** [July 11, 2017, 10:20pm UTC](https://discourse.slicer.org/t/create-axes-model-using-createmodels-cli/674 "2017-07-11T22:20:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![hgueziri](https://avatars.discourse-cdn.com/v4/letter/h/a587f6/32.png) [@hgueziri](https://discourse.slicer.org/u/hgueziri)\
**Post date:** [July 11, 2017, 10:20pm UTC](https://discourse.slicer.org/t/create-axes-model-using-createmodels-cli/674/1 "2017-07-11T22:20:02Z")

</div>

Hi all,

I trying to create a coordinate system model using CreateModels CLI called from a Python terminal. I tried the followings code (inspired from vtkSlicerCreateModelsLogic.h) but I could not guess what are the exact input/output parameters to give to the cli.

```
modelNode = slicer.mrmlScene.AddNewNodeByClass('vtkMRMLModelNode')
param = {'axisLength':20.0, 'axisRadius':2.0, 'modelNodeToUpdate':modelNode}
slicer.cli.run( slicer.modules.createmodels, 'CreateCoordinate', None, param, wait_for_completion=True )

```

Where can I find the documentation showing the input/output parameters of the createmodels CLI module (and to any given CLI module in general)?

Thanks,

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [July 11, 2017, 10:35pm UTC](https://discourse.slicer.org/t/create-axes-model-using-createmodels-cli/674/2 "2017-07-11T22:35:44Z")

</div>

It is not a CLI module but a loadable module. You can verify that by printing the module’s class name:

```
>>> slicer.modules.createmodels.className()
'qSlicerCreateModelsModule'

```

You can use loadable modules by calling methods of their logic class:

```
logic = slicer.modules.createmodels.logic()
logic.CreateNeedle(100,5,0,True)

```

To get a description of all methods and their parameters, type `help(logic)` and you get a description like this:

```
class vtkSlicerCreateModelsLogic(vtkSlicerModuleLogic)
 | vtkSlicerCreateModelsLogic - slicer logic class for creating simple
 | models
 |  
 | Superclass: vtkSlicerModuleLogic
 |  
 | This class contains methods that create model nodes useful for
 | setting up IGT scenes. These methods can be called from other
 | modules.
 |  
 ...
 | Methods defined here:
 |  
 | CreateCoordinate(...)
 | V.CreateCoordinate(float, float, vtkMRMLModelNode)
 | -> vtkMRMLModelNode
 | C++: vtkMRMLModelNode *CreateCoordinate(double axisLength,
 | double axisRadius, vtkMRMLModelNode *modelNodeToUpdate=NULL)
 |  
 | CreateCube(...)
 | V.CreateCube(float, float, float, vtkMRMLModelNode)
 | -> vtkMRMLModelNode
 | C++: vtkMRMLModelNode *CreateCube(double x, double y, double z,
 | vtkMRMLModelNode *modelNodeToUpdate=NULL)
 |  
 | CreateCylinder(...)
 | V.CreateCylinder(float, float, vtkMRMLModelNode)
 | -> vtkMRMLModelNode
 | C++: vtkMRMLModelNode *CreateCylinder(double height,
 | double radius, vtkMRMLModelNode *modelNodeToUpdate=NULL)
 |  
 | CreateNeedle(...)
 | V.CreateNeedle(float, float, float, bool, vtkMRMLModelNode)
 | -> vtkMRMLModelNode
 | C++: vtkMRMLModelNode *CreateNeedle(double length, double radius,
 | double tipRadius, bool markers,
 | vtkMRMLModelNode *modelNodeToUpdate=NULL)
 |  
 | CreateSphere(...)
 | V.CreateSphere(float, vtkMRMLModelNode) -> vtkMRMLModelNode
 | C++: vtkMRMLModelNode *CreateSphere(double radius,
 | vtkMRMLModelNode *modelNodeToUpdate=NULL)
 |  
 ...
```

---

<div class="post-metadata">

**Author:** ![hgueziri](https://avatars.discourse-cdn.com/v4/letter/h/a587f6/32.png) [@hgueziri](https://discourse.slicer.org/u/hgueziri)\
**Post date:** [July 11, 2017, 11:31pm UTC](https://discourse.slicer.org/t/create-axes-model-using-createmodels-cli/674/3 "2017-07-11T23:31:24Z")

</div>

Perfect. I’ll try that tomorrow.

Thanks Andras
