Having a bit of a weird one here with trying to access some parameter data from a background opened model.
Context: I have a load of windows with parameter data in a “type file”, that I am aiming to read and use to update the equivalent windows in a project file.
When I read the windows parameter directly, from within the type file it shows they have a value and the parameter exists:
But, when I background open this file and try to read the exact same parameter I get nothing, it even says the family does not contain the parameter.
(excuse the indexing for list item 7, that’s just to ensure I’m comparing the same family type for the parameter name check).
I have double checked the filepath for the model being opened, I have even loaded the parameter into the family directly as well as into the project I am currently in.
At a bit of a loss, any ideas why I cant even SEE the parameter ?
Thanks in advance
Element.GetParameterValueByName (and most if not all out of the box nodes) is built to work on the active document. If you want to background process content you will need a node designed to do so.
That said things will be multiple orders of magnitude faster and significantly more stable if you open this once per update and build a JSON/CSV/Text document from the elements and then refer to that in place of the Revit file on each update. There is a reason that DataExchange is being built for Autodesk Plarform Services after all.
Hi @haganjake2 not sure some of these here could help in that case
not sure it could work with the clockwork node with a DB converter from rhythm
I did not know that! Assumed I could feed it an element from a background opened doc and it would be able to read that element specifically. Thanks for the knowledge.
Also fair point RE: the refer from document rather than model. I probably will end up doing that I just avoided it in the first place as it’s just one more thing to have to update rather than reading directly from a model.
Thanks for the tips also thanks @sovitek for now I’m probably just gonna roll with the csv method
2 Likes