Set wall coarse fill pattern to none


#1

Hello community,
Following this previous topic:


it would be amazing to be able to set the coarse fill pattern of all my walls to none, is this possible???


#2

Try feeding a value of 0 or -1 for the element ID.


#3

Hi Jacob,

good try but doesnt work as fill patterns seem to have a completelly different id sequence,

see attached


#4

none must have a dedicated id, but which one??? not sure how I can figure it out…


#5

Try and create the fill manually in revit and thus pull the id from that in dynamo


#6

Can you post that dyn?


#7

Hello Jonathan, I cannot create a none pattern, can I, not sure what you mean.


#8

Wall set Coarse Scale Fill Pattern & Color.dyn (7.8 KB)
dyn attached,
Thanks Jacob


#9

If it cannot be done in Revit it cannot be done in dynamo, what I mean is that if you can go one way you can reverse engineer it afterwards :slight_smile:


#10

You can override none pattern in multiples ways, you can actually do it in revit, setting the pattern to none.
The problem is dynamo do not list none, this is the issue.


#11

@JacobSmall was right to suggest trying -1 but when written in Dynamo alone, that value will be an integer and not an element ID. Here is a Python script that should do it by setting the BuiltInParameter, and converting in the integer -1 to an ElementID. Outputting the integer as an Element ID from Python and feeding it as the value for SetParameterByName doesn’t seem to work in this case.

import clr
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import *
import Autodesk

clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager

doc = DocumentManager.Instance.CurrentDBDocument

elements = IN[0]
if not isinstance(elements,list):
	elements = [elements]

bip = BuiltInParameter.COARSE_SCALE_FILL_PATTERN_ID_PARAM

nopat = ElementId(-1)

TransactionManager.Instance.EnsureInTransaction(doc)

for elem in elements:
	param = UnwrapElement(elem).get_Parameter(bip)
	param.Set(nopat)
	
TransactionManager.Instance.TransactionTaskDone()

OUT = elements

#12

@awilliams I was experimenting and I found out that you could also:

It doesn’t work with -1. Does anyone know why it works with 0?


#13

I was going to suggest a node from springs but you beat me to the punch :slight_smile:
image


#14

Hello Dimitar, which version of Springs you are using, I cannot find this node!


#15

This works perfectly!!!
Thanks


#16

Hello Amy,
I tried this but it is giving me an error on line 25, any ideas why?
Many thanks!!!


#17

@BIMadmin You need to get the wall types not the instances


#18

Totally right,

Many thanks guys for your support!!!

This are the definitions if anyone fancy!!!Set no pattern to wall coarse scale fill pattern.dyn (4.0 KB)
Set wall coarse scale fill pattern and colour.dyn (7.8 KB)