thank you very much for your super fast reply.
I don’t know so much about scripting. I tried to use the script as button script, because I like to collect all my tools in a toolbar easy to transfer to an other Rhino install in the future. So I tried this one, but it run without any interaction. Do you have an idea what I did wrong?. :
Rhino.AddAlias “DistToCamera”, “! _NoEcho _-Runscript (DistToCamera)”
pt = Rhino.GetPoint(“Pick point on object”)
If Not IsArray(pt) Then Exit Sub
dist = Rhino.Distance(pt, Rhino.ViewCamera())
units = Rhino.UnitSystemName(, True)
prec = Rhino.UnitDistanceDisplayPrecision()
msg = "Distance from pick point to camera is "
Call Rhino.Print(msg & Cstr(Round(dist, prec)) & " " & units)