set AssemblyBody Color

[ Edited ]

I have an AssemblyDocument




I want to set "TBR1002.asm" body color.

I have Programming, but running error.


Set SEAssem = SEApp.Documents.Open(StrFileName, False)

Set SEAssemOcc = SEAssem.Occurrences("TBR1002_1.asm:1")

Set SEAssem_1 = SEAssemOcc.OccurrenceDocument

Set SEAssemOcc = SEAssem_1.Occurrences("TBR1002.asm:1")

Set SEAssem_1_1 = SEAssemOcc.OccurrenceDocument

SEAssem_Assem.AssemblyBodies(1).FaceStyle = SEAssem_Assem.FaceStyles("Yellow")


Posted by: zxm342500
Post date: 1/30/2013 8:09:25 AM


set AssemblyBody Color

You can not select occurrences by name, but by index only. You have to recursively loop through all items of the Occurrences collection and take use of the i.e. FullName property to determine the occurrence you are interested in.


Posted by: Wolfgang Kunert
Post date: 1/30/2013 1:34:27 PM