Placing Structural Families with Revit's Modify Tab

Placing Structural Families with Revit's Modify Tab

dfox
Explorer Explorer
479 Views
4 Replies
Message 1 of 5

Placing Structural Families with Revit's Modify Tab

dfox
Explorer
Explorer

Hi All,

I'm working on a plugin to place structural beams and columns in Revit. I would like the UI when placing families to be the same as the one when using the built in Structural>Beam or Structural>Column buttons. Primarily, I want the functionality in the red box. I have tried using PromptForFamilyInstancePlacement and PostRequestForElementTypePlacement (suggested in this post https://forums.autodesk.com/t5/revit-api-forum/promptforfamilyinstanceplacement-disables-some-menu-o...), but these don't do what I would like. Is there a way to do this? I have also tried looking into PromptForFamilyInstancePlacementOptions but the documentation isn't as helpful as I would like and I haven't made any progress in that direction. 

What it looks like with built in

Place beam with built in.PNG

 

What it looks like with PostRequestForElementTypePlacement

place beam with PostRequestForElementTypePlacement.PNG

 

What it looks like with PromptForFamilyInstancePlacement

place beam with PromptForFamilyInstancePlacement.PNG

0 Likes
Accepted solutions (1)
480 Views
4 Replies
Replies (4)
Message 2 of 5

Moustafa_K
Advisor
Advisor

you need to use the beam postable command

 

uiDoc.Application.PostCommand(RevitCommandId.LookupPostableCommandId(PostableCommand.Beam));

 

Moustafa Khalil
Cropped-Sharp-Bim-500x125-Autodesk-1
Message 3 of 5

dfox
Explorer
Explorer

Thanks! I would like to be able to pass the family I would like to place to the built in command, but it looks like I can't do that.

I'm thinking it might be possible to programmatically manipulate the UI to use the search bar and enter the family type to place, but that's beyond what I know what to do.

0 Likes
Message 4 of 5

Moustafa_K
Advisor
Advisor
Accepted solution

Oh now i got what you are upto. Unfortunately, you can not have a hybird mode between UI and api

Moustafa Khalil
Cropped-Sharp-Bim-500x125-Autodesk-1
0 Likes
Message 5 of 5

dfox
Explorer
Explorer

Dam. I got to ~95% of what I wanted to do anyways so its still alright. Thanks

0 Likes