Having issues with property sets and assigning pipe styles depending on the property set

Hi All,

I’m at my wits end with this one…(first time really using dynamo!)

I’m trying to have a dynamo script that can set a civil 3d pipe style based on a property set of the pipe (property set is called subtype).

The script works ok with featurelines and their property sets and assigning featureline styles from these.

The issue comes when changing it to pipes. It finds the property set definition (pipes and structures) but when I give it the property name from the property sets subtype the objectsbyproperty object output becomes a null list rather than the pipes.

Any help in getting this to work would be much appreciated! I’ve lost a weekend trying to make it work :slight_smile:



Is this the same as this post?

Hi @mzjensen its the same script but a different issue.

What is the warning on the ObjectsByProperty node?

It appears that you are trying to select all of the pipes and structures by passing an empty string into the propertyValue port. Is this correct? If so, then this will only work if the property type is ‘Text’ in the property definition. But if it’s a real or integer (which might be the case since the subtype property looks to be numbers), then this won’t work.

There are lots of ways to select objects, and some others might be more effective. For example, you could use the PipeNetwork.GetPipesStructures node from the Civil 3D Toolkit. Or if they are on unique layers, select them with All Objects On Layer.

Hi thanks for getting back to me @mzjensen the property set is an interger.

The error was

Hi @mzjensen I’ve changed it to select with the PipeNetwork.GetPipesStructures node and list them. But it has came up with an error later in the script.

DataStylization_ApplyStylesFromExcel.dyn (48.0 KB)

There is nothing plugged into the ‘keys’ input on List.SortByKey.