Get Text From Multiple Multileaders

Hi All,

I’m trying to get the text content from multiple multileaders in the same drawing. I’ve seen the thread below

I’ve tried using

OUT = IN[0].InternalDBObject.MText.Text

which works when selecting a single multileader but I need a fix for feeding multiple objects into the input.

Try this:
OUT = [ i.InternalDBObject.MText.Text for i in IN[0] ]

Note that this will now fail if you pass a single item in instead of a list. For both you’d need to expand the code to ensure the data received from the Dynamo environment is a list.

2 Likes

Thanks @jacob.small , worked like a charm!