- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I do not use Inventor, and only wandered into this forum out of curiosity.
It looks like the compiling error "Reference to a non-shared member requires an object reference." is due to the class GoExcel. You did not show its code, but I can guess the method "FindRow()" and "CurrentRowValue()" are both not declared as Shared (static, in C#). As from the code logic, as I can see, they should not be static/Shared anyway, because the GoExcel class needs to hold data read from Excel sheet file. Thus, you need to instantiate an GoExcel object before calling its method.. That is, you need (in the class Beam's constructor):
Dim excel As New GoExcel()
excel.FindRow(".....")
However, in this approach, each time a Beam object is created, you need to open Excel sheet file, find data and then create Beam Class. if you have many beams to create, it would not be very efficient.
The better approach is to read all data at once and use Factory pattern to create beams based the data at once.
Hope this helps a bit.
...