Google Answers Logo
View Question
 
Q: Microsoft's MSBNx in C# ( No Answer,   0 Comments )
Question  
Subject: Microsoft's MSBNx in C#
Category: Computers > Software
Asked by: coed_codingjunky-ga
List Price: $30.00
Posted: 13 Jan 2006 08:50 PST
Expires: 12 Feb 2006 08:50 PST
Question ID: 432890
I need help getting to solve a compile error in C# using MS's MSBNx
COM.  I am using Visual Studio 2003 and C# 2005 Express. My goal is to
manually add nodes to a MSBN3Lib.Model.  I am able to load an existing
file successfully with this method.
<code>
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using MSBN3Lib;
.......
        private void button1_Click(object sender, EventArgs e)
        {
            MSBN3Lib.MSBN aMSBN = new MSBN3Lib.MSBN();
            MSBN3Lib.Model model1 = aMSBN.Models.Add("Auto",
@"C:\Program Files\MSRASI\msbnx\Samples\Networks\auto.dsc",
@"C:\Program Files\MSRASI\msbnx\Samples\Networks\errorfile.log",
INFERENUM.ine_Default, RECOMMENDENUM.recommendtype_Default);
            axDgVw1.BeginInit();
            axDgVw1.Model = model1;
        }
</code>

THIS is the method I need help on.  I can not get it to to compile
succesfully and create the nodes.  It seems that C# needs all of the
arguments but I don't understand how to satisfy the requirenment. I am
basically tring to rewrite this Visual Basic code from the example
http://research.microsoft.com/adapt/MSBNx/msbn3/Overviews/Distributions.htm
in C#.
<code>
        private void button2_Click(object sender, EventArgs e)
        {
            MSBN3Lib.MSBN aMSBN = new MSBN3Lib.MSBN();
 MSBN3Lib.Model model1 = aMSBN.Models.Add(textbboxWord.Text,
null, null, MSBN3Lib.INFERENUM.ine_Default,
MSBN3Lib.RECOMMENDENUM.recommendtype_Default);
           MSBN3Lib.Node aNode;
           MSBN3Lib.Dist aDist;
           MSBN3Lib.Properties aProp;
************** Does not compile*****************
           aNode = model1.ModelNodes.Add("EngineStart", "Is engine
started?", ref model1, ref model1, aDist, aProp);
************** Does not compile*****************
           //aNode.set_States("Working");
           //aNode.set_States("Broken");


            axDgVw1.BeginInit();
            axDgVw1.Model = model1;
        }
</code>

Can you make sure that it compiles for whom ever answers the question
before posting an answer?
Thank you very much.
Answer  
There is no answer at this time.

Comments  
There are no comments at this time.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy