Set Value to Items in Sub-List


#1

Hello all,

I am once again in need of your assistance.

Let me explain my situation,

I have several “generic model” elements. There are several families (“structural connections” category) placed on each of these generic model elements. All generic model elements contain a unique value for the “Mark” parameter. I would like to take the mark value , from each of the generic model elements and apply this to the mark value of the families placed on each generic model element. for example:

generic model element 1 (“Mark” parameter = P20), 8 families on this element, i would like to set the “mark” parameter for each “structural Connection” family to P20.

generic model element 2 (“Mark” parameter = P30), 5 families on this element, i would like to set the “mark” parameter for each “structural Connection” family to P30.

and so on…

 

With the help of SteamNodes, Tool.GetSurroundingElements and some list management I am able to obtain a list, showing which families are associated with which generic model element. how would I get the "mark " values to populate properly?

 

 


#2

Hi Andre,

You need to adjust your “Tolerance” to get values properly. See if it works otherwise you can put here rvt file here so that i can provide to you workflow.

 


#3

Thank You for the response KulKul!. Could you help me understand the “Tolerance” value? what does the number represent? this question was asked in a earlier post but with no answer.

 

 


#4

Hi Andre,

I think it represent to “Bounding Box Intersects Filter Outline”. I usually play with it until it satisfied my requirements :)


#5

Kul Kul, I managed to get this to work with the help of your response from a previous post. Lacing & List.of Repeateditem is what I was missing. many Thanks!!


#6

A question for all the Python masters:

It appears that the Tool.GetSurroundingElements (from SteamNode) is using a python script to obtain a boundary box of the host and proceed to evaluate all intersecting elements. I think.....

Is it possible to have the script first include all elements within the host boundary box and then followed by evaluating the intersecting elements?

I am running into a situation where the ....intersecting elements...portion of the script is being prioritized over the elements that actually reside within the host boundary box. Or at least that is what I think is happening.

I have attached an image showing the results after I run dynamo. (unfortunately the rvt file is too big to upload, I can certainly email the rvt file if anyone is interested)

As always thank you for the help

Capture

Loose Hardware for David