Mit dieser Tollbar / Script kann man sehr einfach die Einstellungen im Schaltschrankaufbau verändern
Vielen Dank an:
Bernd, mBabilon, Nairolf

Suplanus - Scripts - Artikelplatzierung (1161 Downloads)

Diskussionsthread P8-Magic

public class MountingPlateHandling
    {
        [DeclareAction("SetRotationAngle")]
        public void SetUserRotationAngle(string angle)
        {
            Eplan.EplApi.Base.Settings oSettings = new Eplan.EplApi.Base.Settings();
            oSettings.SetDoubleSetting("USER.PanelLayoutGui.Settings.RotationAngle", System.Convert.ToDouble(angle),0);
        }

        [DeclareAction("SetPlacementDirection")]
        public void SetUserPlacementDirection(string direction)
        {
            Eplan.EplApi.Base.Settings oSettings = new Eplan.EplApi.Base.Settings();
            oSettings.SetStringSetting("USER.PanelLayoutGui.Settings.Direction", direction, 0);
        }

        [DeclareAction("SetGripperPosition")]
        public void SetUserGripperPosition(string position)
        {
            Eplan.EplApi.Base.Settings oSettings = new Eplan.EplApi.Base.Settings();
            oSettings.SetStringSetting("USER.PanelLayoutGui.Settings.Gripper", position, 0);
        }

        [DeclareAction("SetGripperFromMacro")]
        public void SetUserGripperFromMacro(string from_Macro)
        {
            Eplan.EplApi.Base.Settings oSettings = new Eplan.EplApi.Base.Settings();
            if( from_Macro.ToUpper() == "YES")
            {
                oSettings.SetBoolSetting("USER.PanelLayoutGui.Settings.GripperFromMacro", true, 0);
            }
            else
            {
                oSettings.SetBoolSetting("USER.PanelLayoutGui.Settings.GripperFromMacro", false, 0);
            }
        }

        [DeclareAction("SetDataOvertaking")]
        public void SetUserDataOvertaking(string data_from)
        {
            Eplan.EplApi.Base.Settings oSettings = new Eplan.EplApi.Base.Settings();
            oSettings.SetStringSetting("USER.PanelLayoutGui.Settings.DataOvertaking", data_from, 0);
        }

    }