Query for instance parameter extraction. Why does it work one way and not the other?

I’m trying to extract beam offset levels after filtering a larger group of beams.
It appears the “Start Offset Level” parameter will report successfully IF i select the model elements and plug this straight into “Element.GetParameterValueByName” This gives me all values of an unfiltered list.
What I need is to filter the list FIRST and then obtain the offset values. I have used Boolean mask to do this and it’s worked. However, the resulting list will not extract the offset values… The dataset obtained by the boolean mask gives me the family type, family and element id. From this I would expect to pull out any parameter but it doesn’t work. I have also tried extracting the “family” and “type” This doesn’t work either, any thoughts on how you obtain instances parameters from a list of elements that give element information and ID’s

The first image below shows the dataset obtained through “select model elements” then plugging into the get element value node for the required parameter. The other two images show a failure to obtain the offset values. The dataset is slightly different but still gives element id’s and family information. I’m a little puzzled.

They may be part of a beam system or other setup which omits this value. Two things to check:

  1. Use a Select by ID method in Revit to select one of the elements in the ‘in’ set and confirm the element has a start offset value.
  2. Use a List.Unique items value on the parameters from the unfiltered list - if there is a “” value in the list then we can confirm.

Hi Jacob,
thank you for your reply.

These beams aren’t systems. The elements have various offset values and are referenced at from two levels. I have used the unique items as you say to view the offset values. There are quite a few.

The logic is to first filter the grade beams from the superstructure. This was done by a boolmask which filtered all beams that have GB in the type comments. The next task is to get the reference level for each beam. There are two reference levels. Once this is done the task is to find the offset from the respective reference level.

@DynamoCanDo can you share your dyn and a sample revit file with a few beams?

Can you reduce the file to a pair of grade beams and a pair of super structure beams, and then post the file here?

OK guys, sorry for delay, i’ve included some notes in the dyn file. I hope it’s clear enough and thank you for your time i appreciate it.Problem - Extracting instance parameters.dyn (100.7 KB)DYNAMO PROBLEM INSTANCE PARAM EXTRACTION.rvt (452 KB)

@DynamoCanDo I think you are passing family types instead of instances (same Ids)

image

@DynamoCanDo

wire as shown below and it should work

image

image

@salvatoredragotta this is fantastic. Thank you so much. This is a very good lesson. I did experiment with passing different nodes through the bool mask but obviously didn’t try this. I’m really happy you commented on this. Thank you

@salvatoredragotta I have a follow up. This is a slightly different issue but it refers to the files above. I will post another subject if needed but if you run the script i sent while you have the revit file open you will notice the start level offset values are strange. ALL beams are placed at their respective level with no offset. All have a top justification. I’m getting values like 2.4… Do you have any thoughts. I have taken a section and cannot see how it’s calculated this? It appears revit is using another base point to get these values.
strange%20valuesPNG

i have included the revit schedule below and i have also checked the element parameters of the member in dyn and it also has no offset. This is very strange to me right now.


revit%20schedule

@DynamoCanDo I’m not sure why. What happens it you try to set the parameter to 0?
Or you could just check the list for very small numbers and ignore them.