Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

LabVIEW 7.1.1 w/.NET 2.0 patch, objects still missing

35 views
Skip to first unread message

tbd

unread,
Aug 15, 2007, 5:40:07 PM8/15/07
to
Hi Folks,
      A co-worker [using LV 7.1] asked how to do a Clipboard.Clear while manipulating an Excel document.  I don't know what the easiest way is.  Looked briefly through the Excel Automation methods and tried Windows User32.EmptyClipboard which gave an error I didn't explore - am currently looking at a method of the .NET System.Windows.Forms\Clipboard object.  This object is visible in System.Windows.Forms(2.0.0.0) assembly - but only when I'm using LV 8.2(.1).  I was unable to see this 2.0.0.0 assembly from LV 7.1.1 until applying the 7.1.1 .NET patch - now the 2.0.0.0 assembly is listed in the object-browser, but the "clipboard" object is not a listed member. :smileysad:
 
I'd be grateful for your Clipboard.Clear solution - and any info as to why the .NET-patched 7.1.1 should or shouldn't see all 2.0.0.0 objects. :smileyhappy:
 
Cheers!

tbd

unread,
Aug 16, 2007, 8:10:07 PM8/16/07
to
Hi Trey,
Thanks for the ideas tried everything, critical updates were up-to-date.  Installed NET 3.0 though it seemed silly - but it was the only net-related non-critical update.  Restart, no joy.  Had 7.1.1f2 but re-"installed" it anyway - it's essentially a couple (3) replaced files.  Still no clipboard object to select in NET-constructor browser.
Do you have the Windows.System.Forms(1.0.5000.0) assembly on your 7.1.1f2 machine?  I do, and the reason I ask is because the object-listing under the 2.0.0.0 assembly looks exactly like the list for the (1.0.5000.0) assembly - as if LabVIEW isn't seeing the 2.0.0.0 objects, only the 1.0.5 objects.
BTW, before applying the patch, System.Windows.Forms (2.0.0.0) wasn't even listed in my [7.1.1] browser.  The statement below suggests it was listed in your browser before the patch - this is odd. :smileysurprised: 


On a machine with LabVIEW 7.1 I tried looking for the Clipboard in System.Windows.Forms (2.0.0.0) with no success.


Cheers!

tbd

unread,
Aug 17, 2007, 4:10:04 PM8/17/07
to
Hi Trey,
      Again, thanks for the help in trying to understand this!
> Is System.Windows.Forms something that comes with .NET?
Yes, I think so - see MSDN&nbsp;<a>link</a> .&nbsp; System.Windows.Forms and the&nbsp;Clibboard object,&nbsp;appear come with&nbsp;the ".NET Framework." as far back as 1.0!&nbsp; This implies I should have been able to [at least] see the Clipboard object before the f2 patch - as you were able to.&nbsp; Something very odd here. :smileysad:
Note:&nbsp;I can see the 2.0.0.0 Clipboard object under LV 8.2.1, just not under LV7.1.1f2 (Win XP 2002, SP2).
Cheers!

Jonathan N

unread,
Aug 20, 2007, 5:40:09 PM8/20/07
to
Hi tbd,

I just saw this post so I thought I might put my two cents worth in.&nbsp;

The behavior you are seeing is related to how we display .NET static classes in
the Select .NET Constructor Dialog Box. In LabVIEW 7.1.1 and LabVIEW
8.0, we did not display static classes in that dialog box but in LabVIEW 8.2.1
(I can't remember if it was LabVIEW 8.2 or 8.2.1) we actually showed the user
the static classes. Thus in LabVIEW 8.2.1, you can bring up and see the
Clipboard class in the Select .NET Constructor dialog, but you can't click OK
because there are no constructors (i.e. which makes sense since the Clipboard
class is a static class). In LabVIEW 7.1.1, you get the behavior of not seeing
this class as shown in the attached LV 7.1.1
Constructor snapshot.

It is important to note that .NET static classes cannot be instantiated (i.e.
you can't create objects but rather you directly access the methods and
properties). To call static methods or properties, you
1) Drop down an invoke node or property node from the .NET palette
2) Right-click on the top-left terminal and select Select Class » .NET » Browse from the shortcut menu to display. Then browse to your .NET
assembly (in this case it?s the System.Windows.Forms assembly) and choose your
.NET class (in this case it?s the Clipboard class).


3) Choose a method or property (see
the attached Select Object from 7.1.1
snapshot)
&nbsp;

(Note You can invoke static methods if you have
an instance - we know it's static and ignore the instance value passed in on
the refnum)

Now before the 7.1.1 f2 patch, LabVIEW 7.1.1 would not display any of the .NET
Framework 2.0 assemblies. After applying the patch you should see .NET 2.0
assemblies.&nbsp;

Also, you may notice that when trying to select the System.Windows.Forms
1.0.5000.0 assembly a prompt appears indicating the version of the assembly was
prompted to a later version by the .NET runtime engine. The reason for this is
because LabVIEW automatically loads the latest installed version of the .NET
CLR. Just thought I would let you know. This just means you are always targeting the latest version of that assembly on your system.

Hope this clarifies things.

Best Regards,


Select Object 7.1.1.jpg:
http://forums.ni.com/attachments/ni/170/266577/1/Select Object 7.1.1.jpg


LV 7.1.1 Constructor.jpg:
http://forums.ni.com/attachments/ni/170/266577/2/LV 7.1.1 Constructor.jpg

tbd

unread,
Aug 22, 2007, 1:40:07 AM8/22/07
to
Hi Trey, Jonathan,
Sincere thanks to both of you for the continued support, for the solution, and for the education re: static classes.
Trey probably used the right tool by old-habit, where I haven't used .NET much yet and thought a "constructor" was a required first step.&nbsp; Indeed, the Clipboard object is visible (in 7.1.1f2) by following Jonathan's instructions! :smileyhappy:
Thanks for your patience in&nbsp;educating this .NET nube. :smileywink:
Cheers!
&nbsp;
&nbsp;
0 new messages