# Run a Pipeline
The following example will execute Simplygon on the current selection using a previously saved Pipeline.
-- load an asset
loadMaxFile "D:/Assets/SomeAsset.max"
-- select everything in scene
select $*
-- load previously saved pipeline
reductionPipeline = sgsdk_LoadPipeline "D:/Pipelines/reductionPipeline.json"
-- execute pipeline on selection,
-- returns result to Max once completed
sgsdk_RunPipelineOnSelection reductionPipeline
-- clear all pipelines that resides in memory
sgsdk_ClearPipelines()
# Next steps
Get to know how to work with Pipelines: