How to create family parameters

Hey guys!!
I am developing a plugin, I started studying dynamo, then python and now I am developing the plugin in C #. My plug-in is almost “done”, but I’m now trying to solve the “problems” I already knew I would have in the future.
My problem now is that as I created some parameters that others may not have, so I need some tips to solve my problem with the parameters.
I am thinking of solving my problem by doinga button in my plug in which the user who needs to create the necessary parameters will click this button that will make within the families and will create the parameters.

P.S1: Preferably without having to enter the user into each family and having to create family by family.
P.S2: I don’t need to solve it just like that, of course you can give me other ideas haha

I put this picture just to give you an idea of what I’m talking about. In case if I open a new project in which I want to take all the pipes and delete what has written in the “value” of the parameter “Power equipment”. It will give an error because the user does not have this parameter.

Thank you guys!!!

Parameter name is “Alimentação equipamentos”

If a parameter by the given name is not found, LookupParameter will return a null value. You need to check if LookupParameter returned an actual Parameter object or a null. If it returned a null, you can’t use the Set() method. I am not very familiar with C#, but in python this would be something like:

param = cano.LookupParameter('Alimentação equipamentos')
if param:

The C# equivalent may be something like this:

Parameter param = cano.LookupParameter("Alimentação equipamentos");
if (param != null) {

Thank you for trying to help, maybe my problem isnt clear. These picture is just an example, because when i use my plug in my project, it works well. The problem is when other person uses my plug in and they dont have the same parameters that i have. If they dont have the same parameters it will debug or will return nothing or null, so i want to do some thing that create parameters iquals to mines.

If the parameter is a built-in parameter, you should instead use the actual BuiltInParameter object along with the Parameter property of the element. Otherwise, if the parameter doesn’t exist in the project, it’s either a project parameter or shared parameter, so the suggestion in my above post will work.

I solved my problem and created the parameters in a family, it wasn’t very easy haha ​​but I did it.
Thank you for your help and you gave me some good tips. thanks for helping the community!!!