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
 setlinetype - not defined or matching prototype
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

Karsten8

Germany
23 Posts

Posted - 02/17/2022 :  10:34:45 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release: 2019 9.6.172
Operating System:win10

Hello,

it would be great if you can help me to understand the c-functions.
Using the setlinetype does not work whereas setcolor works fine
in my Code. The error message is:

:Error, Member function DataPlot::SetLineType not defined or does not have matching prototype.

I used this page to read about the setlinetype: https://www.originlab.com/doc/OriginC/ref/DataPlot-SetLineType

Here is my Code to Change the line style of all Graphs inside my project:

void set_line_type(string& graph, vector<int> input){
GraphPage gp(graph);
foreach(GraphLayer gls in gp.Layers){

for (int i = 0; i < input.GetSize(); i++){
DataPlot dps = gls.DataPlots(input[i]);
dps.SetLineType(3); // <- causes the error
dps.SetLineType(LINE_STYLE_DASH); // <- causes error as well
dps.SetColor(1, TRUE); // <- this works
}
}
return;
}

In other words the compiler gives an error messeage when I use the setlinetype but I think I use it as proposed (see web page at the top). I didn't found other examples using setlinetype and the search function couldn't help as well.

Thanks for your help.
Best regards

Karsten8.

cpyang

USA
1406 Posts

Posted - 02/17/2022 :  3:26:51 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Looks like that was not available in your version.
I checked that it works in current version 2022.

CP
Go to Top of Page

Karsten8

Germany
23 Posts

Posted - 02/18/2022 :  02:03:37 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi CP,

thanks for your answer.

Regards,
Karsten8.

*closed Topic.
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