PDM Task Add-in SetupPage Not Responding

The form I created with winform does not appear in the task plugin setting page. task setting page Not responding


resim

               currentSetupPage = new SetupPage((IEdmVault7)poCmd.mpoVault, props);
                //currentSetupPage = new SetupPage();
                currentSetupPage.CreateControl();
                currentSetupPage.LoadData(ref poCmd);

                EdmTaskSetupPage[] pages = new EdmTaskSetupPage[1];
                pages[0].mbsPageName = "Sayfa5";
                pages[0].mlPageHwnd = currentSetupPage.Handle.ToInt32();
                pages[0].mpoPageImpl = currentSetupPage;
               
                props.SetSetupPages(pages);

on SetupPage.cs

public void LoadData(ref EdmCmd poCmd)
        {
            //MessageBox.Show("Burada3:");
            try
            {
                IEdmTaskProperties props = (IEdmTaskProperties)poCmd.mpoExtra;
                TextBox1.Text = props.GetValEx("MyTestSetupVar").ToString();
            }
            catch (COMException ex)
            {
                MessageBox.Show("HRESULT = 0x" + ex.ErrorCode.ToString("X") + ex.Message);
            }
            catch (Exception ex)
            {
                MessageBox.Show("Mesaj8:" + ex.StackTrace);
            }
        }

I think your setup page needs a parameterless constructor. Remove the vault and props parameters.

I tried that but don’t change

Push your code to GitHub. I will take a look at it.

1 Like

I solved it by changing the winform type. Resolved by setting the type to “User Controll Form”.

2 Likes