07-11-2013 07:55 AM
Ok I figured this out.
DIAdem apparently wants things to be written in some very precise order, and the following order changed my world :
D2TabHeaderTxt(1, 1) = "Title" 'Title of the first column. D2TabTxtType(1) = "column defined headline" D2TabDataType(1)="Expression" D2TabVariable(1)="@@Tblcol1(d2tabrow)@@" 'First column of Table is now Tblcol1 D2TabHeaderTxt(2, 1)= "Other Title" 'Title of the second column. D2TabTxtType(2) = "column defined headline" D2TabDataType(2)="Expression" D2TabVariable(2)="@@Tblcol2(d2tabrow)@@" 'Second column of Table is now Tblcol2
Before this, I used to mix commands affecting the first column and commands affecting the second one, which ended up badly. Thanks to both of you for your help, I finally made it 🙂
07-12-2013 01:26 AM
Hi Near3
First to the CTRL-A trick, You have to open the dialog box then press CTRL-A. DIAdem records the code that correspond to the dialog box, so in in curve dialog box you will differnt code than in the axis definition dialog box.
Could you make a short outline (as grafic) how you table should look like and describe how your data looks like or paste them here (*.tdm and *.tdx) so I could understand in more detail what you want.
Winfried
07-12-2013 09:27 AM
Hi Near3,
If you don't have the Script Recorder already turned on, then you also need to switch to DIAdem-SCRIPT, click in a new VBScript area, and hit <Ctrl-V> to paste the variable assignments saved to the Windows Clipboard to the new VBScript.
Brad Turpin
DIAdem Product Support Engineer
National Instruments
07-12-2013 09:27 AM
That's ok my problem is solved since my last post !
03-08-2016 07:45 AM
Hi,
I am using DIAdem 2012 and want to create 2d Table programatically. How can I achive that. I mena is there any simple solution apart from this?
Regards
Sarry
03-10-2016 05:29 PM
Hi Sarry,
You can use the Report object in a DIAdem VBScript to create and configure a new table object on a REPORT sheet. Personally, I don't think that's the easiest way to go, but there's nothing stopping you.
Set Sheet = Report.ActiveSheet Set Table = Sheet.Objects.Add(eReportObject2DTable, "NewTableName") Set Column = Table.Columns.Add(e2DTableColumnChannel) Column.Channel.Reference = "Example/Time" Report.Refresh
Brad Turpin
DIAdem Product Support Engineer
National Instruments
03-11-2016 07:15 AM
Thank you!!!
11-14-2017 11:17 AM
Hi Brad,
How can I access to each cell in that 2D table by script?
Thanks,
GQ