Skip to Main Content
Need Support? Let’s guide you to the right answer or agent.
Status Shipped
Categories General
Created by Guest
Created on Nov 12, 2021

Ref update sequence VBA issue

I created a VBA macro many years ago, originally to make the active file update last, but I found at some time after we were able to edit the slot number field in the reference dialog that the macro also made the update sequence match the slot edited number order. However it only does that after the file is reopened, it does not make the update order match the slot numbers if run in the same file session.

This method of setting reference update sequence make it easy to see the update sequence in the reference dialog by sorting files by slot number.

It appears that when a file is opened it reads the attachments in the slot order and hence aligns the attachment item numbers with the slot numbers.


I would like to suggest an enhancement if it is possible, to perform that process when the slot number is changed, then the macro will always produce the same results.


I would also like to suggest an enhancement to automatically set the update order to slot order simply by having checkboxs Slot Order ON/OFF, Active Last ON/OFF and if ON, reordering the sequence a soon as the slot numbers are changed. This would be less confusing than the existing system and easy to see without opening another dialog


To reproduce this issue, in an example file with 3 or more reference files, edit the slot numbers to some different values say from slot 1 to 20 and slot 2 to 30 then run the macro. You will see the macro has put the active file last but nothing else changed. Now reopen the file, (check the update sequence is still the same as it was) and run the macro. The macro has now put the files in the slot value order as expected.

The very simple code I use is as follows.

Sub UpdateSeq_SlotOrder_ActiveLast()

Dim i As Integer

For i = ActiveModelReference.Attachments.count To 1 Step -1

ActiveModelReference.Attachments(i).UpdateOrder = 0

Next

SaveSettings

RedrawAllViews

End Sub


Regards,

John Davidson.

  • Guest
    Reply
    |
    Dec 1, 2021

    I believe this was resolved in Service Request: 7001329443.