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.

G#

cancel
Showing results for 
Search instead for 
Did you mean: 

What's the differences between ClassAttributes and ObjectAttributes?

K{P$CP]$WYH50ZBCVHA10QQ.png

0 Kudos
Message 1 of 3
(3,147 Views)

HI,

 

ObjectAttributes - are unique for each object.

ClassAttributes - are shared by all objects in the class, actually you don't need any objects at all to use class attributes. Compared to C#, class attributes are the same as "static".

 

As you might notice, the util method GetClassAttributes.vi doesn't even have any reference in and reference out in the connector pane. You can also create a class that only contains class attributes, which is the "Static template" when creating a new class.

 

The reason they are called ClassAttributes and not StaticAttributes are due to backward compability to old GOOP.

 

Mattias

Message 2 of 3
(3,134 Views)

Thanks for your explanation。

0 Kudos
Message 3 of 3
(3,120 Views)