# How to automate sending of .stl file from cad software to 3D Slicer by scripting

**URL:** <https://discourse.slicer.org/t/how-to-automate-sending-of-stl-file-from-cad-software-to-3d-slicer-by-scripting/11198>\
**Category:** Support\
**Created:** [April 20, 2020, 6:33am UTC](https://discourse.slicer.org/t/how-to-automate-sending-of-stl-file-from-cad-software-to-3d-slicer-by-scripting/11198 "2020-04-20T06:33:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rishikesh\_hase](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/rishikesh_hase/32/6610_2.png) [@rishikesh\_hase](https://discourse.slicer.org/u/rishikesh_hase)\
**Post date:** [April 20, 2020, 6:33am UTC](https://discourse.slicer.org/t/how-to-automate-sending-of-stl-file-from-cad-software-to-3d-slicer-by-scripting/11198/1 "2020-04-20T06:33:09Z")

</div>

How can I make a script in windows for transferring of .stl file from any folder or from CAD software to slicer automatically.

---

<div class="post-metadata">

**Author:** ![Sam\_Horvath](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/sam_horvath/32/3092_2.png) [@Sam\_Horvath](https://discourse.slicer.org/u/Sam_Horvath)\
**Post date:** [April 20, 2020, 1:28pm UTC](https://discourse.slicer.org/t/how-to-automate-sending-of-stl-file-from-cad-software-to-3d-slicer-by-scripting/11198/2 "2020-04-20T13:28:18Z")

</div>

To send from a script or application outside of Slicer, something like this would work:

```auto
Slicer.exe --python-code "slicer.util.loadModel( 'f/pth/to/model.stl' )" 

```

This will launch Slicer and load the requested stl model. To load models into an already launched Slicer, something like [this python snippet](https://www.slicer.org/wiki/Documentation/Nightly/ScriptRepository#Automatically_load_volumes_that_are_copied_into_a_folder) would work within Slicer to have it monitor a folder to automatically load items saved there.
