[v8i VBA] Dropped elements of complex chain in attachment has wrong levels

Hi,

I'm using a VBA script to drop all elements of an active file and its attachments and copy them into another file. It has worked fine for years - until now.

Example:
I have an active dgn file with one attachment to it. Exporting elements from the active file is no problem at all, no matter what type.
Now the attachment: inside of it there is a complex chain with a few linestrings and arcs.
If I use Microstations property dialog it shows level "A" for complex chain header and also level "A" for child elements.
When I debug my script it shows level "A" for complex chain header and after dropping that and stepping through returned ElementEnumerator elements those elements have level "B".

It seems like Microstation is not able to get right level information when dropping complex elements that came from an attachment.

Did someone else stumbled across that behavior? What did you do? Any help would be greatly appreciated!

Regards
Stephan

Parents Reply
  • Hi Jan,

    thank you for your fast reply. As far as I know (I'm not at office right now) I don't use any kind of CopyContext there. It is just that I enumerate through all of the elements from the attachment and if I get a complex chain I drop it and enumerate through it's subelements. At that point the debugger already shows "wrong" values. Copying to another file is done later.

    But you are right: I will try to simplify the code and the main file/attachment as much as possible while keeping the error and then I can post some code and data here.

    Regards,
    Stephan

Children