Showing results 1 to 4 of 4

Thread: WPFProperty not supported by the object

  1. #1
    Join Date
    06.12.2012
    Posts
    6

    Default WPFProperty not supported by the object

    Dear all,

    I have encountered a problem with the WPF element which was described at Copa Data blog: http://blog.copadata.at/wp/?p=38. I have all the assemblies and when I put a wpf element and link it to chart.xaml file on the screen in editor it is loaded, however when I start runtime the wpf element is not visible at all!!!

    When I run my VBA script in debugmode:

    Public Sub PassDataDirect()
    
        Dim obElement As Element
    
        Set obElement = thisProject.DynPictures.Item("Start").Elements.Item("elem")
        
        If IsEmpty(obElement) Then MsgBox "no"
    
        obElement.WPFProperty("Chart1", "ValueName") = "intern1"
    
    obElement.WPFProperty("Chart1", "Value") = thisProject.Variables.Item("intern1").Value
    
     obElement.WPFProperty("Chart1", "AddValue") = True
    
    End Sub

    I get an error: runtime error 438, object doesn't support this property or method at the lines with WPFProperty. What is the reason for that? It is not shown during runtime operation though.

    Thanks for your help

  2. #2
    martins Gast

    Default Re: WPFProperty not supported by the object

    hi,

    can you see your WPF in the editor (when you open the configuration dialog for the WPF, can you see your controls on the upper-left tree view?) The control hosting the property is called Chart1 there? Does the property exist in the properties list?

    The WPF element in the zenon screen is called "elem" for sure?

    Is the variable where you get the value from online?

    I will try this myself tomorrow and let you know how it worked for me.

    best regards,
    Martin

  3. #3
    martins Gast

    Default Re: WPFProperty not supported by the object

    hey,

    works perfectly fine for me - even copied your code, no problem at all.
    One thing that came to my mind: did you install the WPF toolkit?

    See my attached backup as a sample.

    Best regards,
    Martin
    Attached Files Attached Files

  4. #4
    Join Date
    29.01.2015
    Posts
    10

    Default Re: WPFProperty not supported by the object

    Quote Originally Posted by martins View Post
    hey,

    works perfectly fine for me - even copied your code, no problem at all.
    One thing that came to my mind: did you install the WPF toolkit?

    See my attached backup as a sample.

    Best regards,
    Martin

    Hi I have no problems on this. But May I know how to make the chart update in real time instead of clicking on the button to update the chart?

    Thank you.
    Best Regards,
    Victor

Similar Threads

  1. What SNMP versions are supported in what versions?
    By stolyarov_as in forum zenon Supervisor
    Replies: 2
    Last Post: 20th September 2013, 07:42
  2. Object Model In VS2012
    By allmendinger in forum VSTA
    Replies: 1
    Last Post: 2nd August 2013, 00:00
  3. How to get Object in Screens
    By jorgedatcom in forum VBA
    Replies: 1
    Last Post: 9th January 2012, 00:32
  4. VBA Object Overview
    By robertf in forum VBA
    Replies: 0
    Last Post: 16th August 2007, 10:18

Posting Rules

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •