DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

CHN COMBOBOX CHANNELS ASSIGNMENT

Solved!
Go to solution

How do I use the channels selected in the combobox or chncombobox inside the TDR report.

How do I assign the channels selected in the combobox or chncombobox to a new variable name.

Difference between combobox and chncombobox.

 

Regards,

X. Ignatius

 

0 Kudos
Message 1 of 9
(6,675 Views)

Hi Igni,

 

The chncombobox automatically shows all the channels that happen to be in the Data Portal at the moment.

 

The combobox shows only the texts that you intentionally add to it.

 

Please clarify the rest of your question,

Brad Turpin

DIAdem Product Support Engineer

National Instruments

0 Kudos
Message 2 of 9
(6,647 Views)

Dear Bradin,

 

Is it possible to draw a 2 d XY graph by selecting X channel in one chncombobox and Y channel in another chncombobox. Could you explain with an example script.

 

Regards,

X. Ignatius

0 Kudos
Message 3 of 9
(6,629 Views)

Dear Bradin,

 

Is it possible to draw a 2 d XY graph by selecting X channel in one chncombobox and Y channel in another chncombobox. Could you explain with an example script.

 

Regards,

X. Ignatius

0 Kudos
Message 4 of 9
(6,629 Views)

Hi X. Ignatius,

 

Yes, that can work just fine.  You'll need a button on the SUDialog to cause VBScript code to run that reads the X and Y channel paths from the ChnComboBoxes and assigns them to the curve configuration of a particular graph in REPORT.

 

If you'll send me your *.sud and *.tdr files, I can provide the code to make that happen.

 

Are you using DIAdem 2012 or an earlier version?  The functions to do this changed in DIAdem 2012.

 

Brad Turpin

DIAdem Product Support Engineer
National Instruments

0 Kudos
Message 5 of 9
(6,617 Views)

Dear Brad,

 

Pls find the attached files containing .sud, .tdr and .vbs.

 

Request you to modify to suit my requirement.

 

Thanks and Regards,

X. Ignatius

0 Kudos
Message 6 of 9
(6,442 Views)

Dear Brad,

 

Attachment missed in previous text.

 

Regards,

X. Ignatius

0 Kudos
Message 7 of 9
(6,439 Views)
Solution
Accepted by topic author Igni

Hi Igni,

 

These changes in your SUDialog appear to do the trick on my end.

 

Sub Button1_EventClick(ByRef This) 'Created Event Handler

  Call PicDelete()
  Call PicLoad(CurrentScriptPath & "XY.tdr")
  PicDefByIdent = 1 ' Name-Oriented channel referencing
  Call GRAPHObjOpen("2DAxis1")
    Call GRAPHObjOpen("2DObj1_Curve1")
      D2CChnXName = XSelection.Text
      D2CChnYName = YSelection.Text
    Call GRAPHObjClose("2DObj1_Curve1")
  Call GRAPHObjClose("2DAxis1")
  Call PicUpdate()
  Dialog.Cancel()	
	
End Sub

 

Brad Turpin

DIAdem Product Support Engineer

National Instruments

0 Kudos
Message 8 of 9
(6,199 Views)

Thank you very much Brad.

 

It works.

 

Regards,

X. Ignatius

0 Kudos
Message 9 of 9
(6,186 Views)