Ravi Beniwal Posted August 12, 2011 Report Share Posted August 12, 2011 I need to draw objects in a 3D Graph Control, just like we do in the 3D Picture Control. Since the 3D Graph Control is "made from" the 3D Picture Control, I got the 3D Picture Control ref from the convenient property node. Then I created a cube and drew it in this picture control ref. Now the result wasn't what I wanted, but it also didn't surprise me. All the axes and grids were wiped out and all I got was the cube. Now if I rotate the view and leave the mouse button, the cube is gone and we get the axes and grid planes back. The 3D Graph Control probably has a redraw function that made this happen. Is there a way to hack the 3D Graph Control so that we can use the surface plots, cursors etc. that it was intended for, but also draw geometries and textures as we can do with the 3D Picture Control? Drawing Object in 3D Graph Control - 2009.vi Quote Link to comment
Yair Posted August 13, 2011 Report Share Posted August 13, 2011 The 3D graph, if memory serves, is an unlocked XControl, so you should probably be able to edit it, although I don't know how easy it would be and you would need to create a copy of the entire library so that it's not overwritten when you upgrade LV. Presumably it's somewhere in vi.lib and you should be able to easily see it by right clicking a 3D graph and selecting Advanced>>Show Diagram, which I believe should be available in all XControls. Quote Link to comment
Ravi Beniwal Posted August 13, 2011 Author Report Share Posted August 13, 2011 The 3D graph, if memory serves, is an unlocked XControl, so you should probably be able to edit it, although I don't know how easy it would be and you would need to create a copy of the entire library so that it's not overwritten when you upgrade LV. Presumably it's somewhere in vi.lib and you should be able to easily see it by right clicking a 3D graph and selecting Advanced>>Show Diagram, which I believe should be available in all XControls. Thanks for the clue! I've done something similar to the XControl for Spectrogram in the Order Analysis toolkit in the past. I'll try this one and will post the code if something good comes out of it. Quote Link to comment
Ravi Beniwal Posted August 15, 2011 Author Report Share Posted August 15, 2011 That came to a screeching halt in no time... The XControl is password protected! Quote Link to comment
vugie Posted August 16, 2011 Report Share Posted August 16, 2011 Is there a way to hack the 3D Graph Control so that we can use the surface plots, cursors etc. that it was intended for, but also draw geometries and textures as we can do with the 3D Picture Control? You should rather do it like this: However I'm not sure whether XControl could do something later with objects you add. That's a question to its developer. You may also get access to individual elements of a graph (also without any warranty). Example how to do it is here. I personally avoid to use new object style XControls for 3D plots. Loading time is a sufficient reason. Stability is second one. 1 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.