09-15-2009 08:40 PM
Hi,
I am having problem in calling .net assemblies. I got error like this,
Error calling method of ObjectId handle: 0x4F51154 for obj 0xC2D16[--------] in domain [123.lvproj for Run] and thread 3400, (System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
I saw solution for similar kind of problem in this forum, but i am anable to figure it out what actually i have to do.
The STA apartment is the "Single Threaded Apartment" and is usually the same thing as saying "the UI thread". So the object you have requires that any calls to it must be on the UI thread. To do this, go to the VI properties (right click on the VI icon to get to the properties) and select the Execution from the pull down. From this panel you can force the VI to run on a specific thread - in this case the UI thread. Do this on any VI which calls this object. |
09-16-2009 05:36 AM
Hi there
Well, just do what the message says:
1. go to the VI properties (right click on the VI icon to get to the properties)
2. select the Execution (category) from the pull down
3. For "preferred execution system" select "user interface"
Repeat 1-3 for each of your VIs calling the assembly.