Jump to content

Why does a "GraphChart" reference not have access to "ActivePlot" and individual Plot properties?


Recommended Posts

I'm creating some Subpanel Actors to act as reusable plotters. One of the things I'm doing is splitting from a parent class into two concrete instances, one containing a Chart and one containing a Graph.

 

There are some abstract methods common to both Actors that could theoretically be handled in the parent class, except they require access to control properties like ActivePlot, Plot.Name, Plot.Visible, etc. I tried using a generic GraphChart reference, but found that it doesn't give access to these properties. You have to pass in a Chart OR a Graph reference.

 

My solution has been to put the code into the concrete methods, but I find myself with essentially identical code in two places, accessing identically named properties, except with either a Chart or Graph property node.

 

Does anyone know why the GraphChart doesn't have access to these properties? Anyone have a more elegant workaround?

 

Thanks.

Link to comment

I find examples like this scattered throughout the VI server hierarchy. Don't know if you'll get a 'why' answer, it just 'is'. Sorry, don't have an obvious recommendation for you.

My assumption is things ended up like this as features were slowly tacked on without proper consideration for where they ought or could be in the hierarchy. Details like this give me the impression that the underlying implementation is not as clean as it could be...

Link to comment

I think it is because the GrapChart also covers some 3d graphing objects:

 

 

  • GraphChart (pme)
    • IntensityChart (pm)
    • IntensityGraph (pme)
    • MixedSignalGraph (pme)
    • WaveformChart (pm)
    • WaveformGraph (pme)
      • DigitalGraph (p)
      • XYGraph (p)



(source: http://zone.ni.com/reference/en-XX/help/371361K-01/lvprop/propmeth_class_hierarchy/)

 

Ton

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.