abullen Posted March 22, 2006 Report Share Posted March 22, 2006 I have developed a XControl that includes several internal methods. I would like to programmatically invoke these methods from outside the XCtl but I can't find a way to programmatically obtain an appropriate XCtl reference (i.e. one that allows access to these methods). Among other things, I have tried using the OpenG VI "Open VI Object Reference" which gives the correct reference but no access to the internal methods (probably cos it doesn't recognize XCtls as an allowable vi object class). Any help or suggestions would be greatly appreciated. Andrew Quote Link to comment
AutoMeasure Posted March 22, 2006 Report Share Posted March 22, 2006 Andrew, I don't see a problem on my machine (LV 8.0.1 on Win XP). I can right-click on the XControl's terminal and select Create Reference. I can wire that reference into a subVI. In that subVI, I can wire the reference terminal into an Invoke Node. I can click on that Invoke Node to see a list of methods. My custom XControl methods appear at the bottom of the list under a separator line. Quote Link to comment
Jeff Plotzke Posted March 22, 2006 Report Share Posted March 22, 2006 I would like to programmatically invoke these methods from outside the XCtl but I can't find a way to programmatically obtain an appropriate XCtl reference (i.e. one that allows access to these methods). Just to be sure, you're creating your custom methods for your XControl by right clicking on the XControl in the Project Explorer and choosing New > Method, correct? Quote Link to comment
abullen Posted March 23, 2006 Author Report Share Posted March 23, 2006 Andrew,I don't see a problem on my machine (LV 8.0.1 on Win XP). I can right-click on the XControl's terminal and select Create Reference. I can wire that reference into a subVI. In that subVI, I can wire the reference terminal into an Invoke Node. I can click on that Invoke Node to see a list of methods. My custom XControl methods appear at the bottom of the list under a separator line. Joe, Thanks for your suggestions. The steps you suggest also work for me however my problem is a little more complicated. To elaborate a little: I'm wanting to create and manipulate multiple instances of the same Xctl at run-time. I want to manipulate these Xctls by calling their internal methods (and properties) using a control references. I can instigate multiple XCtls just fine but referencing them after that hasn't been possible so far. Essentially, I need a programmatic way of "I can right-click on the XControl's terminal and select Create Reference". Also using LV 8.0.1 on Win XP. Thanks Andrew Just to be sure, you're creating your custom methods for your XControl by right clicking on the XControl in the Project Explorer and choosing New > Method, correct? Yes. 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.