Mike Le Posted March 10, 2014 Report Share Posted March 10, 2014 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. Quote Link to comment
mje Posted March 10, 2014 Report Share Posted March 10, 2014 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... Quote Link to comment
Ton Plomp Posted March 10, 2014 Report Share Posted March 10, 2014 I think it is because the GrapChart also covers some 3d graphing objects: GraphChart (p, m, e)IntensityChart (p, m) IntensityGraph (p, m, e) MixedSignalGraph (p, m, e) WaveformChart (p, m) WaveformGraph (p, m, e)DigitalGraph (p) XYGraph (p) (source: http://zone.ni.com/reference/en-XX/help/371361K-01/lvprop/propmeth_class_hierarchy/) Ton Quote Link to comment
Mike Le Posted March 11, 2014 Author Report Share Posted March 11, 2014 Thanks for that, Ton. That makes sense. I do wish there were a level that combined 2D Charts and Graphs, though. They share so much common functionality and are a bit more common than the 3D examples (at least in my experience). Quote Link to comment
shoneill Posted March 11, 2014 Report Share Posted March 11, 2014 I think it is because the GrapChart also covers some 3d graphing objects: (source: http://zone.ni.com/reference/en-XX/help/371361K-01/lvprop/propmeth_class_hierarchy/) Ton I don't see 3D in that list, but I do see intensity graphs and charts.... Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.