Grasshopper

algorithmic modeling for Rhino

Hi all,

I'm writing a grasshopper component in Visual Studio VB.Net.  I'm looking to obtain the name of the active Grasshopper file (.gh) in which the component is currently running.

Is there an easy way to do this?

Thanks

Zak

Views: 379

Replies to This Discussion

Dim FileName As String = GrasshopperDocument.DisplayName

"GrasshopperDocument" is a member in the vbscript of the class gh_document, but in VS it might be different.

Dim doc As GH_Document = OnPingDocument()

If (doc IsNot Nothing) Then

  Dim name As String = doc.DisplayName

  Dim path As String = doc.FilePath

  ...

End If

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service