3D Graphs in Measurement Studio 2013

Hi guys,
I'm new to Measurement Studio and would like to create 3D graphs, however see from an old post that there are some limitations. What approaches can I take to creating 3D graphs with Measurement Studio 2013?
Many thanks

Hi CMScribe, 
I've found a couple of examples that seem to use 3D graphs, have a look at them and see if any of these are helpful. 
https://decibel.ni.com/content/docs/DOC-6352
http://forums.ni.com/t5/Measurement-Studio-for-NET/Can-I-use-the-3D-graph-Active-X-control-within-Ne...
There's a small section towards the bottom of this page too:
http://www.ni.com/white-paper/2820/en/
All the best
Vsenior

Similar Messages

  • New Product Announcement: Measurement Studio 2013 is available for download

    Measurement Studio 2013 continues to offer programmers the latest tools for development and visualization with new support for .NET Framework 4.5, Windows Presentation Foundation (WPF), and Visual Studio 2012. Measurement Studio 2013 integrates into Visual Studio 2012, 2010, and 2008 to provide engineers with a complete suite of tools for building professional engineering applications to acquire, analyze, and display measurement data.
    >> Upgrade to the new version
    >> Read about WPF Technology
    >> See Release Info and Bug Fixes
    >> Download here
    National Instruments

    Hi StenAndersen,
    This KB might be a helpful reference in this regard: http://digital.ni.com/public.nsf/allkb/C51E3B38578FAD2786257C070069F386. I apologize for any inconvenience this is causing in your projects.
    Rahul B.
    Applications Engineer
    National Instruments

  • Visual Studio 2012 crashes at startup after installing Measurement Studio 2013

    Hi,
    History:
    VS2012 (with Update 4) has worked without problems for a few months.
    Installation of Measurement Studio 2013: at first, everything is ok.
    Reboot of the PC: VS2012 crashes at startup, showing the splash screen, "not responding"
    Deinstallation of Measurement Studio: VS2012 is working again.
    Re-Installation of Measurement Studio: VS2012 is crashing again.
    Repair-Installation of Update 4 of VS2012: VS2012 is working again ... until a reboot of the PC.
    Starting VS2012 in SafeMode: working, but i cannot use Measurement Studio in this mode (of course).
    PC is Windows 7 Professional 64Bit, Service Pack 1
    I also reinstalled VS ... without success. Any other ideas?
    Log of eventviewer has two entries, see attached File

     
    Hi,
    There were no updates during that night, but some during last night. And I'm not sure if the update 4 really is responsible for that behaviour:
    Yesterday after the crash I installed Update 4 again: it worked. Reboot: it worked.
    Starting System right now: it is crashing again.
    Currently  there are 3 Updates on the system related to VS:
    KB2707250 (The Update 4)
    KB2781514
    KB3002339
    With KB3002339 an issue with ASP.NET will be fixed. Well....i'm not using ASP.NET, just a step in the dark: i made a repair installation of this update and it is working again. How long? Maybe even god doesn't know ...

  • Using graphs in measurement studio

    I have written in multiple languages, and this �easy� �user friendly� software package has left me completely stumped. How on earth do you put data in to a graph and display it????? Can someone please show me code examples of firstly how to shove an entire array of numbers into a graph in VB.net using the new Measurement Studio and secondly how I could update a graph plot with a next acquired sample. Please help

    "Where would I find "Creating Measurement Studio Strip Charts, Scope Charts, and Graphs" document. if it is on the website it is extremeley well hidden even from its own search engine. Does this specifically talk about VB .NET and measurement studio"
    You can find this topic, as well as several other conceptual topics about the Measurement Studio .NET features with VB.NET/C#, in the Measurement Studio help that installs with Measurement Studio. You can find this help in two ways:
    Integrated into VS.ET 2003/MSDN Help - Go to the table of contents, then the "NI Measurement Studio Help" node.
    Measurement Studio standalone help - Go to the Start Menu, then Programs->National Instruments->Measurement Studio 7.1 for VS.NET 2003->Measurement Studio Documentation
    Once you're in the table of contents, you can find the topic above by navigating to:
    - NI Measurement Studio Help
    - NI Measurement Studio .NET Class Library
    - Using the Measurement Studio .NET Class Libraries
    - Using the Measurement Studio Windows Forms .NET Controls
    - Using the Measurement Studio Graph .NET Controls
    The topic above is the second link in the list. If you have Measurement Studio 7.1 installed, this link will take you directly there.
    "Using Measurement Studio ActiveX controls I wouldn't even know where to start, there is no AxCWGraph on any toolbar."
    AxCWGraph is the name of the interop wrapper that is automatically generated by VS.NET when you add CWGraph to your project, so you won't see it in the toolbox. WaveformGraph/ScatterGraph is what you should use in .NET applications if you have Measurement Studio 7.0 or higher. I only mentioned CWGraph because this was posted to the Measurement Studio for Visual Basic forum instead of the Measurement Studio for Visual Studio .NET forum, so it wasn't clear if you were using the Measurement Studio .NET controls or the Measurement Studio ActiveX controls.
    "If NI could just stick an example of exactly how to use VB.NET with measurement studio on displaying data and the various options available and stick it for all to see on the measurement studio home page it would be great."
    There are several examples that are installed with Measurement Studio 7.1. If you installed Measurement Studio to the default location, you can find this examples at:
    Program Files
    National Instruments
    MeasurementStudioVS2003
    DotNET
    Examples
    UI
    Graph
    "I write in over ten different languages and scripts and fluent in two of them. It worries me that I can't even find the front door let alone open it."
    I can understand how this could difficult if you were not aware of the Measurement Studio help and examples. Is it easier now that you know about this content that installed with Measurement Studio? If not, what else do you feel is missing?
    - Elton

  • Exe file will not start using a Measurement studio 2013 component

    Hello,
    I use Meausrement studio 2013 with visual studio 2012 and vbnet on windows 7.
    On a new project (windows form application), i use a form and a ScatterGraph component. I compile, no errors and it works fine. 
    Now, i try to start this application on a another Windows 7 station. (The framework 4.5 is installed on its station).
    The exe file is in a directory with the natrional Instruments dll files.
    The exe file will not start, no errors.
    PS: Before, with Meausrement studio 2010 and visual studio 2010 all worked fine. 

    Hi, virgule
    It sounds like you are using the "Publish" feature in Visual Studio (a.k.a., ClickOnce) for deployment, is that correct? If so, unfortunately ClickOnce is not supported by Measurement Studio components.
    If you are looking for a good way to deploy Measurement Studio applications, I would highly recommend upgrading to Measurement Studio 2015, which ships with Measurement Studio Installer Builder. You can read more about this here: http://www.ni.com/white-paper/52669/en/
    If you cannot update to Measurement Studio 2015 and are using Visual Studio 2013, NI recommends using WiX for creating your installer. More information on WiX deployment can be found here: http://digital.ni.com/public.nsf/allkb/764B727C9BD2C4C686257C970053D059
    Thanks,

  • Is the digital waveform graph supported in Measurement Studio?

    I have an application that could really use the LV-style digital waveform graph in Visual C++. Are there any plans to support the digital graph in Measurement Studio?
    Thanks, Bob

    Unfortunately, there is currently not an equivalent of LabVIEW's digital waveform graph in Measuremeht Studio for Visual C++. You can fake some of the features with CNiGraph. If you have Measurement Studio for Visual Basic 6.0 installed, you can see some examples of this in the VB DAQ\Digital\Digital Waveform and Digital Waveform Continuous examples. Also, attached is a sample Visual C++ 6.0 project that demonstrates how you can simulate some digital graph features with CNiGraph. There's also a screenshot attached that shows what this looks like. Hope this helps.
    - Elton
    Attachments:
    DigitalGraphExample.png ‏16 KB
    GraphDemo.zip ‏19 KB

  • Remove Measurement Studio Enterprise trial computers with activated Standard licenses

    When I install Measurement Studio 2013 on a development computer, activate my Standard Development serial number and license that PC over the Internet, and build some software in Visual Studio, the Enterprise Development trial is automatically selected in the build process. After 30 days, the license expires, and the software behaves as if it is unlicensed - that is, it crashes. A Clean and Rebuild must be run to select the Standard Development license and make the software work again.  I believe that this default behavior is incorrect.  This 30 day window is often shortly after delivering the machine to a customer, so it fails on their floor right after we leave! This is not good for our reputation or for NI's reputation.
    One or more of the following options would be the preferred behavior:
    (1) Do not automatically enable the "Enterprise Development" trial. This trial should be deactivated by default when a Standard or Professional license is activated, and a user should be able to open NI License Manager and Activate it as required.
    (2) Show a warning on start-up whenever a trial license is used. This is what LabVIEW does: upon launch of LabVIEW the user would see something like "Evaluation License - 5 days remaining".  Measurement Studio users do not see this upon launch of Visual Studio, upon building the project in Visual Studio, or upon starting the resulting software.  It would be nice if you could provide a link that would instruct users on how to deactivate the Enterprise Development license in this warning.
    (3) Use the lowest possible development system. If Enterprise-only features are used and a Standard license and Enterprise trial are available, then the trial is necessary (though a warning as in #2 above would be nice), but otherwise use the Standard or Professional license. This issue has caused us some embarrassment several times. Please fix it!
    The workaround, according to Michael Keane from NI (in Service Request #7454045, if anyone from NI is reading this), is as follows:
    I assume that in License Manager during those 30 days you would see a green box next to Standard edition and a half white / half yellow box next to Enterprise. The workaround for what you are describing would be to go into ProgramData (hidden folder, will have to type it into Windows Explorer) >> National Instruments >> License Manager >> Licenses and move the Enterprise .lc file outside the Licenses folder. It probably has "TmpEthernet" in the name. This way, License Manager would not be able to find an evaluation version license and I would expect the checkbox next to Enterprise to appear white after refresh. Then, the software would have to look toward the full license and no builds would be expiring.
    This works, but is still leaves the possibility for the step to be forgotten and the software to fail shortly after delivery, which is obviously no good at all!  Please fix this!

    Thanks for the response Daniel,
    The issue and behavior are a little different than your scenario. First, I don't add a reference to Analysis.Enterprise.dll.  I only use DLLs which my standard license covers.  However, if I had used Analysis.Enterprise.dll, there would be no build error.  When I activate Standard edition, the Enterprise trial remains active, and is not cancelled or superceded by the Standard edition license.
    The process is similar to what you've described, though. I think that the evaluation period is longer than 7 days - I see that described at http://www.ni.com/mstudio/download/, but the manual at http://www.ni.com/pdf/manuals/350836e.pdf says on page 7 "Any applications you build with the Measurement Studio Evaluation package have a 30-day evaluation period.", which matches my experience.  The process goes like this:
    I first install Visual Studio 2012, and license it.
    Install Measurement Studio 2013 (2015 now!), which defaults to the Enterprise evaluation, licensing itwith my Standard serial number.  This is a part of the installation process: Download http://ftp.ni.com/evaluation/labview/ekit/other/downloader/MStudio2015_downloader.exe on a fresh install and click through, and you'll see that there's a screen in the installer which requests the serial number.  I enter it in this step; there's no reason for it to be licensed with the Enterprise trial at any time.
    Then, I check out the application from our source control, and open it in Visual Studio.  The check out includes the DLLs: 
    NationalInstruments.Common.dll
    NationalInstruments.DAQmx.dll
    NationalInstruments.MStudioCLM.dll
    NationalInstruments.NiLmClientDLL.dll
    NationalInstruments.UI.dll
    NationalInstruments.UI.Styles3D.dll
    NationalInstruments.UI.WindowsForms.dll
    (note that Enterprise Analysis is not included) and the license file: 
    NationalInstruments.UI.WindowsForms.ScatterGraph, NationalInstruments.UI.WindowsForms, Version=13.0.45.242, Culture=neutral, PublicKeyToken=4febd62461bf11a4
    NationalInstruments.UI.WindowsForms.Legend, NationalInstruments.UI.WindowsForms, Version=13.0.45.242, Culture=neutral, PublicKeyToken=4febd62461bf11a4
    (note that Enterprise Analysis is not included; these are the only UI components that the application used).  The project file references the DLLs in the project folder:
    <Reference Include="NationalInstruments.Common, Version=13.0.40.190, Culture=neutral, PublicKeyToken=dc6ad606294fc298, processorArchitecture=MSIL">
    <SpecificVersion>False</SpecificVersion>
    <HintPath>lib\NationalInstruments.Common.dll</HintPath>
    <Private>True</Private>
    </Reference>
    <Reference Include="NationalInstruments.DAQmx, Version=14.1.45.13, Culture=neutral, PublicKeyToken=4febd62461bf11a4, processorArchitecture=x86">
    <SpecificVersion>False</SpecificVersion>
    <HintPath>lib\NationalInstruments.DAQmx.dll</HintPath>
    <Private>True</Private>
    </Reference>
    <Reference Include="NationalInstruments.MStudioCLM, Version=13.0.40.190, Culture=neutral, PublicKeyToken=dc6ad606294fc298, processorArchitecture=MSIL">
    <SpecificVersion>False</SpecificVersion>
    <EmbedInteropTypes>False</EmbedInteropTypes>
    <HintPath>lib\NationalInstruments.MStudioCLM.dll</HintPath>
    <Private>True</Private>
    </Reference>
    <Reference Include="NationalInstruments.NiLmClientDLL, Version=13.0.40.190, Culture=neutral, PublicKeyToken=dc6ad606294fc298, processorArchitecture=MSIL">
    <SpecificVersion>False</SpecificVersion>
    <HintPath>lib\NationalInstruments.NiLmClientDLL.dll</HintPath>
    <EmbedInteropTypes>False</EmbedInteropTypes>
    <Private>True</Private>
    </Reference>
    <Reference Include="NationalInstruments.UI, Version=13.0.45.242, Culture=neutral, PublicKeyToken=4febd62461bf11a4, processorArchitecture=MSIL">
    <SpecificVersion>False</SpecificVersion>
    <HintPath>lib\NationalInstruments.UI.dll</HintPath>
    <Private>True</Private>
    </Reference>
    <Reference Include="NationalInstruments.UI.Styles3D, Version=13.0.45.242, Culture=neutral, PublicKeyToken=4febd62461bf11a4, processorArchitecture=x86">
    <SpecificVersion>False</SpecificVersion>
    <HintPath>lib\NationalInstruments.UI.Styles3D.dll</HintPath>
    <Private>True</Private>
    </Reference>
    <Reference Include="NationalInstruments.UI.WindowsForms, Version=13.0.45.242, Culture=neutral, PublicKeyToken=4febd62461bf11a4, processorArchitecture=MSIL">
    <SpecificVersion>False</SpecificVersion>
    <HintPath>lib\NationalInstruments.UI.WindowsForms.dll</HintPath>
    <Private>True</Private>
    </Reference>
    <Reference Include="NLog, Version=2.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
    <SpecificVersion>False</SpecificVersion>
    <HintPath>lib\NLog.dll</HintPath>
    </Reference>
    Note that NiLmClientDLL and MStudioCLM are not copied to the output folder.  A later entry in the project file includes the license file in the build: 
    <EmbeddedResource Include="My Project\licenses.licx" />
    I then build the project, make whatever customizations required for this particular build, and we ship the machine.  Then, the customer calls 30 days later, complaining that the program won't start.  
     

  • Measurement Studio NumericEdi​t Control is Not Working

    I installed Measurement Studio 2013 with Visual Studio 2012 Professional yesterday and imported my previously developed projects on (VS 2010 Express). Web controls and C# coding working fine.
    I started Measurement studio chapter 2 first exercise to add control WaveformGraph, Gauge and Legend on my page and working but when add NemericEdit control then it gives me JavaScript critical error …….. SCRIPT1014 Invalid character. I am using window 7 and IE11 cleared cache already.
    Please help.
    Best regards
    Bashir.
    Attachments:
    NumericEdit_ScreenShots.docx ‏298 KB

    Hi Bashir,
    I was able to reproduce this issue in IE11. Please note, Measurement Studio 2013 supports IE6 - IE10, so we have not tested the Measurement Studio 2013 ASP.NET controls with IE11. However, what you are seeing appears to be a result of IE11 dropping support for conditional compilation for javascript (https://msdn.microsoft.com/en-us/library/ie/121hztk3(v=vs.94).aspx). Because of this, when the Visual Studio debugger is attached to your ASP.NET website, you see an unexpected character exception.
    Please note that the documentation for Web Browser Compatibility with Measurement Studio Web Forms Controls says that IE9 and 10 are only fully supported in compatibility mode. I took the liberty of testing IE11 in compatibility mode, and the Visual Studio debugger message stopped appearing. 
    Let me know if you have any questions.
    Daniel D.
    National Instruments
    Automated Test Software R&D

  • Wpf graph Measurement studio

    Bonjour,
    Je vous expose mon  probleme.
    J'ai developpe une application  sous Win7 et VS2010 environnement C# et wpf.
    Je dois afficher une courbe en temps réel sur une periode d'une heure avec un nouveau point toutes les 100ms (soit max 36000).
    J'utilise l'objet graph NI et je dois également afficher le temps sur l'axe des abcisses. les graph sont "databinder" 
    1er methode : J'ai utilser un analogWaveform mais au bout de 20000 points le rafraichissement commence a ralentir.  
    2eme methode : J'ai vu sur le site la page optimisation des graph donc je passe par un objet ChartCollectionAnalogWaveform. Je le dimensionne a 36000 et effectue un append toutes les 100ms 
    //ChartcollectionAnalogWaveform[] LengthCurveChart ;
    //toutes les 100 ms
    NationalInstruments.AnalogWaveform<double> __waveLength = new AnalogWaveform<double>(1);
    DateTime[] __time =new DateTime[1];
    __waveLength.Timing = WaveformTiming.CreateWithRegularInterval(new TimeSpan(0, 0, 0, 0, 100), new DateTime(2000, 1, 1, 0, 0, 0));
    LengthCurveChart[0].Append(__waveLength);
    Mais sur cette derniere methode j'ai un plantage au bout de quelques minutes ("Tha data store was modified ... Buffer<DateTime>".
    Je n'ai pas trouver d'exemple sur le net avec des chartCollectionAnalogWaveform et/ou des affichage avec l'horodatage en abcisses.
    J'aimerais savoir comment faire quel objet ou quellle methode utiliser ?
    Merci
    Johan

    My data are of type of double and I send the data to graph using the steps below (a simplified example):
    int N=35;
    Point[] pt = new Point[N];
    for (int i = 0; i < N; i++)
         pt[i].X = i+1;
         pt[i].Y = 2.1e-1 * (i + 1) * (i + 1);
    Plot plt = new Plot("Total ");
    plt.Label = "Total ";
    PointPlotRenderer pltr = new PointPlotRenderer();
    SolidColorBrush br = new SolidColorBrush(Colors.Red);
    pltr.Stroke = br;
    pltr.Fill = br;
    plt.Renderer = (PlotRenderer)pltr;
    plt.HorizontalScale = xAxis;
    plt.VerticalScale = yAxis;
    niGraph.Plots.Add(plt);
    niGraph.Data[0] = pt;
    I send new data each time to the plot and also I have created my own usercontrol chart using the Measurement Studio graph as the starting point in case that is useful for debugging.
    Thank you for the asnwer about the next version of measurement studio.

  • Does Measurment Studio Standerd edition contains graph and chart ActiveX controls for VB6

    A Very Simple quistion:
    Does Measurment Studio Standerd edition contains graph and chart ActiveX controls for VB6?

    Shady -
    Measurement Studio 7.0 Standard Edition provides support for Visual C++ 2003, Visual Basic .NET 2003, and Visual C# 2003. It just so happens that the Visual C++ support includes ActiveX controls, which are usable in VB6. The CWGraph ActiveX control provides both graphing and charting functionality.
    However, full Visual Basic 6 support, including examples and documentation is not in the Standard edition. It is in the Professional and Enterprise Editions.
    The best thing to do would be for us to get in direct contact with each other to make sure that we get you exactly the (minimum) package you need. If your profile includes your email address, we can contact you. Otherwise, you'll need to go through ni.com/support and refer to t
    his discussion thread to open a direct dialogue.

  • Visual Studio 2013 - New Project

    Hi
    Many years ago I wrote a VB6 program for school students for diet analysis in terms of energy and a range of vitamins and minerals.  It drew comparisons against the national guidelines.  Results were tabulated, graphed and output provided in Word
    and Excel files.  The VB6 program used an Access database containing about 850 foods. It has been used by quite a few schools and appears to always be used across a network.
    My intention is to re-write the whole program in Visual Studio 2013 using Visual Basic code.  I intend to refresh the whole program and add a wider range of foods and update the comparisons using the latest national guidelines and food label formats.
    This will be my first attempt at Visual Studio and I intend to use a Windows Forms Application approach.  The data used is "static" - it does not change it is simply a "read only" file - get the data, multiply for mass and add up each
    category (energy, vitamins and minerals).  It is a "file of data" rather than a true database.  In reality a 1000 food data file should only be about 200 Kbytes.  As an Excel file it is only 150Kbytes but as an Access file it is bloated
    up to a 550Kbyte file.
    The program is not sophisticated, so, should I be using a WPF Application or a Window Forms Application?  The WFA just feels a bit more familiar than a WPF.  Also, the program is intended for loading onto a network at some schools or on a stand-alone
    computer.
    My greatest concern is about the choice of approaching the data.  A "true" database is not needed because the data is simply for about 1000 rows of food each with about 20 columns of data (numeric and text).  The Access file is simple
    but I could create an mdf file (I think) but would that be an advantage?  With the Access data I appear to have loaded the file and created a DataAdapter and I have experimented with GetData() which works.  My attempts to use ExecuteReader() failed
    completely.  Is there a better approach?  such as SQL "DataTable.Rows(RowPosition)(“column name")”??  It seems a very sophisticated method for a small file of data.
    The Access Database that I have experimented with in VS2013 appears to use Jet Drivers???? which proved to create a few problems for installations in the past.  Should I be using an mdf file approach??  I will need to distribute the data in a "resx"
    file.  I could use SQL Server Management Studio (free download) and then use VS2013 to read the Access file and build a new mdf database.....
    I am not convinced that I have the best solution.  Any comments and suggestions would be very greatly appreciated.
    Many thanks for reading this far.
    Winchestermili
    Winchestermili

    Frank
    Looking good!  The "attachment" to a new project worked first time.
    I can see all the new Classes by hovering a pointer over the "declarations" above "Public Class Form1"
    Seems to access the VBNetForum URL quite quickly using a high speed BB connection.
    I am greatly looking forward to the next stage...........
    Regards
    Keith
    Winchestermili
    Keith,
    I intentionally truncated that post with “let me know when you’re that far along” simply because it’s very easy to get lost
    with a concept that’s new. This isn’t as different as you might think though – you’ve been using a database, and now you’ll be using instances of a class (various ones).
    Over the years here, I’ve seen many times where people use databases because they assume “that’s the only way to do it”. The
    “it” actually being encapsulation.
    Encapsulation
    is what they need and certainly a database provides that (and a lot more), but it’s not the only way it can be done.
    Think about this a bit: A DataRow encapsulates the related data for whatever it is. For example maybe it’s a person’s data –
    you’d want to keep the person’s first name, surname, and things like that all together because it defines something related to that one person. You then have a collection of those DataRows in a DataTable.
    In much the same way, what I have here is similar: Instead of a DataRow, I’m using instances of a class. Instead of columns
    in a DataRow, I’m using properties of the instance, and instead of a DataTable, I’m using a List(Of Class).
    …the concept is identical.
    Classes are a means of building an object in OOP. In and of itself, it’s really just a template or a blueprint (overused metaphor).
    Deborah Kurata put it best, in my opinion, when she said that a class is like a cookie-cutter and the objects created are cookies. You eat the cookies, not the cookie-cutter!
    A class works that way exactly: You can’t “consume” a class; you consume the objects (instances) created by them and in this
    case, like a DataTable housing DataRows, I’m storing them in a very specific type of collection known as a List(Of T).
    I don’t want to get too far adrift about classes and/or OOP here – not that I would mind the discussion – but it’s a new concept
    to you and it’s easy to get confused about what’s doing what. I’ll get more to the specifics next.
    That entire class library is the data layer; it doesn’t work with controls of any sort, only the data.
    That said though, in the following I’ll explain how controls can be ‘assisted’ by the methods in the classes.
    The main class in this is the one called “FoodComposition”. That one is only barely started – the
    only
    method in it so far is an overloaded way to add a new instance to a list of them.
    Two of the classes are really just ‘supporting classes’ – those being the ones called “FoodCategory” and “LabelNote”. Don’t
    get me wrong here, they do have methods in them (with more to be added), but you won’t too much be working with those in the user’s program – you will in the program that I’ll create for you to add/modify/remove* and so on, but for now let’s set those two
    aside.
    *  The fact that these are “supporting” classes, I have it set up such that you cannot remove an instance of those if there’s
    a reference to them in FoodComposition. If you want to see where/how I’m doing that, look at the code of the class FoodCategory, for example, and go to line 633, then read the code of that method named “Remove”.
    The one class in the bunch which is pretty much self-contained is the one called DietaryReferenceValue (DRV is the name you
    used). That one makes for a good topic to explain how I can provide methods which lend a helping hand to your controls but don’t, directly, have anything to do with controls.
    I have a method in that class named “GetAllGroupNames” which is a function that returns a string array containing the names
    of each instance’s group. That might be used, for example, if you wanted to show a ListBox or a ComboBox to allow the user to select one of the group names:
    Private Sub Form1_Load(ByVal sender As System.Object, _
    ByVal e As System.EventArgs) _
    Handles MyBase.Load
    Dim url As String = _
    "http://www.fls-online.com/VBNet_Forum/12-13-14/NutritionData.xml"
    GetNutritonData(url)
    ListBox1.Items.AddRange(NutritionData.DietaryReferenceValue.GetAllGroupNames(drvList))
    End Sub
    So, for example, when the user selects one of them:
    Private Sub ListBox1_SelectedIndexChanged(ByVal sender As System.Object, _
    ByVal e As System.EventArgs) _
    Handles ListBox1.SelectedIndexChanged
    Try
    If ListBox1.SelectedIndex > -1 Then
    Dim selectedGroup As String = _
    ListBox1.Items(ListBox1.SelectedIndex).ToString
    Dim drv As NutritionData.DietaryReferenceValue = _
    NutritionData.DietaryReferenceValue.GetInstance(drvList, selectedGroup)
    MessageBox.Show(drv.ToString, drv.SexAndAgeGroup)
    End If
    Catch ex As Exception
    MessageBox.Show("An error occurred:" & vbCrLf & vbCrLf & ex.Message, _
    "Program Error", MessageBoxButtons.OK, _
    MessageBoxIcon.Warning)
    End Try
    End Sub
    As you can see there, I’m using the .ToString method which I have overridden in the class. That’s also part of what I wanted
    to discuss: What it gets.
    Currently I don’t have much else (other than maintenance routines like adding, removing, renaming) in there; the methods that
    you use are methods that I set up – but in the words of Hamlet, “therein lies the rub” … I don’t know what you want!
    Give some thought to just what methods you might want to have in there. For example maybe you might want to have a method which
    will return the value of one specific nutrient which you specify. I can do that, I just don’t know yet that you want it so it’s not there.
    Quite often I’ll also provide what I’m come to call “convenience properties”. For example with the property named “Sodium”,
    I might have another property (read-only) named “Sodium_String” which returns a string in whatever format you wanted it to have.
    These are things I don’t know that you want and also things which you may not have known can be done, thus this writing. ;-)
    The other day I asked about units. It may not be where you want to go with this but I’d also like to offer that we can provide
    more granularity to the nutrients themselves. Don’t get me wrong, it’d be an overhaul of what I have right now, but I’ll do it if you want to proceed:
    Imagine that we have a class, all by itself, that we call “Nutrients”. At the very least that class would have members like
    Name and UnitOfMeasure, but it could have anything else you wanted. An example that comes to mind might be the URL to a page on Wikipedia about it, or maybe a URL to an appropriate image or … whatever you dream of here.
    So then when using them in the other classes, “Calcium” would, itself, be an object which has a name (“Calcium”), a unit-of-measure
    (maybe “milligram”), and so on.
    It’s a lot to take in all at once and even this is something you may want to reread, but do give it thought. Let me know what
    methods you want in the classes which will help you in your user’s program.
    Still lost in code, just at a little higher level.

  • Why the wave is disvisible?? I used measurement studio 7.0.1 in my existing VC++ 6.0 project

    I have an existing Microsoft Visual C++ project  MyProj. I  have installed the NI measurement studio 7.0.1 on my computer yesterday.
    I have added a CWGraph control on a dialog of MyProj via "Project-> Add To Project->Components and Controls...->Registered ActiveX Controls->CWGraph Control".
    It created 22 classes such as "CCWGraph/CCWPlots/CCWPlot/CCWAnnotations......." in my MyProj,
    Now, I create a variable m_GraphCtrl for the CCWGraph Control by classwizard.
    I want to used following codes to create a wave and show on the control,  in my debugging , it's running no problem, but the control not show a wave.
    I have add a plot "1" in the contrl's Properties "Plots".
    I have set the "Axes-XAxis-Auto scale" and "Axes-YAxies-1-min 0: max 255" in the control's Properties.
    code:
    VARIANT vrtItem, vrtData, vrtFirst, vrtInc;
    vrtItem.vt = VT_BSTR;
    vrtItem.pcVal = "1";
    vrtFirst.vt = VT_I4;
    vrtFirst.lVal = 0;
    vrtInc.vt = VT_I4;
    vrtInc.lVal = 1;
    vrtData.vt = VT_BYREF|VT_UI1;
    vrtData.pbVal = CH1WaveData;//unsigned char CH1WaveData[2500];there have had value already.each value is between 0~255.
    // Graphs
    m_GraphCtrl.GetPlots().Item(vrtItem).ClearData();
    m_GraphCtrl.GetPlots().Item(vrtItem).PlotY(vrtData, vrtFirst, vrtInc);//no wave show on the CWGraph control
    //annotations
    m_GraphCtrl.GetAnnotations().Item(vrtItem).GetCaption().SetXCoordinate(0.00);
    m_GraphCtrl.GetAnnotations().Item(vrtItem).GetCaption().SetYCoordinate(200.00);//this codes worked good,
    m_GraphCtrl.Refresh();
    Who can tell me why ???

    Hi Johannes,
    Did you get a chance to read this thread?
    http://exchange.ni.com/servlet/ProcessRequest?RHIVEID=101&RPAGEID=135&HOID=506500000008000000B3E20000&UCATEGORY_0=_342_%24_7_&UCATEGORY_S=0

  • How can I get Measurement Studio out of Evaluation Mode in Windows XP

    I have a licensed Measurement Studio version 7.1.  for Visual Studio 6.   I have been using this no problem on a Windows 2000 computer.   I installed this on my WindowsXP computer and it installs all the VB libraries put not the C++ libraries.  I message pops up stating that I need Service Pack3 for WindowsXP.    First of all, I don't think service pack 3 for Windows XP exists yet.  Luckily, I have been able to still use all my DataSocket components.  I believe Datasockets are part of Measurement Stuidio.   I notice that CWgraph has evaluation mode on the graph and I get a popup message in VB6 stating I'm using Measurement Studio in evaluation mode.   

    Hello,
    The service pack in question is not for Windows XP.  The Measurement Studio installer required the VC++ 6 service pack 3 or higher.  I know that Microsoft has a service pack 6 for Visual C++ 6, and this is what you should install to get the C++ libraries on your machine.
    There is a tool on the CD that is in the ActiveXLicenseFixer folder that you can run to fix up the license.  If you have a valid license on the machine it will correct any licenseing issues.
    -Jeff
    NI

  • NI Measurement Studio UI components for Visual Basic 6.0 message box

    Hey All,
    North West Quality Analyst was recently installed on my LabVIEW development machine. Whenever I launch NWQA I get a dialog box to install "NI Measurement Studio UI Components for Visual Basic 6.0" for program called "Program Name."
    I cancel out of the install and I can use NWQA just fine. However, I would like to eliminate the install attempt. Any ideas on how to do that?
    I've tried to find the installer file on the Distribution discs, but on the two that I thought it would be on, "Measurement Studio Enterprise Support for Visual Studio 6.0" and "Measurement Studio Enterprise Edition" the file named "MStudioUIDemo.msi" was not found.
    Thanks,
    -Andrew

    Below is the text from the event viewer warning...
    Detection of product '{7B0F253A-C7A2-4335-B041-99868E9EDEE8}', feature 'UI_Controls', component '{A44FC66B-252B-11D4-A77B-00104B6CE77D}' failed. The resource 'C:\WINNT\system32\CWHlpBtn.ocx' does not exist.
    I have lots of stuff installed on the computer... MS Office, Codewarrior, Roxio, IE, MatLAB, etc.
    Looking under MAX, I have the following NI software installed.
    LabVIEW 6.1 (Advanced Analysis, Application Builder, Database Connectivity Toolset), 7.1 (Advanced Analysis, Application Builder), Runtime 6.0, 6.1, 7.0, 7.1, MAX 3.1.1.3003, NI-488.2 2.20, NI-CAN 2.2f2, NI-DSA, NI-IMAQ, NI-Motion, NI-PAL, NI-Switch, NI-USI, NI-VISA 3.2, Measurement Studio 6.0 (For Visual Basic(ActiveX User Interface, ActiveX 3D Graph, ActiveX DataSocket, ActiveX IMAQ))
    The Dell box is running Window's 2000.
    I found a listing under "Computer Management" -> System Information -> Software Environment -> Loaded Modules
    that seems to have all the installed apps and such. I can send that to you privately if you desire.
    Thanks,
    -Andrew

  • Measurement Studio Visual C++ 6.0 Multithreads

    I want to use the dialog editor to add NI controls to a dialog (or CFormView) and want to set CNiInterface to SingleThreaded. How do I do this. I do not want to create the controls dynamically because I do not want to deal with license strings. I get an error if I close the dialog box when a control is added with the dialog editor. Is this because the controls by default are created as multithreaded with caching? I get by this by calling destroy window on the control. Is this the proper way? Will I have to do this if I use singlethreaded?
    Next the documentation says I need to initialize COM. Is this true. Is it not enough to call
    AfxEnableControlContainer() in OnInitInstance of my application.
    By the way
    National Instruments, Your documentation leaves quit a bit to be desired!! Good grief.

    The default thread access for the Measurement Studio C++ controls is CNiInterface::MultipleThreadsWithCaching. You do not have to dynamically create the control if you want to create the control with CNiInterface:ingleThread - just specify it in the dialog class constructor's member initialization list. For example, if you had a dialog class called CTestDialog and you had a member variable for the graph in the dialog class called m_graph:
    CTestDialog::CTestDialog(CWnd* pParent /*=NULL*/)
    : CDialog(CTestDialog::IDD, pParent), m_graph(CNiInterface:ingleThread)
    Also, you should not need to initialize COM to use the controls in a dialog. The call to AfxEnableControlContainer in your InitInstance method should be sufficient.
    - Elton

Maybe you are looking for