vba replacement for docls.ma

For anyone who liked using the old docls.ma application in Microstation v8i, I obtained an old vba file from another forum member which functioned very similar to the mdl application. I believe Linienstileplazieren.mvba was written by Artur Goldsweer from Bentley back in 2006. I tested the vba in CONNECT and it worked for the most part.

The mdl version would place a line using each line style available within the active workspace and place the name of the line style at the end of the corresponding line element. Using the vba, the line elements were placed, but the style name was not being placed.

I modified the vba so the style name is placed to the left of each line element. I also modified the Text Height to 0.01 (compatible with our files using annotation scale). Since the test is being placed to the left of the line element, I added a line to adjust the justification of the active test style to Right Center. I added a line to reset the text style at the end.

One big issue with the mdl version was the lines were stacked pretty tightly and you had to spend a lot of time separating the elements. The vba worked much better, but I also increased the spacing between each element so, if you adjust the annotation scale, there is less chance of overlapping.

I discovered the text was not being placed because the line of code sending the text to the keyin browser was incorrect. Originally it was CadInputQueue.SendCommand oLinst.Name. Changing .SendCommand to .SendKeyin resolved the issue.

Anyhow, I wanted to post the vba file here in case anyone is interested in using it.DocumentLineStyles.mvba