Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to use the classes in the NationalInstruments.Design.* namespaces in an application?

  I would like to reuse some of the Designers and Editors in my app, but they seem to be declared internal.  Thanks.


- Dave

0 Kudos
Message 1 of 3
(3,337 Views)
No. It is not possible to use the designers and editors in the NationalInstruments.Design.* namespace or any class in the NationalInstruments.Design.dll. Please could you elaborate on what you are trying to accomplish in your application with this? If you are trying to display the same property editors that are displayed by Measurement Studio controls at design-time, then you should look into the Measurement Studio PropertyEditor control. This control takes an object and a property name and displays the editor for the specified property at run-time. Please let us know if the PropertyEditor control solves your need.
Abhishek Ghuwalewala | Measurement Studio | National Instruments
0 Kudos
Message 2 of 3
(3,321 Views)
Thanks.  I've mostly figured out a workaround at this point, but maybe you can suggest a better way.  The situation is that I have subclassed ScatterPlot and ScatterGraph in order to extend the functionality (lets say mine are called MyScatterGraph and MyScatterPlot).  I want to allow the user to add new plots to MyScatterGraph and I was using a PropertyGrid to display the MyScatterGraph properties to the user (which displays the inherited properties from ScatterGraph).  However, when they clicked the [...] button for the Plots property (which is of type ScatterPlotCollection), the property grid displayed an instance of:

NationalInstruments.Design.UI.XYPlotCollectionEditor


The XYPlotCollectionEditor's Add button creates instances of ScatterPlot instead of MyScatterPlot.  The workaround is that I created a wrapper class for ScatterPlotCollection along with a custom editor (MyPlotCollectionEditor), that creates instances of MyScatterPlot when the add button is pressed.

Let me know if there is an easier way of accomplishing this.  Also, do you know if it is legal for a measurement studio licensee to redistribute the NationalInstruments.Design.DLL assembly with their application?  Thanks again.


- Dave



0 Kudos
Message 3 of 3
(3,315 Views)