2 Replies Latest reply on Dec 26, 2013 6:46 AM by Sanjay Phadke


    Sanjay Phadke

      Hello All


      I tried to use following code from API help manual

      I want to cpature event such as when user select block in drawing environment then the Property page manager dialog comes on screen

      I want close this page automatically when user selects

      this page has onclose button  - when this button is clicked page closes


      Dim swModel As SldWorks.ModelDoc2
      Dim DialogId As Integer
      Dim Title As String
      Dim Handler As Object
      Dim value As PropertyManagerPage

      Set swApp = GetObject("", "SldWorks.Application")

      Set swModel = swApp.ActiveDoc


      value = swModel.GetPropertyManagerPage(DialogId, Title, Handler)



      I get following error as

      Object variable or with block variable not set



      Kindly suggest the solution for the same


      - Sanjay

        • Re: GetPropertyManagerPage
          Artem Taturevych

          This is the obsolete method to create a property page. You have this exception because ‘handler’ parameter is nothing. You need to use SldWorks::GetRunningCommandInfo method for your needs which will return the currently opened Property Manager Page. You can also capture the DSldWorksEvents_CommandOpenPreNotifyEventHandler to handle the moment when the property page is opened.