rs.AddLeader problem

I couldn’t find out how to create a leader from script. Currently I’m using Rhino 7.
got the same problem with

rs.AddText(rs.AddText(“Hello Rhino!”, (0,0,0)))

I’ve tried all the codes at this post.

Any suggestions?

It works if launched by th Rhino Python Editor

Thank you


See this post:

Thank you @AndersDeleuran

  • how to recognize command in RhinoScriptSyntax that need scriptcontext?, and
  • the leader and the text aren’t dynamic. Are there other command to do that?

You can usually tell by the output window error message (refer to your screenshots). Other times it depends on what you’re trying to do. For instance, rs.AddPoint will simply return a point (i.e. that exists only in memory), but if you change the script context to target the Rhino document first it will “bake” the point (i.e. add it to the Rhino document).

Afraid I don’t know. But, you can inspect the rs.AddText source code and see what it’s actually doing.