Hi Michael,
The Intent code below adds or changes the value of the string attribute on a face (or anything else that has .AttributeSets property). Full type name (with namespace) should be used: {color:#ff9900}
{color:#0000ff}Inventor.ValueTypeEnum.kStringType{color}:{color}
Method AddIntentAttribute( face As Any, attName As String, attValue As String) As Any
Dim attss = face.AttributeSets
Dim atts 'Attributeset
If( attss.get_NameIsUsed("Intent")) Then
atts = attss.get_Item("Intent")
Else
atts = attss.Add("Intent")
End If
Dim att 'Attribute
If( atts.get_NameIsUsed( attName))Then
att = atts.get_Item(attName)
att.Value = attValue
Else
att = atts.Add( attName, {color:#0000ff}Inventor.{color}ValueTypeEnum.kStringType, attValue)
End If
Return att.Name + ": " + att.Value
End Method
Thank you,
--Alex Korzun
Intent Development
Thank you,
Alex Korzun
Inventor-Revit Interop / Inventor-Fusion Interop / Inventor ETO
Autodesk, Inc.