Set Dimension Type Parameter Value

Hi. I am struggling to set parameter values of a Dimension Type using Python. I am having no issues accessing the existing parameter data, however I am unable to set these to a new value.

For example, I am trying to change the “Dimension String Type” from “Continuous” to “Baseline”.

I have tried:

x = dim_type.get_Parameter(BuiltInParameter.LINEAR_DIM_TYPE).Set( “Baseline” )

This does not work. I assume this is because the “Dimension String Type” values are accessible via a dropdown menu.

Any suggestions would be much appreciated! :slight_smile:

I would suggest determining the storage type of the parameter before you attempt to set it. For example:

param = dim_type.Parameter[BuiltInParameter.LINEAR_DIM_TYPE]
storage_type = param.StorageType
OUT = storage_type

I suspect that the storage type of that parameter is either an ElementId or Integer, but I cannot test it myself as I do not have access to Revit.