Help With Lacing

20210513174938833.pdf (167.2 KB)


Attached I have a a script I wrote to create some parameters and then associate them with an electrical connector. I am having trouble getting the lacing to work correctly with the Parameter.SetValue node. I also attached a pdf of the families in the directory that I am feeding into the Document.BackgroundOpen node as well as the types those families contain. I am inputting 3 families to the familyDocument input, one family has 2 types, one has 4 types and one has 1 type. I have a feeling there might be an issue with the FamilyType.All node I am using but I am not sure how it structures those lists.

What do the error messages say above the nodes?

Not using the file from path node, the sharedparameter.add node returns an error sometimes even though it works and adds all parameters. When the node is set to cross product I get an error that says, “Warning: Parameter.SetValue operation failed. Element id does not represent either a valid element in the document or InvalidElementId. Parameter name:value.” I guess I should have paid more attention to that. To me that sounds like it is getting the element id for the “HVAC” electrical load classification for the first doc and trying to apply that same id to all of the other docs where the id is goign to be different for each family doc, or since it is set to cross product it is trying to apply the each id to all of the separate families. Not sure tho, any suggestions?

@SeanP Its also worthy noting that this script runs exactly as it should when run on one family, the problem occurs when I run it on a group of families.

I think you are on the right path here. I am not sure the cross product is the right way to go here. Can you post a picture with all the previews open so we can see what the list structure looks like?

More research has been done, this script works as intended when I run it inside the family document but when I run it outside of the family document it does not work and I get the same error about the element id. I think this could be caused by it finding the element id of the HVAC load classification in the project I have open and that is different from the element id of the HVAC load classification in the family. Does anybody have any suggestions on how I would find the element id of the HVAC load classification in the family document. I tried to use the ElementsOfTypeInDocument node from the rhythm package but the problem I run into with that is that I do not have the Load Classification set to HVAC in the family so it would be searching for something that does not yet exist.


Not sure why some of the node previews are blank. The Document.BackgroundOpen node has a 1 for the count when u hold ur cursor over the preview but then when u pin the preview nothing is there.


Fixed