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
 Text labels
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

Mike Buess

USA
3037 Posts

Posted - 12/06/2004 :  12:47:41 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Version (Select Help-->About Origin): 7.5 SR5
Operating System: XP

Is it possible to create text labels in Origin C? I know how to change the text of an existing text label but can't seem to find out how to create one from scratch.

Mike Buess
Origin WebRing Member

rlewis

Canada
253 Posts

Posted - 12/06/2004 :  3:55:07 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
I can't think of any apart which does not involve LT_execute ..
For example ...

 
bool CreateLabel(string strLabelName, string strLabelText, bool OverWriteFlag)
{
Page pG=Project.Pages();
Layer Layr=pG.Layers();
if(Layr.IsValid()==true)
{
GraphObject grObj=Layr.GraphObjects(strLabelName);
if(grObj.IsValid()==true && OverWriteFlag==false)
{
SetDataDisplayText("Error return ... Cannot Overwrite");
return (false);
}
string strLTCommand="Label -s -n "+strLabelName+ " "+strLabelText;
LT_execute(strLTCommand);
return (true);
}
SetDataDisplayText("Error return ... Invalid Objects");
return (false);
}
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