Automating setting part attributes at instance level.
Automating setting part attributes at instance level.
(OP)
I am trying to do automatic assignment of part attributes but need them to be applied at the level above the part.
Normally I do this by right clicking on the object that I want to set the attribute to and then selecting properties. Then I go to the attributes tab and make sure that the context is set to instance.
The code in the link provided can set an attribute at the component context but I am having trouble figuring out how to make it happen for the instance. Any help would be appreciated.
http://www.nxjournaling.com/content/add-component-...
Normally I do this by right clicking on the object that I want to set the attribute to and then selecting properties. Then I go to the attributes tab and make sure that the context is set to instance.
The code in the link provided can set an attribute at the component context but I am having trouble figuring out how to make it happen for the instance. Any help would be appreciated.
http://www.nxjournaling.com/content/add-component-...





RE: Automating setting part attributes at instance level.
www.nxjournaling.com
RE: Automating setting part attributes at instance level.
RE: Automating setting part attributes at instance level.
CODE
Dim myObject as NXObject myObject = {reference to your object} Dim objects1(0) As NXObject objects1(0) = myObject Dim attributePropertiesBuilder1 As AttributePropertiesBuilder attributePropertiesBuilder1 = theSession.AttributeManager.CreateAttributePropertiesBuilder(workPart, objects1, AttributePropertiesBuilder.OperationType.None) attributePropertiesBuilder1.IsArray = False attributePropertiesBuilder1.DataType = AttributePropertiesBaseBuilder.DataTypeOptions.String attributePropertiesBuilder1.Title = "test" attributePropertiesBuilder1.StringValue = "test value" Dim nXObject3 As NXObject nXObject3 = attributePropertiesBuilder1.Commit() attributePropertiesBuilder1.Destroy()www.nxjournaling.com