Drawing directly on a faceplate using VBA script

Dear all i am making an application where i have to draw directly (plot an x y graph) on the faceplate USING VBA SCRIPT. I request any experts or experienced people out there to suggest an approach for achieving this.

Any help wud be appreciated ! Thanks

Bhargav

  • You can do this, but the only way I know how is by using an ActiveX object.   There are several out there (or you could create your own) that will plot a bitmap based on the parameters you give it (and then invoking a method).  How you do it specifically depends on what functionality that you're looking for.  In the past I have done this to plot data values from an application that I couldn't interface with DeltaV in any other way.  It was kind of ugly but worked.

  • In reply to Bhargav Ramachandra:

    Bhargav,

    I assume that in your example the bitmapObj is the real name of the object in your picture. If it isn't the real object name you will need to use the real object name

    Parameters of the bitmap object:

    Transparency - Enables the TransparentColor to be invisible and not shown if True.

    TransparetColor - The color that won't be displayed when Transparency is True.

    CurrentImage - Which bitmap to be shown. You can manually configure this to see what it does in Edit mode to check if it will look correct.

    I like to use magenta (16711935 - 255, 0, 255) in my bitmaps to be the invisible color so the picture or object backgroud can be viewed. I think it's a good one because it typically isn't a color being used.

    I always like to remove all the images and then add them back similar to logic below:

       bitmapObj.DeleteImage 1

       bitmapObj.DeleteImage 2

       bitmapObj.DeleteImage 3

       bitmapObj.AddImage "C:/MyFolder/MyFile1.bmp"

       bitmapObj.AddImage "C:/MyFolder/MyFile2.bmp"

       bitmapObj.AddImage "C:/MyFolder/MyFile3.bmp"

    Regards,

    Matt