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
 Origin Forum
 Using project level constants in column operations
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

mikewinifred

5 Posts

Posted - 10/02/2014 :  3:06:30 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hi all,

I created a project level constant (const myConst = 1.234;) in the AfterOpenDoc section of ProjectsEvents.OGS file, per documentation, however, I am not able to use the constant in a workbook column operations. For eg: (myConst * Col(A)) doesn't work, how to use these constants in workbook columns? Appreciate any help. Thanks.

Mike.

greg

USA
1378 Posts

Posted - 10/02/2014 :  4:29:14 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
The AfterOpenDoc code runs in its own scope. If you need to define variables here you should wrap then thus:
@global = 1; // Make declarations global in scope
const myConst = 1.234;
@global = 0; // Restore normal
Go to Top of Page

mikewinifred

5 Posts

Posted - 10/02/2014 :  4:50:11 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Worked ! Thanks.

Mike
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