1 Reply Latest reply on Feb 25, 2016 1:24 PM by John Alexander

    Concatenate multiple text lines into one note?

    Patrick Malone

      I was given a drawing where every single line is a stand alone single line of text (:-\)

      then they were arranged so to look like paragraphs of text.

       

      My question is has anyone written anything (or come across such) that will take a selection of text entities

      and create a single note containing all the text in the order that they were selected?

       

      Currently I have to select/copy/paste each individual line into to top most line after a carriage return.

       

      Let me be clear, I am not asking anyone to write anything.

      I am asking is such code already exists.

      This cannot be the first time this has ever been encountered.

       

      I have an Autocad lisp routine that does this but this is the first time I needed to accomplish the same thing in SW

       

      Any help is appreciated!

        • Re: Concatenate multiple text lines into one note?
          John Alexander

          I'm not aware of anything now - I think it might not be very hard to do.

           

          You should be able to get a list of selected objects from the SelectionManager. Step through that list and check if each entity is a note object. From there, you could sort them according to vertical position - I think this would be better than figuring out the selection order as it doesn't constrain the user to select notes in a sequence.

           

          From there, you can step through each note and append the text to a string with a carriage return between each addition.

           

          Finally, assign the string to the note with the highest y-position, and delete the rest of the notes.