Alternative to SelID

Hi,

I have a small script that lets me trim a mesh by creating a curve on the mesh then trims it using _SplitMeshWith Curve

import rhinoscriptsyntax as rs
Model=rs.GetObject('Select Mesh',32)
rs.Command("_Curve " + "Degree=3 " + "PersistentOnMesh " + "Selid " + str(Model) + "_Enter ")
CuttingLine=rs.LastCreatedObjects()
rs.Command("_SplitMeshWithCurve " + "selid " + str(Model) + "_Enter " + "selid " + str(CuttingLine[0]) + " _Enter ")

This has been working well but recently I have been working on a mesh with a very high point density and the “selid” call forces the object to be selected in yellow and leaves me unable to see the contours of the mesh to place the curve. Doing this manually does not keep the mesh selected. Is there an alternative way to script this so that the object is not selected whilst the curve is being created?

Before:

After:

Thanks

why not just unselectall after you pick the mesh? you saved the ID anyway in Model.

Hi Jordy,

It is not the “rs.GetObject” command that keeps the object selected, it is “Selid.” Is there another way to feed the GUID into the command line without selecting the object?

Thanks

Yeah I notice. Somehow it gets selected but when you do it manuel not…