algorithmic modeling for Rhino
Hi all,
I have a small problem using the Print Function (Reflect too). When I have a custom class like this: I wont be able to use print function inside that sub. Error Returned: Reference to a non-shared member requires an object reference.
Thanks A lot.
Victor
Public Class VertPackage
Public PosH As Integer
Public PosV As Integer
Public Sub New(ByVal PosH_IP As Integer, ByVal PosV_IP As Integer)
PosH = PosH_IP
PosV = PosV_IP
End Sub
Public Sub PrintPosH()
Print(PosH)
End Sub
End Class
Tags:
Public Sub PrintPosH(ByVal sI as Script_Instance)
sI.Print(PosH)
End Sub
Use the "me" keyword to pass the current instance of Script_Instance as an argument within RunScript.
Dim vP as new VertPackage()
vP.PrintPosH(me)
Hi David,
Thank you very much for the explanation. I thought about the me, but had no idea how to use it in this case.
Victor
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by