Programmatic audit trail item?

Discussion of application development using iX Developer, including but not limited to getting started, using the functions tab, properties, objects and installation.
Post Reply
asccloutier
Posts: 8
Joined: Sat Oct 19, 2013 6:19 pm

Programmatic audit trail item?

Post by asccloutier »

Is it possible to programmatically add items to the Audit trail?

Globals.AuditTrail.????

I want to log some PLC changes (panel push button) to the HMI audit trail and I thought I could use the value change handler. I know that data loggers are typically used for PLC values but in this case I would really like to have them in the audit trail.

Thanks.

Aaron

User avatar
Russ C.
Posts: 213
Joined: Thu Nov 16, 2017 3:32 pm
Contact:

Re: Programmatic audit trail item?

Post by Russ C. »

Audit trail actions can be added manually in scripting using these methods:

Code: Select all

        void LogAction(string objectName, string eventName, string action, string actionObjectName, string actionInstanceName, string description);
        void LogAction(string objectName, string eventName, string action, string actionObjectName, string description);
        void LogAction(string objectName, string eventName, string action, string actionObjectName);
        void LogDataItemChanged(string dataItemName, VariantValue valueBefore, VariantValue valueAfter);
        void LogDataItemChanged(string dataItemName, string description, VariantValue valueBefore, VariantValue valueAfter);
        void LogMessage(string message);
        void LogMessage(string message, string description);
        void LogMessage(string message, string description, string userName);

Code: Select all

Neo.ApplicationFramework.Generated.Globals.AuditTrailService.LogMessage("My Custom Audit Trail Message")
Best regards,

Russ
(801) 708-6690
Technical Support
Contact Us

Beijer Electronics AB
http://www.beijerelectronics.us

Post Reply