Place tag by filled parameter

Is there a way to only place tags where a certain parameter is filled.

We have a pipe tag with a pipe number for our prefabrication to be displayed on a sheet, but when I use the tag all button, the tags are also placed on a pipe where this parameter is not entered. I just want to place a tag at the pipe where that particular parameter is entered with a letter or number, for example.

Can someone please help me with a start for such a script.

Get the view you want to use,Get all Pipes, Get parameter values of those pipes, Filter by boolean mask, Tag all Pipes left.

Marcel,

I will try that. Thank you for the start

Dear Marcel.

I made a start but i got stuck with filter by boolean to get a list with only filled parameters. After that i need to put in the function to tag them.

Here is my start of the script. Can you help me.

Tag only category by filled parameter.dyn (17.2 KB)

I don’t have Dynamo on the computer at home at the moment, so if anyone else can step in, please do.
Or provide a screenshot, so i can see what you have

Here is a screen shot from what i have so far.

My list with zero values that i not want to see won’t get errased. After that the tag must be placed on the view that i selected in the beginning of this script.

The node FilterByBooleanMask has two inputs.
The Mask input takes Boolean values (true,false)
Your input is a list of numbers

I will try to change this but i don’t know how.

So i will try to play with it but if you can help me a bit that would be nice.
The list of numbers contains also so empty values. These values i don’t want to see because otherwise the tag is also placed at these pipes where no value is in the parameter.

You can try to compare the values in the list using the == (equals) node.
Other options are > ,<, >= and >= nodes (there are more)
The nodes will give you a boolean to work with

hi @Olaf_Kappert,

I answered a similar issue recently. Have a look at this post:

Basically you want to convert your blank values to a boolean.

Best,

Ben

EDIT: Spelling/Grammar

1 Like

The node List.IsEmpty can help here

I still have a problem to get my list with no values empty.

What is wrong with my script.


Is it because the parameter is a text parameter and not a number or integer.

Please let me know.

Your values are strings so you can’t check for x >= 0. You need to look for x == "" (blank values). You’re also filtering the parameter values and not the elements before passing them along to the tag node.

Maybe i found it on my own.

It was a string that was in the parameter. i found a node that calls remove empty strings from list.


Know i have my list as a wanted but still the script won’t place any tag at these pipes

Who can help me

As I said above, you’re providing the parameter value and not the element. Removing the empties isn’t really going to help because you still have to filter the elements.

Dear nick,

How do i filter the elements in this script.
Please can you help me what i have to do. I understand now what i did.
But i need the next step to filter on only the elements a not on the paramter values.

Change your codeblock to x == "" and use the element list as your list input for FilterByBoolMask.

Create New parameter For Pipes And make It Integer not text then use any operator (>=) then use is null node . note you must define the location of tag like in the attached photo

@Ibrahim-Tarek Welcome to the forum!

Not sure if numbers will work as some of the parameter values shown begin or end with a alphabetical character. So i think the parameter value will have to remain a string.

So maybe instead of the null route could go with just seeing if the parameter has a value?

Great first post.

Best,

Ben

1 Like

Ibrahim,

I can’t make my parameter as an integer because i have to put numbers and leters in it.

An integer can only have a number if i’m right.