Showing results for 
Search instead for 
Did you mean: 

How can I access the "User Attributes" through VB?


2016-05-20 11_23_55-LMS Test.Lab Desktop Advanced - 2016-04-29 XBB BR10 VCB17 - Sirene.png

I’m trying to set/change the "User Attributes" of a Test.Lab project. So far I only managed to load an attribute list file (*.dtp) using the IBook::LoadAttributesList member:


TestLabBook.LoadAttributesList "Z:\Attribute List.dtp", 0, 1


I would like to run thought each attribute and update it after the list was loaded.


Re: LMS Test.Lab not able to read in block data

Siemens Valued Contributor Siemens Valued Contributor
Siemens Valued Contributor

I think the only thing you are missing is a “Set” command before “propBlock”.   The line should read:

Set propBlock = block_watch.Data

In VBA, a set command is needed whenever you are assigning a value to an object (rather than assigning to a simple numeric or string variable).  "propBlock" was previously defined as an IBlock2 object.

Note that many of the examples provided with Test.Lab are written for VB.Net, which has some syntax differences compared to VBA.