Brian,
I am trying to do something very similiar to the code you had posted so bear with me trying to get your stuff to work.
That error (text posted previously) is received when opening the VI,
not when running it. The run arrow doesn't break, it just comes
up with that error in the same box that it would if it was telling you
that it loaded VI's from different places than expected. After
downloading the .NET framework v1.1 and opening your VI, I receive the
same error. After clicking ok the VI isn't broken but none of the
properties / methods are available.
Also, your post left some information out of it that made it somewhat cryptic::
"To get the .NET API, go to "C:\Program
Files\Dallas Semiconductor\1-Wire Drivers Version 4.00 Beta 4" and run
the OneWireAPI.NET_Setup.msi."
However you failed to mention what installation or drivers result in
this Dallas Semi directory. There are a slew of TMEX drivers and
the like that are available for download
here, but I'm pretty sure none of them are what you were referring to (I couldn't get the ones I tried to work).
Ah... I think I have found the correct site and files now
here with a link to the
MSI Installer.
After downloading and running the MSI Installer, this file is available:
C:\Program Files\Dallas Semiconductor\1-Wire Drivers Version 4.00\1-Wire.NET\OneWireAPI.NET.dll
I copied it to the VI directory with your files and still receive the
error when opening. I then imported it as a reference (Tools >
Advanced > .NET Assembly References) and once again am still
receiving the error with no properties or methods available. Even
when restarting LabVIEW the error appears when the VI is opened, and
going to the .NET Assembly References dialogs shows that the file is
still on the list after adding it previously.
For those of us not versed in .NET, can you lay out a little groundwork on how to get this working?
- Will .NET framework v1.1 work or do we need some version 2 beta?
(there were a dozen links on Microsoft's site and I couldn't figure out
what to download so I just got v1.1)
- Can you give some more details on what you mean about the bug in LV7.1 where the interfaces are not available for this file?
- Can you give some more details on what you mean "to cast to your specific container object (OneWireContainer1, OneWireContainer2, etc)."? -- do you do this somewhere in the example code you posted?
- I noticed the version for the DLL was slightly higher than the
version LV is asking for in the opening error message--does that
matter? (I'm guessing it shouldn't)
- How did you get to a point where you can select different methods
for the .NET class? I believe this is linked to the error message and
the DLL (or Assembly Reference, whatever), being loaded correctly (and
not getting the error message)