03-05-2015 10:36 PM
Hi!
I'm trying to create a user command script to automatically set the X-Axis of a Curve when a channel is dropped onto a 2D Axis System. All of our channels are in groups and each group has it's own time channel:
Since they are consistently named, it would be really nice to be able to set the X-Axis with a User Command. I have the basic template below (I'm new to DiAdem) but I don't know what methods to use to finish it.
Call AddUserCommandToEvent("View.Events.OnDrop", "MyOnDrop") Sub MyOnDrop(oContext, oDropInformation, ByRef bProceed) Set elements = oDropInformation.DIAdemElements If oContext.DisplayObjType = "CurveChart2D" Then For Each element in elements Next End If bProceed = TRUE End Sub
Any help would be most appreciated! Thanks!
03-06-2015 02:37 PM
Hi Thomas,
I've found a knowledge base article that seems to be doing something similar to what you're looking at. It's on the subject of programmatically assigning data channels to a graph object, and can be found here. Additionally, it might be useful to look at this documentation on commands and variables within DIAdem while writing your script. The ChnIndex variable, for example, might be useful to grab the time channel by index and assign it to the plot axis.
Regards,