Hello everyone!
I wanna develop a new tool to disable users from selecting elements belonging to a specified level.The final effect shows below.Whenever cursor hovers over those elements,it will show forbidden.It would be very helpful if you can show me some key code or whatever!
What development language to you plan to use? Your topic title is C++, your tags mention .NET and C#.
Regards, Jon Summers LA Solutions
Thanks!In fact,I use C++.NET to develop functions and use C# to design interfaces at the same time.
Unknown said:I use C++.NET to develop functions
Use the MicroStationAPI class MstnElementSetTool. User picks elements and the tool gives you an ElementAgenda of picked elements. You can choose to accept or reject elements as they are picked.
Here's an example of a Pick Tool. There are more examples delivered with the MicroStation SDK.
Hi,Jon,thanks very much.The method you supply is the basic method of locating elements when a tool running.However , what I need is no matter what tool is running, the level is always unable to be selected under MicroStation environment.
Unknown said:No matter what tool is running, the level is always unable to be selected under MicroStation environment
You're asking if there's a generic 'ignore elements on level X' capability, for any MicroStation tool, not just the tool that your write?
Hi,Jon.Thanks very much!That`s what I mean,just like the key-in command Lock->Level->On did to the not-active levels,I would like the same effect take on the specific level.
How about mdlLocate_setFunction (LOCATE_GLOBAL_LOCATE, xxx) ?
HTH, YongAn
Answer Verified By: HacTache
Yes,this function fulfill my needs.