Grasshopper

algorithmic modeling for Rhino

Hello,

I'm interested in working on a custom VB component (while we're waiting for the custom component stuff in 0.7). I am hoping to access the serial port which I think would require "Imports System.IO.Ports". As of right now I cannot find a way to edit the Imports section of the VB component. Is this possible?

Thank you!

Views: 600

Replies to This Discussion

Hi Benjamin,

can you reach classes inside System.IO.Ports without using the Imports statement?

--
David Rutten
david@mcneel.com
Poprad, Slovakia

Dear Mr Rutten,

 

I have a problem similar to Benjamin's: I'm trying to create a custom VB component that takes an input real number as frequency and uses it to generate a continuous single tone.

 

I managed to use the PC beeping sound, but it has a couple of problems: I can't play two tones at the same time, if I use two or more components. Actually this is part of a bigger problem: the tones have to be playing in the backgound, since I want to be editing my GH file while the tones are playing (actually, the idea is to choose parameters in fuction of these tones).

 

Therefore, after some googling, I found that I can use DirectSound to access the sound card. But for that I need to add "Imports Microsoft.DirectX.DirectSound" to the imports in my custom VB component.

 

Any ideas on how to solve this?

Thanks in advance, and (you probably heard this a million times) congrats for a fabulous job.

 

Eduardo Castro e Costa

Do you know where the dll is that contains the Microsoft.DirectX.DirectSound namespace?

 

--

David Rutten

david@mcneel.com

Poprad, Slovakia

Darnit, there's a bug in the Imports logic, it generates uncompilable code.

 

--

David Rutten

david@mcneel.com

Poprad, Slovakia

Thanks for the ready reply!

 

I found some info in the link (http://pcsupport.about.com/od/findbyerrormessage/a/microsoft-direct...) about the dll, but I guess it will be irrelevant given the bug in the Imports logic, right?

 

if there is somethink I can assist you with, I'd be glad to, although my VB knowledge is very limited...

 

Best,

Eduardo

 

I've fixed it already, when the next release goes out you should be able to reference additional dlls again.

 

--

David Rutten

david@mcneel.com

Poprad, Slovakia

Thank you very much for your effort!

I'll be eagerly waiting for it :)

 

Best, Eduardo

Dear Mr. Rutten,

 

How do I reference additional dlls? I was under the impression that I had to edit the Imports section, but that is still "uneditable" (at least in 0.8.0050).

 

Thanks in advance,

Eduardo

Eduardo, it has always been uneditable.  Right Click in the middle of the component and select 'Referenced Assemblies' to point the component to the location of the dll you want to implement.

Dear Mr. Fraguada,

 

thanks for the reply!

I'll give it a try then.

 

Best,

Eduardo

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service