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

couturier

France
291 Posts

Posted - 08/22/2018 :  5:56:32 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release (Select Help-->About Origin): 2018b
Operating System: win10

Hi,

Is there any way to know if a column is locked by any operation (Xf output or set col value) ?

Thanks

yuki_wu

896 Posts

Posted - 08/23/2018 :  03:23:06 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi couturier,

There are a few of functions may help:
https://www.originlab.com/doc/OriginC/ref/OriginObject-GetIncomingOperation
https://www.originlab.com/doc/OriginC/ref/OriginObject-FindIncomingOperations
https://www.originlab.com/doc/OriginC/ref/DataObject-IsFormulaAutoUpdate

I also thought of a tricky method:
void IsLocked()
{
   	Worksheet wks = Project.ActiveLayer();
   	Column col(wks, 1);
    if(!col)
        return;
    vector& vec = col.GetDataObject();
	double dCur = vec[0];
	double dNew = -999;
	try{
		vec[0] = dNew;
	}
	catch(int nErr)
	{
		out_str("Locked");
		return;
	}
	vec[0] = dCur;
	return;
}

Hope it can be some help.

Regards,
Yuki

OriginLab

Edited by - yuki_wu on 08/23/2018 03:24:35 AM
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