Hi All,
We need set reference files and get reference files in a microstation drawing, through our custom code. Please guide me or if possible please provide sample code.
Thanks
If using a .NET language, the simplest way to develop a DLL is to use the Bentley MicroStationDGN InterOp. That provides access to the VBA COM server and its wealth of objects.
The COM interface is well-documented in VBA help. VBA help
Regards, Jon Summers LA Solutions
Hi Jon Summers,
Thanks for the reply.
I am new for microstation. We have a java application, through which we need to get and set references. I know through JNI we can call C++ code. Can you please provide me the code, since I am new microstaion.
Your first post has tags of .NET and C#. Your second post mentions Java and C++. I'm confused.
Here's an article about MicroStation development languages. Does that help?
Hi Jon,
Thanks for the article. We have a java based application but as JMDL is obsolete, so we need to do something on .NET and C#. This thing I need to explore which language JNI supports. But Thanks for VBA guide.
One more thing, I am able to create macro using VBA in Microstation as well as in Excel which provide reference file details. And in case of excel macro I am able to run it via vbs script file.
I don't know whether withing macro in excel is right way or can you tell me how we can run microstation macro through vbs.
Because I am thinking that I will call macro, and it will write all reference file details in local system file, which we can read later on.
Thanks & Regards
Both MicroStation and Excel provide VBA. As you will discover, VBA is similar whichever application provides it. Apart from application-specific classes, one implementation of VBA is like another.
VBA supports COM. You can reference another application from VBA. This works with MicroStation and Excel (and other Microsoft Office products, for that matter).
You can now uses classes from the other application in your VBA code.
Here's an example of VBA code to enumerate references.
Thanks for the example. I am able to get references from Java class.
I am using java com bridge, and from that com bridge,I am able to get and set reference from java.
Thanks for your help.
Thanks Regards
Amit Agarwal