I am trying to retrieve parameters using python for some fabrication parts in Revit. I cannot access these parameters through the user interface or dynamo (that I know of) and that is my reasoning for using Python. Please see what is wrong with the script below. It is throwing error that is also posted.
@coastguard09 Built In Parameters and other API references are case-sensitive, try changing “Fabrication_Part_Length” to uppercase so that line 20 is output.append(i.get_Parameter(BuiltInParameter.FABRICATION_PART_LENGTH))
Empty parameters show up as blanks, not nulls. In the Instance Properties of the parts you are inputting, do you see Length under the Dimensions parameter group? Its possible the Fabrication Parts you are inputting do not report Length.
Does querying the Size property give you the output you are seeking? (replace line 20 with the following line):
Could you share a screenshot showing the Type Properties of one of the elements? It would help to see what your elements are if they do not report length, perhaps there is another dimension parameter that will give you the output you are looking for
I think you have used the “GetDimension” and “GetDimensionValue” methods. When I use the “GetDimensionValue” method it tells me an arguement is expected.
So I know need to input a “FabricationDimensionDefinition” but do not know where I can find this information. Could anybody point me in the right direction?
@erfajo I am trying to access fabrication part dimensions. They don’t show up like your normal parameters on a revit element. Yes i can get some of them, but not the ones I want using your proposed method.
If you look at @Kulkul screenshot, that is what I am trying to achieve. I just figured it out though. I am going to mark this as solved and then when I put some finishing touches on it, I will post graph and script.
There are some fabrication parts that do not provide you the size or length or other such pertinent information. If you have a part based on CID pattern 159 for example. The diameter and length fields do not show anywhere so therefore cannot be scheduled. Now, what you’ve with the scripts and graphs is awesome, so thanks for that.
Quick question, I am running into an issues where all my fabrication pipes,valves,coupling and elbows are being returned with a length. How can i sort have it only return pipe in length and everything else as quantity? any help would be greatly appreciated.