V8i COM/VBA - Activate and dectivate reference destroys attachments object?

Hi together,

I've noticed some strange behaviour when I activate and deactivate a reference file and want to figure out if it's maybe a bug. I'am using MicroStation V8i SS3 with a master.deg with two references (ref.dgn and b.dgn). I do the following steps:

  1. Start VBA Editor and run a Test Sub ( set a watch to Application.ActiveModelReference.Attachments.Item(1) ) --> values are fine
  2. activate ref.dgn
  3. deactivate ref.dgn
  4. Run Test Sub again --> values of attachment ar no longer valid (<The object is no longer valid.>)

after step 1:

after step 4:

Do I have to refresh something? If I don't run the Sub before activating and deactivating the object is fine too.

Kind regards

Marcel

Parents Reply
  • Hi Jan and Artur,

    thanks for the very quick replies. So I tried to workaround it with the newfile keyin and it worked. Unfortuantely the design file is re-opened. With big files this is not what you expect if you use activate/deactivate references. So I tried the keyin "reference reload force abc.dgn" and it seems to work as well. Slow for big references but even faster as newfile. 

    Hope there will be a fix for that.

    Kind regards
    Marcel

Children