The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum for Programming
 Forum for Origin C
 [C# Programming]How to draw multi lines in origin
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

lostinT

China
2 Posts

Posted - 06/05/2014 :  04:17:40 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
I'm new in Origin Progarmming, I try to draw three lines in the View.And here is my brief code .When I run it,it shows only two lines.Where is my mistake? Thanks advance!

targetWks.Colums[0].LongName = "Time";
targetWks.Colums[0].Units= "a.u2";
targetWks.Colums[1].LongName = "Line1";
targetWks.Colums[1].Units= "a.u2";
targetWks.Colums[2].LongName = "Line2";
targetWks.Colums[2].Units= "a.u2";
targetWks.Colums[3].LongName = ":Line3";
targetWks.Colums[3].Units= "a.u2";


float[,] data = new float[100, 4];
for (int i = 0; i < 100; i++)
{
data[i, 0] = (float)(i * 0.01 - 1.23);
data[i, 1] = (float)(i / 12);
data[i, 2] = (float)(i );
data[i, 3] = (float)(i + 10);
}
targetWks.SetData(data, 0, 0);


lostinT

China
2 Posts

Posted - 06/05/2014 :  04:19:42 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
if it is necessary,I will paste the code file,thanks

Hello world!
Go to Top of Page

cpyang

USA
1406 Posts

Posted - 06/05/2014 :  12:57:40 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Did you try the examples provided in the product?

For example, this one

<exe>\Samples\Automation Server\CSharp\SendNumericDataToWks

CP
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000