Is this possible? And how?
Yes, it is possible. Just use '\n' to split the text.
Could you please provide an example of text and how it should be split.
If the text has spaces and you put it in a rectangle (or other shape) text graphic (see text tool palette in the Draw toolbar) the text will break at spaces when it exceeds the width of the rectangle/shape. For this to work well you would need to make sure the rectangle is wide enough to accommodate the longest piece of text without spaces. If there are parts of the string that are short enough to fit the width, even if there are spaces in between, it won't wrap those; just the lines that are too long to fit.
If the text doesn't have spaces you'll need other solutions, such as one of the ones given above.
Well, something like this will split a text string into bit sized bits...
>>> veryLongText = "ahdsgs hdfgsdt jshsst ktpoiyus lorhsjks lsoshft dfagwqrt" >>> textLen = 10 >>> while len(veryLongText) > 0: ... newText = veryLongText[:textLen] ... print newText ... veryLongText = veryLongText[textLen:] ... ahdsgs hdf gsdt jshss t ktpoiyus lorhsjks lsoshft df agwqrt >>>
Yes, same question here.
Thanks Kishor, that's it. But in your solution I have to edit the attributes.
Is there also a possibility to do this automatically? Split the text in a certain lenght without editing the attributes?
Los miembros registrados pueden publicar, seguir actualizaciones y más. ¿Nuevo aquí? Regístrate gratis.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.