3 Replies Latest reply on Aug 30, 2011 11:43 AM by jwdanie

    General VbsEdit Question


      I'm new to scripting and VbsEdit so please go easy on me if I don't use the standard terminology. This should be simple but I can't find the answer anywhere. When editing in VbsEdit there is an Object Browser window. In that window there are objects listed with methods, properties, etc. listed. When I add code, say dealing with Excel, it adds an Excel object to the object list.


      Is there a way to get it to add DxDesigners objects?



      Thanks in advance for your response.

      Ray Haynes

      Oceanside, CA

        • 1. Re: General VbsEdit Question



          Any time you call CreateObject, VBSEdit will load the type library for that COM server, and display the objects/methods/properties/enums in the object browser, as well as the code completion prompts.


          If your script is designed to connect to a running instance of DxDesigner, you can trick VBSEdit like this:


               If 1 Then

                    Set vdapp = GetObject(,"Viewdraw.Application")


                    Set vdapp = CreateObject("Viewdraw.Application")

               End If


          VBSEdit will load the type library to use while editing the script, but will connect to the running DxDesigner application instead of creating a new instance at runtime.


          For best performance, you will want the script to run in the same process as DxDesigner, so you can change the Set vdapp = GetObject to Set vdapp = Application.



          • 2. Re: General VbsEdit Question

            Thanks John, exactly what I was looking for.

            • 3. Re: General VbsEdit Question

              I found that you can also just put the CreateObject in a comment and VBSEdit will still load the browser data.


              ' CreateObject("Viewdraw.Application")