Python codes for open curve and dynamic modeller

Request for sample python codes for open curve and dynamical modeller

New at python and slicer.

RE open curve, would like to be able script the (a)options to snap at stl, (b) enable length measurement and (c) resample (with defined no. of points)

RE dynamic modeller, would like to be able to set options to set by default (a) select by points, (b) define model and fiducial node, selection distance and model of selected cells, amd then apply.

Please advise. Thank you.