Origin Pro7.5_SR6:
Operating System: Win-XP
The following OriginC function is intended to make some fine adjutments on line objects drawn on a graphpage.However when implemented as shown below, the LT_get_var and LT_set_var functions both return true but do NOT set or get the variables concerned. Is this a bug or am I missing something ??
bool Adjust_Lines()
{
GraphPage gP=Project.GraphPages(-1);
GraphLayer gL=gP.Layers();
if(gL.IsValid()==true)
{
foreach (GraphObject gO in gL.GraphObjects)
{
if(gO.GetObjectType().CompareNoCase("Line")==0)
{
double Value;
string strLine=gO.GetName();
string strLTvar=strLine;
strLTvar+=".x1";
if(LT_get_var(strLine,&Value)==false) return (false);
Value=nint(Value);
if(LT_get_var(strLine,&Value)==false) return (false);
strLTvar=strLine;
strLTvar+=".x2";
if(LT_get_var(strLine,&Value)==false) return (false);
Value=nint(Value);
if(LT_get_var(strLine,&Value)==false) return (false);
strLTvar=strLine;
strLTvar+=".y1";
if(LT_get_var(strLine,&Value)==false) return (false);
Value=nint(Value);
if(LT_get_var(strLine,&Value)==false) return (false);
strLTvar=strLine;
strLTvar+=".y2";
if(LT_get_var(strLine,&Value)==false) return (false);
Value=nint(Value);
if(LT_set_var(strLine,Value)==false) return (false);
}
}
return (true);
}
return (false);
}