I got a problem of merging refs...
the key-in command 'reference merge all' fails to merge some refs but it's just fine if I manually select those refs and choose the menu item 'merge into master', so I try to copy elements from ref through vba, again the problem of this approach is elements on levels turned off in ref are copied in. it seems like there is an un-documented MDL function 'mdlElmdscr_fromReference' can do the trick, will this func be supported in the future?
any comments & suggestions are welcome...
Your post is confusing. How do you plan to merge references …
Unknown said:there is an un-documented MDL function 'mdlElmdscr_fromReference
How did you find that undocumented function? No matter: there is a documented function that serves the same purpose: mdlElmdscr_readToMaster
Regards, Jon Summers LA Solutions
I'm using a MVBA to merge refs, and in the MVBA, I use MicroStaiton key-in 'reference merge'. as I said, it does not work for certain files, so I'm looking into alternatives, such as MDL functions
VBA is pretty capable, and I doubt that you need any MDL functions. Rather than queuing a command (which is no different than keying-in that command), use the scanner to obtain an ElementEnumerator from your source model. Use the destination model's CopyElement method with a CopyContext object to perform the magic you want.
MicroStation VBA help documents the above methods, and provides some examples on how to use them.
Prefer to post questions about VBA to the VBA Forum. The Programming Forum is haunted by MDL programmers and the like.