Using Arrays for Parameters in Library Objects

Issue #115 resolved
Benjamin Blasen created an issue

My stud placement' library object seems to work just fine for any spacing and length. However, when I place the studs in my project (linked below) they do not show up correctly. I notice that it does work though if I comment-out all the studs except for one girder line at a time. Each girder line of studs shows up correct if the other girder lines are not present. I think that maybe the data stored in the "xd" parameter array might not be clearing when the library object is used multiple times. Is there a way to ensure that an array is reset each time it is used? I tried to clear the array with zero values, but this doesn't seem to help.

<O N="xd" T="Repeat" CTRL="ri" I="1" E="length(Stud_Spacing)+1" S="0" ri="0"> <P N="Tot" V="0" /> </O>

https://openbrim.appspot.com/objidqk5q16ryq7k9m00f57fwv466zj.stark

Comments (3)

  1. Ali Koc

    What makes you say that it is not working? What should I be looking for?

    There is no concept of resetting. It is perfectly fine to have multiple objects with the same name in the model. Parameters that refer to these object should automatically pick up the closest one. So any parameter using xd would pick up the xd object closest to itself within the object hierarchy.

  2. Benjamin Blasen reporter

    I've taken a few screenshots to help explain the issue better, girders and the deck are turned off for clarity. In the first picture I have Girder 1 studs shown and all the other studs commented-out, the studs seem to work just fine:

    xd2.jpg

    Similarly, with Girder 2 & 3 studs shown by themselves, everything looks good:

    xd1.jpg

    But if studs for Girders 1, 2, and 3 are shown, the stud placement miscalculates...

    xd3.jpg

    This also occurs with other combinations (Girder 1 & 2, 2 & 4, 3 & 4, etc.)

  3. Log in to comment