Rhinoscriptsyntax Command method

I am trying to get the camera to follow along a curve using the rhinoscriptsyntax Command method and using the SetFlythroughAnimation command, however whenever I call upon this method Rhino does not recognize the command. There is no issue with the command when just doing the command through a python script, but when I try to use the command through a plugin created in Visual Studio (using the Rhino.Runtime.PythonScript.Create() ) and ExecuteFile method the command is not recognized.

Hi @sc2228,

Does this help?

– Dale

Sorry to clarify the issue , my problem is that I am trying to run a Python file from my C# plugin using Rhino.Runtime.PythonScript.ExecuteFile() method
When running the script it works all the way until using the rhinoscriptsyntax.Command method (placing the camera in the direction on the curve to start following along the curve)


When the command tries to run via Rhino it outputs this error in the command prompt
rhino
Unfortunately the article does not help with the solution

Hi @sc2228,

Are you executing the Python script from a command in your plug-in? If so, then please try my suggestion.

Thanks,

– Dale

Thank you I was just missing the attribute in my plug in!

Hello again!

I have a follow up question. Is using RunScript the best / recommended way to do rendering? I did look into Rhino.Render but was unsure about some of the method usage (i.e. AsyncRenderContext)

From a script, yes.

– Dale