Difference between Parameters and ParametersMap for schedule elements

Difference between Parameters and ParametersMap for schedule elements

Anonymous
Not applicable
2,542 Views
3 Replies
Message 1 of 4

Difference between Parameters and ParametersMap for schedule elements

Anonymous
Not applicable

Just wondering why some properties or elements can be found in one place but not the other.

 

This includes finding different elements using a FilteredElementCollector for a schedule and iterating through its elements vs. taking that same element and using a doc.GetElement(element.GetTypeId()); and getting parameters from that element.

 

I would then iterate through both of these in order to completely edit a schedule programmatically, as the parameters for the elements are in one element group but not the other.

 

In one case, I'm forced to iterate through the ParametersMap of one of the elements and when I try to use parameter.Set(property), it will not write to the schedule but I would receive no error.

 

Any help would be appreciated.

0 Likes
Accepted solutions (1)
2,543 Views
3 Replies
Replies (3)
Message 2 of 4

BIM.Frankliang
Collaborator
Collaborator

Hi Friend,

 

     If you use RevitLookUp to select an element/instance, you will find Paramters is different from ParametersMap.

The count of Parameters is larger than ParametersMap's count. I usually use Parameters to find all parameters of an instance or a symbol. If you wanna edit a parameter of a element, you may check parameter IsReadOnly property to make sure it can be edited first. I advise that you could use RevitLookUp to check the parameter of element first and understand all info of this parameter, then decide how to operate.

 

Wish it is helpful for you 🙂

 

Best Regards,

Frank Liang

名片2.png

 

 

0 Likes
Message 3 of 4

Anonymous
Not applicable

Thank you for the suggestion. With Revit Lookup, I tried looking for one particular parameter. It exists in both Parameters and ParametersMap, but in both instances, it is ReadOnly.

 

Is this a limitation on the schedule or can I change this some other way?

0 Likes
Message 4 of 4

BIM.Frankliang
Collaborator
Collaborator
Accepted solution

Hi eric,

 

     Yeah, it is a limitation when a parameter's IsReadOnly property is true that you can't set new value to this parameter.

 

Best Regards,

Frank Liang

名片2.png

 

 

0 Likes