Hi Jan, thanks for the response.
"I am not quite sure, but I recommend to evaluate simple scenarios first. So I think you should to test your code in MicroStation for one design file with some attachments. It should give a proof if the problem is in the code or it's because you are accessing MicroStation from external process or opening design files for program (not everything is initialized and accessible in this case)."
I tried the code with a single file but the result was the same. oAttachment.Levels.Count was still zero and no level displays were changed.
"Is there any reason why are you at the same time controling MicroStation externally and using OpenDesignFileForProgram?"
Not really. This code was modified from an earlier script which I created to change the Annotation Scale for a large number of dgn files and has always worked ok.
"Another question, but not related to the discussed problem: Why do you save the file in the loop?"
Probably for no good reason other than I feel more secure having actively saved the file rather than relying on it being done automatically. Do you have a suggestion as to how this could be done better (or even left out altogether)?
/James