10-18-2022 12:36 AM
@T. wrote:
Hello,
This is how I would have imagined it. Unfortunately, an error always comes out of the CreateInstance method.
Thanks...
The error tells you you're trying to create an instance of the interface and your type string does indeed have IList as the type. You should change it back to List.
10-18-2022 02:18 AM
Hello,
Now it works. I thank all who have supported me here super.
I will not be afraid to post my next problems here 😁
10-18-2022 02:59 AM
@T. wrote:
Hello,
Now it works. I thank all who have supported me here super.
I will not be afraid to post my next problems here 😁
It could help others to post your solution...
10-18-2022 08:50 AM
Hello,
As shown in this example, I manage to fill the list accordingly.
Have a nice day and thank you....
10-18-2022 11:05 AM - edited 10-18-2022 11:20 AM
@T. wrote:As shown in this example, I manage to fill the list accordingly.
Have a nice day and thank you....
Your first kudo for that...
Note you need to close the type reference used for the activator.
Note you need to close the NodeId reference.
Note you're recycling a reference to the list. It will grow 1 item for each call, forever. The list is not by wire...
These are references to the objects. If you don't need to refer to them anymore, close the reference. This won't (always) close the object. If the object is inserted in another object, the object will live on there.
03-01-2023 03:14 AM
Hi,
It works fine in LV dev, but fail when compiled into a PPL.
Any idea ?
My guess is that System.Memory is not loaded by the PPL, which leads to a null reference outputed by the last GetType method (on the right side of the diagram).
03-01-2023 03:45 AM
Yes, it looks like the assembly isn't loaded in the PPL.
You can probably force it by putting anything static from the assembly on the diagram (or front panel probably) of the VI. Do make sure it isn't compiled out by the dead code removal algorithms.
DLLs have an option to share some resources with the host environment, but I'm not sure if PPLs have that.
03-01-2023 03:48 AM
Also, don't forget to close the 1st array createinstance reference. (after passing it to the 2nd createinstance args)
03-01-2023 03:57 AM
03-03-2023 11:41 AM
Yes you're right,
I deleted the right side of the diagram before posting it for confidentiality reason, but it's well closed in the original one.