Column Diameter Change


I could not able to change the column diameter. I am not sure where I am missing things. Could anyone suggest how to do it in right way?

Check that your framing families have that parameter - I think even a few without it will overall give the warning.

Alternatively, are the parameters all instance based? If the script is trying to change multiple type parameters of the same family type I’ve had errors in the past with this as well.

1 Like

I’m guessing it’s a type parameter and you’re supplying instances.

1 Like

The output form the columnbycurve node needs to go into a node called “FamilyInstance.GetType” node that then goes into the element.SetParameterByName node.

For your reference anything that is a type you need to get the family not its instance.

1 Like

Hi, @ramabalan.v!
I think this should work. You can play a bit with this code

python for copy/pasting:

import clr
from Autodesk.Revit.DB import *
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
doc = DocumentManager.Instance.CurrentDBDocument

col = UnwrapElement(IN[0]) #Unwrap element
for i in col:
	fam = doc.GetElement(i.GetTypeId()) #get family type
	len = fam.LookupParameter(IN[1]) #get its parameter
	len.Set(IN[2]/304.8) #set parameter
OUT = 0

But i think, it is better to change family type - not its parameters:

1 Like

First of all, Thanks all for your response,

@GavC, @Nick_Boyts - By your comments, I understand we cannot change the value of type parameter with that code “Element.SetParameterByName”. Please correct me if I am wrong.
Apart from the above node mentioned, Is it possible to change the type parameters with any other nodes.

@Brendan_Cassidy, Okay, I will check it and update you.

@Dmytro_Serebriian, Thanks for your python codes and I will check it. And I am importing column diameter values from spreadsheet which varies as per the user input and the family type name as “Varying Diameter” because I don t know how to duplicate and rename the type name through dynamo as per the custom diameters.


RE the parameter setting, you can set type parameters, however you need to obtain the type for the family, not the instance. This node can understand types/instance as ‘elements’.

You could use Element.GetType if you want to get an instance’s type, however would need to manage any duplicate types out. List.UniqueItems is able to reduce the list to only one copy per element present in a list.

ok, I will check it.

1 Like