LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

.NET class conflict

Hi,

I use a .NET API with LabVIEW 7.1 to perform some operations.
Here a some interfaces that I have to use:
interface IReader;
interface IWriter;
interface IReaderWriter: IReader, IWriter;
interface IVirtualPipe: IReaderWriter;

A method of the .NET API return me an IVirtualPipe interface.
I want to use the method Write of this object(from the inheritance of IWriter)

My problem is that I cannot see this method when I try to use the "Invoke Node" on my object.
I try to use the "To More Generic Class" on my object to retrieve the IWriter interface whithout success=>I have a "Wire: Class conflict".

So, I have two questions:
1. Why I cannot see the Write method from the object ?
2. Why I cannot retrieve the IWriter interface ?

Than
k you for your help.
Sebastien
0 Kudos
Message 1 of 5
(3,152 Views)
SébastienF wrote in message news:<506500000008000000D6EB0000-1079395200000@exchange.ni.com>...
> Hi,
>
> I use a .NET API with LabVIEW 7.1 to perform some operations.
> Here a some interfaces that I have to use:
> interface IReader;
> interface IWriter;
> interface IReaderWriter: IReader, IWriter;
> interface IVirtualPipe: IReaderWriter;
>
> A method of the .NET API return me an IVirtualPipe interface.
> I want to use the method Write of this object(from the inheritance of
> IWriter)
>
> My problem is that I cannot see this method when I try to use the
> "Invoke Node" on my object.
> I try to use the "To More Generic Class" on my object to retrieve the
> IWriter interface whithout success=>I have a "Wire: Class conflict".
>
> So, I have two questions:

> 1. Why I cannot see the Write method from the object ?
> 2. Why I cannot retrieve the IWriter interface ?
>
> Thank you for your help.
> Sebastien

I find a solution: use "Type cast" instead of "To More Generic Class"
But I don't understand why we cannot see the Write method of the upper interface...

Bye
Sebastien
Message 2 of 5
(3,152 Views)
Hello,

Which parameters did you use as target class and as reference for the function 'To More Generic Class'?

Is your solution to use the 'To More Specific Class' function?

Marc Larue
Applications Engineer
NIF
0 Kudos
Message 3 of 5
(3,152 Views)
Hello,
Thanks for your response.

> Which parameters did you use as target class and as reference for the
> function 'To More Generic Class'?
A .NET reference to IWriter

> Is your solution to use the 'To More Specific Class' function?
I tried this first because that seemed to me the good solution (more
logical):

IWriter
^
|
IReaderWriter
^
|
IVirtualPipe


but I cannot plug a IWriter .NET reference to the "Target class"
connector.
I have a "Wire: class conflict".
Since I can use 'Type cast', I use it. But I will prefer to use 'To
More Specific Class' (more object 🙂 )

If you have any idea ?
Is it normal to not have access to IWriter methods from IVirtualPipe ?

Thanks
Sébastien
0 Kudos
Message 4 of 5
(3,152 Views)
Hello,

The best would be for me to reproduce your problem.
Could you explain where to find the object that you use or to send it if you created it ?

regards,

Marc Larue
0 Kudos
Message 5 of 5
(3,152 Views)