Grasshopper

algorithmic modeling for Rhino

Does anyone know how to get around the pesky System.__ComObject?

I need to cast it to strings, doubles, and integers, so nothing complex.

I am getting this type from Excel in C#

Views: 1786

Replies to This Discussion

This any help?

--

David Rutten

david@mcneel.com

Poprad, Slovakia

I found that as well and I think it could be helpful but I set it up just how it shows


Object co = Marshal.CreateWrapperOfType(sheetA.Cells[1, 1], String);

The errors that I get are: 'string' is a type but used like a 'variable'

The best overloaded method match for 'System.Runtime.InteropServices.Marshal.CreateWrapperOfType(oject, System.Type)' has some invalid arguments

cannot convert from string to "System.Type"

Now I am familiar with all of those errors but that means that a 'string' is not a type which I don't get at all. So any light that you could shed would be great!

I also found this:

http://fernandof.wordpress.com/2008/02/05/how-to-check-the-type-of-...

I still cant get it to work

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service