Applying line styles to line's

I am trying to make new line style’s for the line’s inside of the sublist (2 new style’s in this case) and apply them to the new line’s. My question is how i can do it because the element.setparameterbyname it is telling me that the line parameter can not be used is there a other way to set a parameter value do i need to change my lines into curves and how do i do that? A second question that i have is:
LineStyle.Create make’s new line style’s but if i run it more than 1 time it will not work because the line name will already exist how can i make it so it uses the existing new line’s it created the first time?


e

Those are Dynamo curves. You need the actual Revit curve element to apply parameters to.
We can’t give you any more information without seeing the rest of your graph, but you either need to provide the actual curve elements or create them.

Hi @SamBUHRK think you need the graphicstyle from linestyle attributes, guees bimorph have a node for that as well, linestyles is controlled by graphicstyle

Ah ok i understand i have changed the script to make curves from the line’s i had so now it looks like this:


and the lines are now also selectable inside of revit but it still wont apply the new linestyle:

You still need to apply the change in your graph. Use the SetParameterByName node (or one of the graphstyle nodes) to apply the new value.

1 Like

try something here

i am trying it (i even flattend the list of modelcurves) but stil wont work the error: no Parameter found by that name but i don’t know what is rong with the name i checked the line style in revit and it is the exact same

(noticed i spelled Line like this: line i am facepalming right now, so that works now.)


image
second i still have the problem that it wont work again after 1 run because it will try to make a line style with the same name what is not possible what is the best way to stop this from happening? I think boolean but dont know if there is a smarter way to do it.

Get a list of all the existing line styles first and compare the names against the line styles needed. Filter out those that already exist and then create the new ones.

yeah the same as Nick say…you will need some list level and probably lacing in set parameter…for naming you can try something here…

Revit_7AjYk5pmHw

1 more question i have is where i can find the Ztoolz GetAllLineStyles node? i am searching for it but i cant find it anywhere

arhh yeah…synthezise toolkit…

Ok thank u i made it a bit different and found the same node in Bimorph package so no worry about it it now looks for the name and if it already exist it uses that, and if it dosnt exist it will create the extra line style’s that are needed:

1 Like