LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

.net property node reference

Hello everyone,

           I am trying to load a reference into a .NET property node but I could not do it. Please see the attached image.

           I am setting the values of a empty size reference to be 2 and 2 and loading that into a reference of an already existing .NET higher class processor but it would not load.

           Can somebody help?

Thanks,
Vasanth.
0 Kudos
Message 1 of 12
(3,866 Views)

It looks to me as if you need to point to an existing instance of Size. Does that class have a constructor?

If you want a VI which resizes arrays and images inside LabVIEW, you can have a look here, but it's not a smart algorithm and is lossy.


___________________
Try to take over the world!
0 Kudos
Message 2 of 12
(3,854 Views)
Hi tst,

           Thanks for your reply.  As you told there was no constructor for that class. It is a subclass of another class for which I can create a constructor. But that would not be of any use. Is there a way to deal with it?

            Thanks for your code for resizing arrays and Images. But I specifically need this to be working and am not allowed to use any other properatary algorithms. Also, there are some more pieces in my code where I  have very similar problems . Please find the attached image. It has a node for saving. There I have to set the multipage attribute true for the saveoptions class. Again, this is the same problem as I cant find  a way to set the attribute to true.

-Vasanth.
0 Kudos
Message 3 of 12
(3,848 Views)

Hi Vasanth

is the constant in your picture only for the picture or real in your code? Is the "Tiff" Refnum valid?

Mike



Message Edited by MikeS81 on 01-28-2008 03:01 AM
0 Kudos
Message 4 of 12
(3,845 Views)
Hi Mike,

           No the tiff refnum is not working. I just took the snapshot now while I was trying to populate the subclass with help of a constant. I knew it will not work and it didnt too.

-Vasanth.
0 Kudos
Message 5 of 12
(3,841 Views)

Hello vforvasanth,

Does the Processor class have a Method like getSize which returns an object of the class size? Set the attributes height and width of this object and take this object as the newSize argument of the Resize method.
The class SaveOptions for the method Save of ImageX class could work accordingly.

If tere is no such method, there may be a similar one or one in an other class.  Maybe there is a constructor for SaveOptions. An object of the class SaveOptionsTiff you get from the property Tiff (as you already do).
You have to find a way to create the objects of the proper class. A constant does not work, because its value is NULL (at least something similar).
Casting to a subclass does not work for your case. (It only works if the object has the type of the subclass and has been casted to the superclass. You must be able to create the subclass first.)

I hope this helps a little bit. Good luck!

Greetings,
shb

0 Kudos
Message 6 of 12
(3,820 Views)

Do you have any sample .NET code for doing this?


___________________
Try to take over the world!
0 Kudos
Message 7 of 12
(3,810 Views)

Hi tst,

I mean something like this:

Does this image say more than my thousand words? Smiley Wink

Greetings,
shb



Message Edited by shb on 01-28-2008 01:54 PM
0 Kudos
Message 8 of 12
(3,803 Views)
Actually, my question was aimed at Vasanth. Since the parameter appears to be a specific instance, I wanted to see how such an instance would be created in C# or VB.NET in this specific class.

___________________
Try to take over the world!
0 Kudos
Message 9 of 12
(3,798 Views)
Hi Shb,
 
             That was a good idea. I will implement that and let you know.

Hi tst,

             No, to get the .net code you have to install a proprietary sofware. It is licensed.
0 Kudos
Message 10 of 12
(3,785 Views)