LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

error inserting .NET object

I've got the student version of Labview (8.2), and I wanted to check out the .NET features so I added a .NET container and tried to insert a .NET control, but I just get an error message: "Error inserting a ActiveX or .NET object".
0 Kudos
Message 1 of 9
(4,518 Views)
Hi LbviewNovice,

Is the .NET assembly that contains the control located on a network drive?
Is the VI located on the network?
Does the error occur with just your .NET assembly? What about assemblies registered in the GAC? For example, can you drop down a .NET Button found in the System.WIndows.Forms assembly?

Best Regards,

Jonathan N.
National Instruments
0 Kudos
Message 2 of 9
(4,500 Views)
I just tried inserting the "button" from the .NET Control pallette.  Actually, I tried just about every widget on the .NET Control pallette and I got the same message for every one.
0 Kudos
Message 3 of 9
(4,497 Views)
Hi,

What version of the .NET Framework do you have on your system? We require the .NET Framework 1.1 SP1

Can you run any of the .NET shipping examples found under Help >> Find Examples; Navigate to Communicating with External Applications >> .NET and then choose any .NET example. I just want to see if you can run any .NET code.

Inserting a .NET control is a fairly basic procedure so I am suprised that you are getting this error. I assume that when you say "widget", are you saying you selecting the .NET & ActiveX palette and then trying to drop down the "MonthCalendar" .NET control for example?

Does this issue occur on multiple machines?

Best Regards,
Jonathan N.
National Instruments
0 Kudos
Message 4 of 9
(4,493 Views)
You could also try repairing LabVIEW but I want to wait and see your response first before suggesting that. Maybe something got corrupted during install.

Best Regards,
Jonathan N.
National Instruments
0 Kudos
Message 5 of 9
(4,489 Views)
I checked - I do have Framework Version 1.1 SP1, but I also have the version 2.0 Framework on my system also.  Both run fine when I'm using Visual Studio.

Strangely enough, I was able to run the Calculator.vi project just fine.

Here's what I've tried - I opened a new blank vi, then in the Front Panel, I did a right-click and inserted a .NET Container from the .NET & ActiveX Palette.
Then I did a right-click on the .NET Container and clicked on "Insert .NET Control".  I tried almost every item in the palette that popped up.
I even tried going back to the install CD and adding the .NET Framework 2.0 support.  Now when I try to insert a .NET component (button) in the .NET Container it won't let me pick from the Windows.Forms.1.1, only items from the Windows.Forms.2.0 list.  I actually get a message saying that the version 2 runtime is being selected.

No, I haven't tried to installing Labview on another system.
0 Kudos
Message 6 of 9
(4,481 Views)
Hi LbviewNovice,

It really doesn't make sense at all that you can't do such a simple task. Its just not adding up. 

At this point, I would try and rule out a bad installation by installing on another PC.  You could also try reparing LabVIEW as well.

Are any of your co-workers experiencing this problem? Do you have other LabVIEW versions installed on another machine you can try out?

To address your point about getting the message stating "The version of the assembly you requested was automatically promoted to a later version by the .NET runtime engine", LabVIEW automatically loads the latest version of the .NET CLR insstalled.  This means if there is a higher version of the .NET assembly avaiable to you on that system, the .NET CLR will use that. 

Best Regards,
Jonathan N.
National Instruments
0 Kudos
Message 7 of 9
(4,469 Views)
I tried repairing Labview, but still got the same error.
I also tried using a ActiveX Container, but when I tried to insert an ActiveX control into the container, I got an error message
and then Labview crashed.

I haven't tried installing Labview on another PC. I'll try that and I'll also try uninstalling and reinstalling it on my current system.


0 Kudos
Message 8 of 9
(4,463 Views)
Yeah, if LabVIEW is crashing when simply trying to use the ActiveX container, then maybe a bad install or bug is causing the problem. At this point, I would recommend call our technical support team so they can get any bug reports from you. 

That's probably the best option at this point. Especially if testing on a new machine doesn't work.

Best Regards,
Jonathan N.
National Instruments
0 Kudos
Message 9 of 9
(4,456 Views)