Here is a typical query we have received in the past:
I am using the following code to associate/disassociate a family parameter from/to an element parameter.
doc.FamilyManager.AssociateElementParameterToFamilyParameter(ep, fp)
I can associate fine. However, there are no instructions on how to disassociate. Can you let me know how to disassociate a Family parameter from an Element parameter.
Resolution:
As per the Revit API chm file, the same AssociateElementParameterToFamilyParameter() method can help disassociate a element parameter from an existing family parameter. The only change would be that the value of the family parameter would be null (or Nothing in VB).
So to test this, calling the AssociateElementParameterToFamilyParameter() method once, it creates a column family and also associated the element parameter with family parameter, as shown below:
Next, if we add another line of code to call the same method and instead pass null as family parameter, the following dialog confirms that the disassociation works as expected: