2 Replies Latest reply on Sep 9, 2015 6:13 AM by mario petta

    Error customizing Workflow Manager controls

    mario petta

      Hi,

       

      I'm almost new to ArcFM, and I have a problem.

      I'm trying to create a custom control (Windows Form) and replace the Design Control with my custom control, on the Workflow Manager, when the Design is in a certain state.

      This is what I'm trying to do:

       

          [ComVisible(true)]

          [ClassInterface(ClassInterfaceType.None)]

          [Guid("F04D9E3F-05BB-4719-9403-BD1D61BFD710")]

          [ComponentCategory(ComCategory.MMProcessMgrControl)]

          public class SinergisControl_Design: IMMPxControl

          {

              Sinergis_DesignerForm DesignForm;

              IMMPxApplication myApp;

       

              public SinergisControl_Design()

              {

                  DesignForm = new Sinergis_DesignerForm();

              }

       

              #region IMMPxControl Members

       

              public bool Enabled

              {

                  get

                  {

                      return true;

                  }

                  set

                  {

                      value = true;

                  }

              }

       

              public void Initialize(object vInitData)

              {

                  myApp = vInitData as IMMPxApplication;

                  DesignForm.Show();

              }

       

              public bool IsInitialized

              {

                  get { return true; }

              }

       

              public string Name

              {

                  get { return "Design Custom Control"; }

              }

       

       

              public IMMPxNode Node

              {

                  set

                  {

                      IMMPxNode node = value;

                  }

              }

       

              public bool StateComplete

              {

                  get { return true; }

              }

       

              public bool Visible

              {

                  get

                  {

                      return DesignForm.Visible;

                  }

                  set

                  {

                      DesignForm.Visible = value;

                  }

              }

       

              public int hWnd

              {

                  get { return DesignForm.Handle.ToInt32(); }

              }

       

              #endregion

          }


      After registering the COM object, if I open Process Framework Administration Tool, in the STATES TAB I click the Control Dropdown, and the name of my custom object ("Design Custom Control") appears in the list, so I can select it.

      Then, when I try to open Workflow Manager, and to click on a Design, NO controls appear on the right side of the window. If I look at the Windows Event Logger, I can see an error like this:

      2015-08-07 12:10:42,143 [1] ERROR  [(null)] - mmPxBaseUI.dll::PxState.:

      mmPxBaseUI.dll::PxState.IMMPxState_Control

      Object required

      Error at line: 63 - Build: 10.21.1854

       

      Could anyone help me to figure out this problem? Thank you.

       

      Mario