03-15-2012 07:42 AM
Hello,
I try to do a table in the report programmatically with Diadem 9, but the problem is that I can not have more than 2 rows and 3 columns.
Can you help me please ?
Thanks
Solved! Go to Solution.
03-15-2012 04:34 PM
Hello kilfoufou,
Here is code that adds an additional column to a channel. Basically, you have to open the table object, add the type and channel name and then close the table object.
Call GraphObjOpen("2DTable1") D2TabDataType(6) = "Channel" D2TabChnName(6) = "[2]/Noise_1" Call GraphObjClose("2DTable1")
In the above example, I edited the table called "2DTable1", added column number 6 as a channel that references the values from a channel called "Noise_1" from group number 2. See screen shot below:
The number of rows displayed is set by the following variables:
Call GraphObjOpen("2DTable1") D2TabAutoScalTyp = "fixed" D2TabBegin = 1 D2TabEnd = 10 D2TabNoDist = 1 Call GraphObjClose("2DTable1")
The D2TabBegin and D2TabEnd define the first and last row to be displayed in your table, and the D2StepWidth specifies the step width between two successive values.
With these variables, you should be able to manipulate the tables to your needs.
I highly recommend doing some research on the <Ctrl-A> function for this kind of question. If the Script recording mode is not enabled, DIAdem copies the dialog box settings to the clipboard when you press <Ctrl-A>. DIAdem records the object hierarchy, which means all commands required for opening and for closing the dialog box.
I hope this helps, feel free to ask if you have additional question,
Otmar
03-16-2012 07:03 AM
Hello Otmar ,
Thanks for your help.
It is the first time that I use diadem so I don’t have any experience.
The program gives me that as results , But is not what I want.
For now, I want to know how can I put 8 columns in order to appear titles
You can see what I want to do just here:
Thanks
03-16-2012 12:11 PM
Hi klifoufou,
You haven't given us enough information to answer your question. I can see what you want more or less from the screenshot, but what we can't see is where that information is stored. Do you have string channels with those values in them, or is each cell in the table from a particular property (what name?) attached to a particular channel (what name?)? In the latter case you will have better options if you're using DIAdem 2011 or later-- what version do you have? Also, you showed a table with 2 rows, do you really only want to show 2 rows, or do you want to show more rows? How many? Is there a row per channel, for example, and all the values on that table row are pulled from the same properties attached to that channel?
A data set would help a lot,
Brad Turpin
DIAdem Product Support Engineer
National Instruments
03-21-2012 04:31 AM
Hi Brad,
I use diadem 9 for crash test and I have to do a macro in order to put the minimum and the maximum in a table for all of the channels.
You can see an example:
I have to put the information in the table: Name, Description, filtering, minimum, maximum and unity...
I could not to have the maximum time and the minimum time for each data.
As you can see in the picture, the both columns of maximum time and the minimum time are empty.
By default, we can see that each column took as title ‘nom filtrage’
we can have situations with 100 channels and it’s impossible to put all channels in one table, So I’m looking for a solution to create another table when the last one reach 20 channels.
I hope that you understand what I want to do and if you can give me a help that will be very nice.
Thank you
03-21-2012 07:42 AM
Hi klifoufou,
OK, that's a lot clearer, thank you. DIAdem 2011 has new feature in the REPORT table to put a different expression in each cell-- this would enable you to link to the specific channel properties where they are already in the Data Portal. In earlier versions of DIAdem, I would suggest your best option is to create a new Group in the Data Portal which has the 8 Channels you want-- one for each table column, filled with all the values you want to see in the multipage table. If creating these 8 Channels is something you're struggling with, I can help with that too, but I'm attaching below an example VBScript that manages spanning a table stored in a one sheet TDR file across multiple sheets. The example script appends the table from the TDR file multiple times and programmatically sets the correct starting row in the Channel for each new sheet (1, 21, 41,... in your case). With this approach you can set the table column headers manually with the mouse to whatever you want and save those settings to the TDR file that gets appended.
Brad Turpin
DIAdem Product Support Engineer
National Instruments
03-21-2012 09:40 AM
Actually I am a trainee, so I can't choose the version of diadem.
About the noun of the column i found a programme which can help me but the problem that I can put the title but i can't enter the information for each column.
For example, for the first column I want to put all nouns of channels: D2TabVariable(1)="@ChnName(d2tabrow)@"
Under, you'll find the programme in order to undersant me better.
Thank you for the help
03-21-2012 12:53 PM
Hi Brad,
I'm using DIAdem for historical data trending.I'm selecting some period of time (for example 03.04.2007-03.21.2012) and I want to show the data in columns (like bars) which are representing the average value of each month of the selected period.How can you help me to implement this.
Regards,
Ruben Arshakyan
03-21-2012 12:58 PM
Hi Brad,
I'm using DIAdem for historical data trending.I'm selecting some period of time (for example 03.04.2007-03.21.2012) and I want to show the data in columns (like bars) which are representing the average value of each month of the selected period.How can you help me to implement this.
Regards,
Ruben Arshakyan
03-22-2012 10:42 AM
Hi Ruben,
It helps us stay organized if we keep each forum thread specifically related to an invidual topic. Therefore, instead of Replying to several different forum threads asking your question, we would appreciate it if you create a new forum topic so that we can keep that new topic thread concentrated on your challenge.