cancel
Showing results for 
Search instead for 
Did you mean: 

Generate control from strict type control reference

steady
Member

Generate control from strict type control reference

Hi all,

 

I am working on a large program of legacy. It has a large cluster of strict type control reference. You know, it can be used to pass controls on main vi front panel to subvis. The problem is the "type conflict" error occurs when I connect certain control to the subvi using the type. So I hope I can know what the control pointed by the reference looks like. The ideal way is I can get an instance of control from the "control reference". Is it doable?

 

Thanks in advance.

4 REPLIES 4
srikrishnaNF
Active Participant

Re: Generate control from strict type control reference

hi steady,

  ofcourse when you are using strict control reference,defintely you will get the instance of the control and you will have access to all the properties.But if you use a normal control reference(not a strict reference) ,you will need to use "to more specific class vi" to act upon the instance of the control.As you said, you can almost guess the control from the appearance of the strict control reference.

 

 

Thanks and regards,

srikrishnaNF

Regards,
Srikrishna


steady
Member

Re: Generate control from strict type control reference

srikrishnaNF,

 

Thanks for your reply. Maybe you didn't understand what exactly I want. It may be not sensible but i just want to have a try. What I want is to "generate" an instance from a "strict control reference".... It is sort of to generate an "Instance" from a "Class". The reason why I need it is that, i have 2 control references of very close definition, but i want to know what the differences are.

 

Regards,

Steady

王晓建
NI Employee (retired)

Re: Generate control from strict type control reference

Hi Steady,

 

To create a control is very like to create an "Instance" from a "Class", but the "Class" is a control definition from .ctl file, not a reference. A reference is some what like a pointer, so it is not likely that you could create an "Instance" from the knowledge of a pointer. Would just opening two .ctl files and comparing them a way to your need?

 

 

Xiaojian Wang

Ben
Knight of NI Knight of NI
Knight of NI

Re: Generate control from strict type control reference

Message contains a hyperlink

@steady wrote:

srikrishnaNF,

 

Thanks for your reply. Maybe you didn't understand what exactly I want. It may be not sensible but i just want to have a try. What I want is to "generate" an instance from a "strict control reference".... It is sort of to generate an "Instance" from a "Class". The reason why I need it is that, i have 2 control references of very close definition, but i want to know what the differences are.

 

Regards,

Steady


If you switch to the wiring tool, turn on the help window and float the wiring tool over the wire of the type def, the help window will show you the data of the type def.

 

This Nugget was written to help with control refs. I t may be interesting reading. Don't worry about the end section. It is an adventure in exploring the question of how to use control refs without knowing their definitions.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel