Quantcast
Channel: Scripting - McNeel Forum
Viewing all articles
Browse latest Browse all 5938

Can't run Command from custom Python Command in Rhino 6

$
0
0

@LasseK wrote:

I have previously made some custom Python commands in Rhino 5, but when trying them out in Rhino 6, commands that calls commands in the Rhino Commandline doesn’t work anymore. Calling rhino commands from a python script directly in the Python editor works fine. I have tried with both rhinoscriptsyntax and RhinoCommon. Example of python command not working:

import rhinoscriptsyntax as rs

__commandname__ = "Test"

def RunCommand( is_interactive ):
    rs.Command("Line ")
    return 0

However calling this from the python editor works:

import rhinoscriptsyntax as rs

__commandname__ = "Test"

def RunCommand( is_interactive ):
    rs.Command("Line ")
    return 0
RunCommand(True)

And all other custom python commands without rs.Command("rhinocommand") works fine

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 5938

Trending Articles