Similar to individual elements, layers can also be assigned to individual reference priorities.With the following VBA example, any of the references attached to the current model can have its priority changed.
Dim OATT As Attachment
Const RefPriority = 5 'is a value from -5 to 5
For Each oAtt In ActiveModelReference.Attachments
If UCase(oAtt.Name) Like "*" Then
oAtt.DisplayPriority = RefPriority * 1000000
In this specific example, each reference whose name begins with "TEXT" is set to the highest priority, which is always on top. The range is from -5 to 5, whereas the reference priority is given a weight of 1,000,000.This has a reference priority that always takes precedence over default priority and high priority items.