2 Replies Latest reply on Jul 7, 2015 9:06 AM by Thomas Nagy-Zambo

    PMP Control Interfaces

    Thomas Nagy-Zambo



      I'm trying to get access to the members exposed by IPropertyManagerPageControl: 2015 SOLIDWORKS API Help - IPropertyManagerPageControl Interface Members

      AND the members exposed by IPropertyManagerPageTextbox: 2015 SOLIDWORKS API Help - IPropertyManagerPageTextbox Interface Members  for the SAME textbox.


      Essentially I need to be able to change the .Top parameter and the .Text parameter but they are under different interfaces.


      Any help would be appreciated, I am working in c#.



        • Re: PMP Control Interfaces
          Simon Turner

          You can declare a variable of type PropertyManagerPageControl and set it to a PropertyManagerPageTextBox. Then you can use both sets of methods.


          Dim myTextBox as PropertyManagerPageTextBox

          Dim myPropCtrl as PropertyManagerPageControl


          Set myTextBox = 'enter your code to create the text box here

          Set myPropCtrl = myTextBox

          myPropCtrl.Top = 100

            • Re: PMP Control Interfaces
              Thomas Nagy-Zambo

              Thanks! Here is the working c# code for anyone who needs it:


              IPropertyManagerPageControl pmpControl;

              IPropertyManagerPageTextbox textbox1;


              textbox1 = (IPropertyManagerPageTextbox)group2.AddControl(textbox1ID, controlType, "string", align, options, "string");


              pmpControl = (IPropertyManagerPageControl)textbox1;

              pmpControl.Top = 10;


              textbox1.Text = "different string";