Cancel
Showing results for 
Search instead for 
Did you mean: 

Path reading of LMS Test.lab automation

Creator
Creator

Hello everyone
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
very much.

14 REPLIES 14

Re: Path reading of LMS Test.lab automation

Creator
Creator

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.

Re: Path reading of LMS Test.lab automation

Siemens Legend Siemens Legend
Siemens Legend

Dear,

 

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.

 

 

 

Re: Path reading of LMS Test.lab automation

Creator
Creator

美信图片20190219104342.png美信图片20190219104339.png

 

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.

Re: Path reading of LMS Test.lab automation

Siemens Legend Siemens Legend
Siemens Legend

Dear,

 

In attach you can find a basic application with all the requested functionality.

Hopeful, this helps you in further developing your application.

 

Re: Path reading of LMS Test.lab automation

Creator
Creator

That's exactly what I need, dear, thank u a lot.

Re: Path reading of LMS Test.lab automation

Creator
Creator

Dear:
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.

 

picture.png

Re: Path reading of LMS Test.lab automation

Siemens Legend Siemens Legend
Siemens Legend

Dear,

 

The latest data were you are pointing at is data belongs to a Waterfall.

I updated the example with this kind of data.

 

Regards

Re: Path reading of LMS Test.lab automation

Creator
Creator

123.png

Dear:
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?

Re: Path reading of LMS Test.lab automation

Siemens Legend Siemens Legend
Siemens Legend

Dear,

 

What do you mean with export? How are doing the export? example of export to text.