Isolating 'Text' in list

Hello, I’m wondering if I’ve discovered an issue with the coding of the “Text” object type and how it pertains to lists.

The scenario I’m experimenting with involves isolating all the plain text on a specific layer in model space. My intent is to use the “All Objects on Layer” node to generate the first list, then the “List.RemoveIfNot” node to create a subsequent list with only “Text” objects remaining.

The problem with this approach seems to be that the “Text” object type appears to be coded as “DBText” in the “Object Types” node, whereas within the list generated by the “All Objects on Layer” it is simply “Text”.

In my experimentation the workflow above works fine for isolating objects such as “Polyline” or “BlockReference”, but not “Text”. I’m wondering if this is by design or an oversight of the Dynamo code?

Cheers,
Ryan

Hi @RyanNorbury, welcome!

DBText is the underlying AutoCAD object type for single-line text. The items that you see in the dropdown are more of a description and not the actual object type. For most of them, the description is the same - however there are some where it is different. Text and DBText is one, and another is “Solid”, where the underlying AutoCAD object is actually Solid3d.

Solid3d

So I would say that yes, this is by design. Here are two methods you could try to filter by text objects on a specific layer.


2 Likes

Thanks for the reply, and for providing those workarounds.

It seems to me to be a bit of a shame that most of the AutoCAD object types reflect their list descriptor counterparts and lend themselves to the slightly shorter workflow. Oh well, surely there is a good reason for this that is beyond my very basic understanding of Dynamo.

Thanks again for showing me these alternative solutions.

Cheers,
Ryan

1 Like