Thank you for seeking help! Our friendly community is here to assist you.
To assist you better, please consider providing:
- Objective: geting data from stair from revit
- Issue: Cant get into a Record List
Thank you for seeking help! Our friendly community is here to assist you.
To assist you better, please consider providing:
Hey @Xavier_Steverlynck welcome to our community!
What parameters are missing, could you please clarify? Is this for a hackathon submission or a separate project?
Thanks!
Hi Mateo, I am new in this area, but the stairs is a headache , I would like to get the parameters that is under materialQuantities that gives me a LIst not a record
Hey @Xavier_Steverlynck ,
Welcome to the community! Feel free to Introduce yourself to the community if you want to!
Please take a look at this thread:
The List contains to records of informations that has Data that I need
@xavier, I donât have access to a model with stair and material quantities right now. Can you share a Speckle link to a model with just the stair object you are screenshotting?
Hi Xavier!
Could you explain in a bit more detail what is the expected result? Do you want each materialQuantity to be extracted into itâs own column? or just convert the list into a record?
There are several ways to extract lists of data but it really depends on what you expect to do with it
I will make one to share
Small followup:
If the issue youâre having is that youâre not seeing the material
data inside each materialQuantity
record (like sođđź)
These objects represent a different element in the speckle database, you will find a row with the same Object ID
in the original table that getâs returned by our Data Connector.
Jonathon has written several replies in the past about this, I recommend reading this reply (and the links it contains) to get a better idea of how this is done.
Hope this helps!
Perfect; in the meantime, I have dug one out of the archive.
The trick here is that the Stair materialQuantities materials are detached objects. We have a few examples here on the forum that explain how but in short,
Make one query that filters to all the Stairs, (expand data.category)
= Table.SelectRows(#"Expanded data", each Text.Contains([data.category], "Stairs"))
Expand the materialQuantities first as a List-> Rows and then Records to properties, youâll only need the material.referenceId
e.g. = Table.ExpandRecordColumn(#"Expanded data.materialQuantities1", "data.materialQuantities.material", {"referencedId"}, {"data.materialQuantities.material.referencedId"})
a second query that filters to all the Materials (expand data.category)
= Table.SelectRows(#"Expanded data", each Text.Contains([speckle_type], "Objects.Other.Material:Objects.Other.Revit.RevitMaterial"))
Expand the data prop of the Materials as far as the material.parameters Record
= Table.ExpandRecordColumn(#"Filtered Rows", "data - Copy", {"parameters"}, {"material.parameters"})
Add another source by Merge as New
= Table.NestedJoin(Stairs, {"data.materialQuantities.material.referencedId"}, Materials, {"Object ID"}, "Materials", JoinKind.LeftOuter)
At this point you have a data table that jins the relevant materials to each stair in the dataset
Use our namespace function Speckle.Revit.Parameters.ToNameValueRecord([Materials.material.parameters]))
to make a new custom column
You can now expand that custom column record to reveal whichever of the material properties you wish
You can now use this merged data source to reveal material properties in your dashboard. My model has no value for the KEYNOTE_PARAM but the principle is complete.
I have included the dashboard I made for you; youâll need to change the single source URL.
Stair Material Properties.pbix (1.8 MB)
Thanks, I will work with it
I have worked with your example in the dashboard that I am making and worked all well thanks you very much for your help.
ReporteBoulevard.pbix (1.4 MB)
Thanks again