LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

creating .Net controller for PresentationCore assembly

Solved!
Go to solution

When trying to create a creating a .Net controller for the PresentationCore assembly,  CVI 9.0 fails with "Maximum number of Lines exceeded". Are there any workarounds for that problem ?

0 Kudos
Message 1 of 4
(3,280 Views)

This is a huge assembly and takes a while even to just browse. If you try to generate a wrapper for all the classes in this assembly then CVI runs into file line number limitations. You can just try to generate a wrapper for the classes you want to call by unchecking all the top level nodes (namespaces) and then checking only those namespaces or classes you care about. You can do this in the dialog that shows all the namespaces, classes, and methods in the assembly you are wrapping - it is the dialog that is displayed after you specify the assembly and press OK in the first dialog. I was able to generate the wrapper for just the System.Windows namespace, that is, I unchecked all namespaces except this one.

0 Kudos
Message 2 of 4
(3,273 Views)

Problem for me is , that I don't reallly know what I need from  PresentationCore. I need to use another  Net assembly and when using the tool for creating the interface it told me, that there are dependencies to PresentationCore.  Is there another way than reading lots of documentation for that other assembly to find out , what I need from PresentationCore

0 Kudos
Message 3 of 4
(3,266 Views)
Solution
Accepted by topic author markus kossmann

You can just try to compile your code that uses the wrappers for this *other* assembly and see what errors you get. If you do not get any errors, then you do not care about PresentationCore. If you get some errors, say, for some missing identifiers, then make a list of these identifiers and create a wrapper for PresentationCore with just these identifiers selected, and add this PresentationCore wrapper to your CVI project. You may have to do this iteratively because the types you select in PresentationCore may themselves depend on other types in PresentationCore. In general, you will not even need to wrap PresentationCore if the methods/properties you call in the *other* assembly do not require you to pass objects from PresentationCore. 

0 Kudos
Message 4 of 4
(3,257 Views)