You are currently reviewing an older revision of this page.
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.
Sub ReferencePriority()Dim OATT As AttachmentConst RefPriority = 5 'is a value from -5 to 5For Each oAtt In ActiveModelReference.Attachments If UCase(oAtt.Name) Like "*" Then oAtt.DisplayPriority = RefPriority * 1000000 oAtt.Rewrite End IfNext
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.