Fellow Microstation Programmers,
If the user selects several pieces of text and text-nodes with a selection window, then how would code determine the "last line" of text? Where the "Last line" is the one with the smallest value on the Y-axis of a 2D drawing?
Thanks in advance,
Christmas May
Unknown said:How would code determine the "last line" of text? Where the "Last line" is the one with the smallest value on the Y-axis of a 2D drawing?
You haven't told us what programming language you will use, so here's some pseudo-code:
Point3d lastPointTextElement lastText
lastPoint.x = 0
lastPoint.y = infinity
For Each text In Collection
If text.Origin.y < lastPoint.y Then
lastPoint.y = text.Origin.y lastText = text
End If
Next text
Regards, Jon Summers LA Solutions
Answer Verified By: Unknown
Educated guess: VBA
Use ActiveModelReference.GetSelectedElements and then follow Jons suggestions.
Good luck.
Sorry, I am using VBA and both answers are helpful.
I'll have to "play some" with the "text.origin" property.
What other languages can you program in and how do they interface with Microstation?
Common, ever heard of google? microstation programming languages
Answer Verified By: Christmas050873
Thanks.