Workset Parameter read-only

Hello everyone,
I am trying to make a script that changes the worksets of all elements.
For some reason, some families (pipe fittings) are giving me the warning “parameter is read-only”.
Any help?

Have you looked into those individual elements beyond their category? There are many reasons the workset may be locked:

  1. Element is part of a group.
  2. Element is a sub-element controlled by something else. (i.e. a mullion controlled by a curtain wall)
  3. Element uses a non-user defined workset. (i.e. view, sheet, etc.)

We need more information, but even then it may not matter. If the workset is read-only it’s read-only. Either you won’t be able to change it, or you’ll end up changing it by changing the controlling object anyway.

1 Like

Just do a check for param.IsReadOnly.

I have also seen this happen if there is an element in the model that was a Modeled In Place family of a specific category that may or may not be right.

And note there are worksets like views, project standards, and families that are indeed read only by design.

1 Like

The family that are making this problems are pipe fittings, simply reducers and elbows. They are not parts of groups. The pipes themselves are changing worksets but the fittings are not. Noting that it just happens with one system that is the fire protection, the fittings in other systems such as water supply and chilled water are working fine.

And you’ve confirmed you can manually change them? Is it possible someone else checked out those elements?

I can change them manually, yes. Not only that but it seems that some instances of these family changed their worksets but only some gave this error. so it’s not an issue with the families

We need more information. How are you getting these elements? How are you confirming which elements are failing? Are you sure you aren’t supplying and Families or Types by accident? Can you provide an example file where this issue occurs?