V8i SS2 VBA - Text rotation

I'm looking to replace an old mdl routine that rotates a text element by user selection (single, fence, or all) to the active angle set in MicroStation using VBA.  I've not made it completely through my book "Learning MicroStation VBA" yet, so I'm at a lose as to where to start.  The idea is to click the button to activate the code, then select the text to rotate with an option of selecting multiple pieces of text by individual selection or by using the Element Selection tool.  How should I need to attack this?

Thanks in advance,

Dustin

Parents
  • Hi Dustin,

    How should I need to attack this?

    At first I guess it should be discussed why such "rotate tool" is needed and in what aspect standard MicroStation tools do not suit you.

    These details can have a substantial impact on what approach is the best.

    to replace an old mdl routine

    You should be aware VBA is very limited comparing to MDL, so often exactly the same functionality cannot be achieved. But all features have to be discussed upfront to identify whether such problem can arise.

    The idea is to click the button to activate the code, then select the text to rotate with an option

    Because your tool will modify existing elements, you have to implement ILocateCommandEvents class.

    With regards,

      Jan

  • Thanks for the info, Jan.  I have seen the ILocateCommandEvents class in some of the vba's that I've found while searching on the net.  The main reason for needing this tool is when we receive a survey drawing from the surveyors, the text needs to be rotated flat to the bottom of the screen when it is referenced into our sheet files.  It is a quick way of rotating the text without having to do a 2 point rotate and risk changing the elevation of the elements.  Plus with the elements not having the same rotation angle, you have to rotate each element or group of elements separately.  With this option, I can element select what I want to rotate and rotate them all at the same time, then moving the elements so there's no overlap.  Saving a lot of time having to edit each element on each sheet.  I'll continue through my book until I get to the chapter that covers the ILocateCommandEvents class.

    Thanks again, Dustin

Reply
  • Thanks for the info, Jan.  I have seen the ILocateCommandEvents class in some of the vba's that I've found while searching on the net.  The main reason for needing this tool is when we receive a survey drawing from the surveyors, the text needs to be rotated flat to the bottom of the screen when it is referenced into our sheet files.  It is a quick way of rotating the text without having to do a 2 point rotate and risk changing the elevation of the elements.  Plus with the elements not having the same rotation angle, you have to rotate each element or group of elements separately.  With this option, I can element select what I want to rotate and rotate them all at the same time, then moving the elements so there's no overlap.  Saving a lot of time having to edit each element on each sheet.  I'll continue through my book until I get to the chapter that covers the ILocateCommandEvents class.

    Thanks again, Dustin

Children