jiypan,
The normal approach I've seen is the reverse of what you describe.
Attributes are assigned to the components and then the parts list diplays the relevant attributes in the assy.
It sounds a bit dangerous to try and work the other way around.
For example you could assign 2 different descriptions in sepearate assy's that call up the same component or even worse different materials for the same part number.
A grip example of creating attributes for the current work part would be as follows:
STRING/PARTNO(132)
STRING/ATTA(2,132)
ATTA(1) = 'DB_PART_NAME'
ATTA(2) = PARTNO
ASATT/PART,ATTA,7
atta is an array conting the attribute name and the data to assign to it. PARTNO would be a variable with the part number defined in it or could be substituted for a har coded string.
The VB.NET Version would be:
Dim theSession As Session = Session.GetSession()
Dim PartNo As String
theSession.Parts.Work.SetAttribute("DB_PART_NAME", PartNo)
Hope that helps.
Mark Benson
CAD Support Engineer