I'm a new learner of testlab, now I want to achieve the function of test data export through automation, when the path is set in advance, I can export the data of specified path, but I hope to achieve data selection and output in the VB interface, I've been able to read the name of sections and blocks, but can't read the name of the project inside the red box in the figure, like the runnames and so on. Has anyone ever done any relevant cases, or give me a little hint, thank you
Solved! Go to Solution.
I know that this function can be achieved if the name is fixed during the test, but I hope to achieve more functions. At the same time, I want to learn more about it. If someone has done something about it, please give me a hint. Thank you again.
First, if you are new to Automation, I advise you to follow a standard training class about Test.Lab Automation.
This for gaining the details and the in and outs of Test.Lab Automation.
Now, i think you try to find some endpoints or data blocks in a processed run.
Depending on the processing, you can end-up with a different folder structure.
some good commands:
* database.GetSections => returns all sections of a project
* database.ElementNames(pathToTop) => returns an attributemap with all elements in that request path.
* database.ElementType(pathToTop) => returns a string, the type of a database element. eg. "Section", "Run","Folder","Block",...
As we don't know what you try to achieve, ask for spefic question with some illustration.
This is my software interface,The test file is shown in the figure above,When I choose
section name G13, I want to read "G13-idle-new" and "G13-idle-origin" and add it to the list,and when I choos G13-idle-new and choose the project, the block name can be read and add to the rigt list. Finally, when I choos a block,the path is generated and the data can be export.
I'm sorry to bother you again.Your previous code help me a lot, but now I find a problem. when I want to get spectrum data and get a 1/3 octave chart, there's an extra menu here. I can't read these data by using the previous method. Can you give me some hints?
Thank u very much, Hope everything is find with you.
Thank you for your generous help,The new question is, using the path above, I can export the data of this block to the text file, but when I use the path below, the software always reports errors, can't read the path, is there any thing wrong with the path setting?