Announcements

We are currently experiencing an issue impacting some Autodesk Products and Services - please refer to the Autodesk Health Dashboard for updates.

Placing a Fabrication Part

Placing a Fabrication Part

RickyBell
Enthusiast Enthusiast
1,587 Views
3 Replies
Message 1 of 4

Placing a Fabrication Part

RickyBell
Enthusiast
Enthusiast

I'm trying to place a Fabrication part using one of the two methods.  PromptForFamilyInstancePlacement() and PostRequestForelementTypePlacement().

 

I assume the FamilyInstancePlacement won't work because it requires a Family Symbol, which I believe Fabrication Parts do not have.  Please correct me if I'm wrong.  So, using the following code, Revit just passes over the placement line.

 

FilteredElementCollector fec = new FilteredElementCollector(doc)
.OfClass(typeof(FabricationPartType))
.OfCategory(BuiltInCategory.OST_FabricationPipework);

foreach (FabricationPartType fpt in fec)
{

if (fpt.FamilyName == "Part I'm looking to place")
{
uiDoc.PostRequestForElementTypePlacement(fpt);  //This line gets hit, but does nothing.
break;
}

}

I've also tried this using the ElementType, same result.

 

Any help is appreciated.  Thanks!

 

 

0 Likes
Accepted solutions (1)
1,588 Views
3 Replies
Replies (3)
Message 2 of 4

jeremytammik
Autodesk
Autodesk
Accepted solution

Dear Ricky,

 

Have you taken look at the Revit SDK FabricationPartLayout sample?

 

It shows how to use the Fabrication Part API to create a sample layout, which includes rectangular and round ductwork, tap placement, rotations and straight optimizations and connections to a generic Revit family instance.

 

I hope thta helps.

 

Please let us know how you end up solving the issue.

 

Thank you!

 

Cheers,

 

Jeremy



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

Message 3 of 4

RickyBell
Enthusiast
Enthusiast

Thanks Jeremy,  The SDK had a ton of information about Fabrication parts.  At this point, I haven't been able to graphically place an ITM with a command in the API.  I was able to do the math and place components using the FabricationPartLayout.cs example in the SDK.

 

So, as far as I can tell, FabricationPart.Create() and FabricationPart.CreateHanger() are the only options for placement.  

0 Likes
Message 4 of 4

gdavis479JP
Contributor
Contributor

Why is the considered an accepted solution. Is Jeremy the moderator. There is no information on the solution details here, no sample code, and not even a specific link to the SDK sample file. 

0 Likes