INFO "Get" function for REFERENCE SET attributes

Good morning,
Do you have any advice for extracting Reference SET attributes?

with the function below I extract the attributes of the part...


myAttributeInfo = workPart.GetUserAttribute(_attributeTitle, NXObject.AttributeType.String, -1)
_attributeValue = myAttributeInfo.StringValue
myAttributeInfo = workPart.GetUserAttribute(_attributeTitle1, NXObject.AttributeType.String, -1)
_attributeValue1 = myAttributeInfo.StringValue

But how does it work with reference sets?

It works similarly for reference sets, but first you need to get the desired reference set. The part has a method called .GetAllReferenceSets that you can use to iterate through and find the one you need. Something like below:


Dim myRefSet as ReferenceSet = nothing
Dim targetName as string = "TEST"
For Each tempRefSet As ReferenceSet In workPart.GetAllReferenceSets
If tempRefSet.Name.ToUpper = targetName.ToUpper Then
'get and/or set attributes as necessare
If tempRefSet.HasUserAttribute(...
End If
Next

I send the link of the file, so you can help me better.
In the first Form I set the name of the reference set.
So in the second FORM I fill in the attributes only of the Referenceset.
When loading the second FORM it loads the attributes of the PART, but I would like it to read the attributes of the Referenceset selected in the first form

LINK To DOWNLOAD

I sent