# Modify line style of floor edges to invisible

**URL:** <https://forum.dynamobim.com/t/modify-line-style-of-floor-edges-to-invisible/25821>\
**Category:** Revit\
**Tags:** revit, dynamo, api\
**Created:** [September 12, 2018, 12:09pm UTC](https://forum.dynamobim.com/t/modify-line-style-of-floor-edges-to-invisible/25821 "2018-09-12T12:09:30Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sed07](https://avatars.discourse-cdn.com/v4/letter/s/97f17d/32.png) [@sed07](https://forum.dynamobim.com/u/sed07)\
**Post date:** [September 12, 2018, 12:09pm UTC](https://forum.dynamobim.com/t/modify-line-style-of-floor-edges-to-invisible/25821/1 "2018-09-12T12:09:30Z")

</div>

I’m trying to make all the lines of the floors invisible in view, as discussed [here](https://forum.dynamobim.com/t/batch-linework-tool/17178). I set up the nodes as in the screenshot below, but I can’t get it to work.

The python node is taken from [here](https://forum.dynamobim.com/t/modify-line-styles-in-filled-regions/10551/2), which is made for filled region, but I don’t know which property the floors take in order to modify it correctly.

 ![override%20lines%20to%20invisible](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/5/7/5700360d6532a90402a6b0c7ce1b7befd9d1e74a.png)

I have also attached the script for convenience. ver 1.3  
[overide lines to invisible.dyn](https://forum.dynamobim.com/uploads/short-url/luJPakUxtDqQ4TTeLrkOAqrGexh.dyn) (13.3 KB)

Update: I just found something [here](https://forums.autodesk.com/t5/revit-api-forum/how-to-change-line-style-via-api-just-like-linework-command-s/m-p/7745244) about doing this using the Revit API. But I don’t know enough to be able to translate it into a python script.

---

<div class="post-metadata">

**Author:** ![Giovanni\_Brogiolo](https://avatars.discourse-cdn.com/v4/letter/g/a9adbd/32.png) [@Giovanni\_Brogiolo](https://forum.dynamobim.com/u/Giovanni_Brogiolo)\
**Post date:** [September 14, 2018, 2:31am UTC](https://forum.dynamobim.com/t/modify-line-style-of-floor-edges-to-invisible/25821/2 "2018-09-14T02:31:22Z")

</div>

Hi Fabiano,

Please find below the (partial) translation in python:

```
element = UnwrapElement(IN[0])
linePatternElements = FilteredElementCollector(doc).OfClass(LinePatternElement)
categories = doc.Settings.Categories;
lineCat = categories.get_Item(BuiltInCategory.OST_Lines);
subcats = lineCat.SubCategories

matchedItem = subcats.get_Item(&quot;Wide Lines&quot;);

TransactionManager.Instance.EnsureInTransaction(doc)
matchedItem.LineColor = Color(255,0,0);
TransactionManager.Instance.TransactionTaskDone()

OUT = matchedItem, [s.Name for s in subcats]

```

I think that the script only changes a Line style, it does not replicate the Linework command.

You cannot use the filled region python script with the floor because floor does not have a “SetLineStyleId” method. And you cannot use the InvisibleLine with OverrideGraphicSettings as the node does not accept a GraphicStyle as input.

If you want to hide all the floor edges the only way I can think of is to set the override color to white.

It would be great if @jacob.small and @Nick_Boyts could share their solution.

[lineWork.dyn](https://forum.dynamobim.com/uploads/short-url/mv7pL33NbqOfZadYkSPZ3ybDaE7.dyn) (32.4 KB)

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/9/c/9c7baccffdc43bbac97fb754ea794ec142c72222.png)

---

<div class="post-metadata">

**Author:** ![sed07](https://avatars.discourse-cdn.com/v4/letter/s/97f17d/32.png) [@sed07](https://forum.dynamobim.com/u/sed07)\
**Post date:** [September 18, 2018, 8:50am UTC](https://forum.dynamobim.com/t/modify-line-style-of-floor-edges-to-invisible/25821/3 "2018-09-18T08:50:22Z")

</div>

Thanks Giovanni!

Unfortunately, making the lines white will not work for my purpose, as the lines will still be visible over room colors or colored floors. I ended up drawing filled regions over the areas where I wanted to hide floor edges.

However, I would still like to know how to achieve this using the linework tool, as it could be useful and save time for the future.

I hope someone knowledgeable could decipher the last link I provided, as it seems to me that the person posting it had found the API solution (I could be wrong though).

---

<div class="post-metadata">

**Author:** ![SouravGanguli](https://avatars.discourse-cdn.com/v4/letter/s/dc4da7/32.png) [@SouravGanguli](https://forum.dynamobim.com/u/SouravGanguli)\
**Post date:** [January 30, 2019, 6:13pm UTC](https://forum.dynamobim.com/t/modify-line-style-of-floor-edges-to-invisible/25821/4 "2019-01-30T18:13:39Z")

</div>

I am also trying to figure out the same thing.Have you been able to figure out how its done via api?
