From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

NI TestStand Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
0 Kudos
MimiKLM

Bug report. Collision between the name of the property and API function

Status: New

Recently I came accros situation like that:

 

I have a local container called AAA with the subproperty called "Name".

 

Then I'd like to change the name of the AAA container using the API function ".Name".

 

However, when I call Local.AAA.Name, instead of changing the name of AAA container I'm accessing the subproperty with this name.

 

I think the name "Name" should be reserved as a name of subproperty.

 

 

1 Comment
dug9000
NI Employee (retired)

You can still access the name API property as follows:

 

Locals.AAA.AsPropertyObject.Name

 

The "API in expressions" feature was not in TestStand originally, and thus there are backwards compatibility implications if we were to either make it give precedence to API properties or to disallow using a name that conflicts with an API property. Thus the current behavior of TestStand is to give precedence to the subproperty when there's a conflict with an API property, and by using AsPropertyObject a user can still access the API property if needed.

 

I do think the AsPropertyObject workaround needs to be made more obvious though. It does not show up in the list when you type '.', but it does work.

 

Hope this helps,

-Doug