I have OpenRoads Designer CE 2021 Release 2 and Visual Studio 2022.
Using C# I wish to access the Measure area tool under Analyze/Measure/
How can I access this tool and add/remove some UI/functionality. Can you please point me to any documentation on what Dll is being used and how to use it? Appreciate!
Hi Mohan,
Mohan Palleti said:I have OpenRoads Designer CE 2021 Release 2 and Visual Studio 2022.
be aware in OpenRoads CE 2021 Release 2, Visual Studio 2017 Pro is supported officially (I hope I remember the version right). But as long as you use C#, it is fine to use VS2022 (the only requirement is to target NET Framework 4.6).
Mohan Palleti said:Using C# I wish to access the Measure area tool under Analyze/Measure/
It is not how MicroStation API works: MicroStation API is designed to create own tools (and interact with platform engine etc), not to access/modify user tools.
Mohan Palleti said:How can I access this tool and add/remove some UI/functionality.
Generally, you cannot. But this tool is specific a bit, because in VBA COM / Interop API, MeasureReults1 and MeasureReults2 properties are available, so it is possible to access the measurement results from VBA or NET Interop code.
But it is not possible to modify GUI of any MicroStation tool. When you want to have similar tool with different GUI, you must implement your own tool.
Mohan Palleti said:Can you please point me to any documentation on what Dll is being used and how to use it?
What is your knowledge of MicroStation API? When your tool does not create elements, but you need to select one or more of them, to use DgnElementSetTool class is the way to go.
You should start with MicroStation SDK examples (the most of them are C++, a few in C#, but both of them can be used for learning).
You should also check Developers and Programming main page, where links to different sources are available. To visit BDN web can help too.
With regards,
Jan
Bentley Accredited Developer: iTwin Platform - AssociateLabyrinth Technology | dev.notes() | cad.point
Thank you, Jan, for your quick response.!
I asked this question while we are awaiting the SDK's to be installed. We were researching to see if Bentley's MDL allows modification of their UI controls apart from providing Dll libraries. We did not want to reinvent the wheel if we could use/modify controls.
Mohan Palleti said: We were researching to see if Bentley's MDL allows modification of their UI controls apart from providing Dll libraries.
I am not sure how it would work: MicroStation tools use GUI build using WPF (NET) or MicroStation resources, so It can hardly be modified, because implemented on top of code at background.
Mohan Palleti said:We did not want to reinvent the wheel if we could use/modify controls.
The ability to implement own tool is one from core features of MicroStation SDK, so it's not about reinventing the wheel. It's about to design and implement the wheel you exactly need and that suits your needs.
Regards,