Attributes on Border Definitions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have been having trouble storing attributes on border definitions. I have multiple borders which need to be used for different types of drawings. I have developed a tool which will use the desired border pragmatically and it works as planned. Currently the logic selects a border based on name, but since this can be edited by the user I need a more dependable way of retrieving a border. I had thought attributes would be the answer, but I'm running into problems. The attributes just won't stick. I've tried to add them manually through the API and with the Attributes Helper tool released by Brian Ekins on the modthemachine blog. See below for the code I'm using to add the attributes
Dim oAttr As Inventor.Attribute Dim oAttrSet As AttributeSet Set oAttrSet = oBorderDef.AttributeSets.Add("TestAttributeSet", True) oAttrSet.Copy = True Set oAttr = oAttrSet.Add("TestAttribute", kIntegerType, 12345) Debug.Print oAttrSet.Parent.Parent.Name & " " & oAttrSet.Name & " " & oAttr.Name & " " & oAttr.Value
It will print information leading me to believe that the attribute was added, but if I try to retrieve it either through the attributemanager or manually cycling through the border definitions no attributes exist.
Has anyone ran into this before?