Grasshopper

algorithmic modeling for Rhino

What is the C# equivalent of the VBScript print() command?

Views: 22159

Replies to This Discussion


I'm not very familiar with VB but I imagine in C# it's one of these:

 

System.Console.Write(msg) or

System.Console.WriteLine(msg)

That didn't work.

I am trying to send out data via the 'out' output of the C# module.

To do this in the VB module the command is print(msg)

It's also Print (notice the capital "P"), and you also need a string where there's the message. msg cannot be an integer, for example. Every object has a ToString() method in .Net. All methods (VB.Net Functions) should also be following Pascal capitalization, like ToString and Print.

Print("Ok");
Print(1.ToString());

- Giulio

______________

giulio@mcneel.com
McNeel Europe

Capital "P" did the trick.

Thanks

it does not work :(( with Print 

Rhino.RhinoApp.Write()

Rhino.RhinoApp.WriteLine()

are ways the print text into the Rhino command history window using VB.NET or C# from RhinoCommon.

--

David Rutten

david@mcneel.com

Poprad, Slovakia

th

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service