I hope so too.
I would like to enter a numerical value inside the rhino.command .
Maybe someone will be able to implement it. I can not.
I hope so too.
I would like to enter a numerical value inside the rhino.command .
Maybe someone will be able to implement it. I can not.
Thanks
It’s not my works, so we have to thank the Javier ![]()
Here is another option, with prompt for the length in the middle of the command:
-_Runscript (
Call Rhino.Command("_Line _BothSides _Pause _NoEcho -RunScript (" & chr(13) & "Dim r : r=Rhino.GetReal(""Line length?"") : if not isnull(r) then Rhino.SendKeystrokes(Cstr(r/2))" & chr(13) & ")")
)
Note if you want to skip typing the number, just hit Enter or RMB to pick the distance by mouse;
Also, if you need another option like Perpendicular etc. you would need to modify the above by either adding another _Pause after the first _Pause or the actual option like _Perpendicular etc.
hth,
–jarek
Jarek Hello!
Job well done! 
I like
Many thanks!!
The only thing
When torsional mouse wheel (MMB) to change the size of the scene fades sight (first point)
Thanks Jarek…you’ve helped me before. works for me.
I see, not much can be done about it I’m afraid; this is pretty hacky way of making it work already ![]()
pretty far off topic but…
here’s a python script i use for multiple curve extrusions:
ExtrudeMulti.py (2.6 KB)
the reason i’m posting it is because when extruding bothSides, it works the way being requested in this thread…
the entered distance will be the overall distance of the extrusion as opposed to each side extruding this amount.
Hello Jarek, This version " -_Runscript (
Call Rhino.Command("_Line _BothSides _Pause _NoEcho -RunScript (" & chr(13) & “Dim r : r=Rhino.GetReal(”“Line length?”") : if not isnull® then Rhino.SendKeystrokes(Cstr(r/2))" & chr(13) & “)”)
) " Runs as intended (asks for midpoint and then input total distance) in Rhino 5, but works as normal “Line from Midpoint” in Rhino 6. Can you please have a look if you have the time? I use the command every day. PS the other version (input distance and then click midpoint works in both Rhino 5 and 6 " _-runscript (
setlocale 1033
Lng= rhino.getReal()
rhino.command “_Line _BothSides _pause " & Lng/2 &” _pause "
Thank you EtRec
) "
I see that when I deleted and re-pasted the script to the button I made, it worked again. It seems that you have to delete and past the script every time rhino 6 is started to make it work.
This seems to work here fine, on every attempt, when pasted as button macro.
What Rhino version are you using (SR?). In some previous versions there was a problem with executing nested RhinoScript commands, but now it should all be fixed.
-_Runscript (
Call Rhino.Command("_Line _BothSides _~Pause _NoEcho -RunScript (" & chr(13) & "Dim r : r=Rhino.GetReal(""Line length?"") : if not isnull(r) then Rhino.SendKeystrokes(Cstr(r/2))" & chr(13) & ")")
)
–jarek
Thank you for your reply. I am using the latest version of Rhino 6 (6.11.18348.17061, 12/14/2018) and the button macro (copied yours to make sure) only acts like a regular line from midpoint now (if I input 1mm, I get a 2mm line).
Hi @Et_Rec - I installed SR11 to check this and see that the number that is used is not divided by 2. It appears that something was fixed after SR11 - this works in a current in-house version the way it used to in Rhino 5.
I’m not sure which version @Jarek is running at the moment but I would assume that if you check for Release Candidates and install a SR12 candidate that this will solve your issue.
HTH,
w
Thank you
I am on daily builds so SR13 here but I believe this should have been fixed in SR12 by Steve, so SR12 Release Candidate should make it work again.
–jarek
Works in SR13…
-Pascal
Hi this seems to have stopped working in the latest Rhino build “(6.29.20238.11501, 08/25/2020)” I get a message that rhino script can’t be loaded at start. It’s a button I use multiple times a day. Can anyone help me out. Thanks!
Works in Rhino 7 and 5
Hello - please try running a ‘Repair’ for the Rhino 6 installation from the Windows control panel.
-Pascal
Thanks for replying I did a repair as described. Did not work. Today I did Macrium backup rescue to a time before the problem and then updated Rhino. No problem like that now. Don’t know what happened. Thanks again