Fabrication Part Family Name

Fabrication Part Family Name

dkessler
Contributor Contributor
2,281 Views
8 Replies
Message 1 of 9

Fabrication Part Family Name

dkessler
Contributor
Contributor

I am new to the Revit API, please excuse my lack of knowledge. I haven't been able to find the "Family Name" of the Fabrication Part element. I understand that Fabrication Parts are not Revit Families but the Name property of the Fabrication Part that is selected is "Default" but I need to get the name that displays as the Family Name. Can someone direct me to where that information is located?

0 Likes
Accepted solutions (1)
2,282 Views
8 Replies
Replies (8)
Message 2 of 9

novesvalentin
Advocate
Advocate
Accepted solution

Hi @dkessler,

 

I guess you are either looking for the Family parameter which the BuiltinParameter is "ELEM_FAMILY_PARAM" or the Fabrication Service parameter which BuiltinParameter is "FABRICATION_SERVICE_PARAM" with both of them you should use the Method AsValueString.

 

Please see examples below:

 

fabrication service.JPGFamily.JPG

 

Hope this helps to solve your issue.

 

 

If this helped solve your problem please mark it as solution, so other users can get this solutions as well.

 

Valentin Noves

BIM Manager
www.valentinnoves.com

If this helped solve your problem please mark it as solution, so other users can get this solutions as well.



Valentin Noves

BIM Manager
www.valentinnoves.com
0 Likes
Message 3 of 9

jeremytammik
Autodesk
Autodesk

Dear Dkessler,

 

Thank you for your query and welcome to the Revit API!

 

I hope you have already taken a serious look at the getting started material and installed RevitLookup:

 

http://thebuildingcoder.typepad.com/blog/about-the-author.html#2

 

https://github.com/jeremytammik/RevitLookup

 

That is what Valentin is using in his helpful answer above showing how to highlight the 'Fabrication Service' and 'Family' parameter values.

 

I hope this helps.

 

Best regards,

 

Jeremy

 



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes
Message 4 of 9

dkessler
Contributor
Contributor

Thanks Vaentin and Jeremy.


@novesvalentin wrote:

Hi @dkessler,

 

I guess you are either looking for the Family parameter which the BuiltinParameter is "ELEM_FAMILY_PARAM" or the Fabrication Service parameter which BuiltinParameter is "FABRICATION_SERVICE_PARAM" with both of them you should use the Method AsValueString.

 

Please see examples below:

 

fabrication service.JPGFamily.JPG

 

Hope this helps to solve your issue.

 

 

If this helped solve your problem please mark it as solution, so other users can get this solutions as well.

 

Valentin Noves

BIM Manager
www.valentinnoves.com


 

0 Likes
Message 5 of 9

Nathan.HilsonN67V6
Advocate
Advocate

I am able to find where everything is located but my issue lies within my lack of coding experience. I've tried multiple ways to pull the info but none of them are working. The closest I have gotten is something like this. 

 try
            {
                ICollection<Element> fabricationPart =
                   new FilteredElementCollector(Doc, Doc.ActiveView.Id).OfCategory((BuiltInCategory)Autodesk.Revit.DB.BuiltInParameter.FABRICATION_SERVICE_NAME)
                    .ToElements();
                {
                    foreach (FabricationPart part in fabricationPart)
                        comboBox2.Items.Add(fabricationPart);
                }
            }

 

Is there something that I'm missing? 

 

0 Likes
Message 6 of 9

gdavis479JP
Contributor
Contributor

I believe the original request was for the Item's name, not the Service Name. The service is the system in which an instance of the item appears.

 

As far as the Item's name, was is missed in this discussion is that there are often two forms of the Item Name ( or 4 depending on your perspective).

 

In the CADmep/ Fabrication Item you define a pattern template part with an Item Source Filename. This field is what the item name really is. Let's say you called it "BW ELBOW 45" for a buttweld 45 Elbow. When you create the catalog's product list you add a bunch of Catalog Sizes AND an id (dbID or Product Code in Revit).  If that Product code entry exists and has a value, Revit THEN checks the Product Information Database (MAPProd) for external filename info. The "MAPProd" data has a Manufacturer Name AND a Long Description and a Short Description. Revit combines the Manufacturer Name and one of the two descriptions (I forget if it is the long or short) AND overwrites that as the Family Name. We NEED access still to the SourceFilename in the Revit API... I do NOT see that in Snoop DB from you Jeremy. You can access the field in Item reports. Please convey to development. 

Message 7 of 9

jeremy_tammik
Alumni
Alumni

Dear Greg,

  

Thank you for the explanation and clarification. I asked the development team for you.

  

Cheers

  

Jeremy

  

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
Message 8 of 9

sean.simkins
Explorer
Explorer

How can we change this in the meantime? i.e. outside of revit? autodesk cadmep? 

0 Likes
Message 9 of 9

gdavis479JP
Contributor
Contributor

I can't speak for Jeremy in terms of his reply, but am curious, "How can we change this outside of Revit?" etc. 

Could use clarification. The original question was how do we find the fabrication item name and data in the Revit API. I answered how to get their, along with a few frailties in the data, but you can get all of the data in Extension For Fabrication reports in Revit (not helpful for schedules and merged reporting with Itms and families - but "available")... Not sure why if you are considering going outside of Revit for that part of the data.

0 Likes