Catalog family Specify Types UI

Catalog family Specify Types UI

Anonymous
Not applicable
648 Views
4 Replies
Message 1 of 5

Catalog family Specify Types UI

Anonymous
Not applicable

Hello,

 

I have created a dockable window in Revit in which families are listed. If I click on family and drag it into active revit project, it gets placed at required location. It works well as of now for most of the families.

 

Now for catalog families, if I try to drag-drop the same, the 'Specify Types' UI does not appear using API.

 

I use following code for drag-drop

IDropHnadler iDrop = new IDropHandler();
UIApplication.DoDragDrop(/*list of family symbols*/, iDrop);

 

While manually inserting catalog family we get UI as shown below,

CatalogFam.png

 

So my question is like, is there any other API method to call this ?

TIA

0 Likes
649 Views
4 Replies
Replies (4)
Message 2 of 5

aignatovich
Advisor
Advisor

There is a method

UIDocument.GetPlacementTypes

so, you can create your own UI for this feature

Message 3 of 5

Anonymous
Not applicable

Thank you for workaround. But I am looking if any direct API is available or not.

0 Likes
Message 4 of 5

aignatovich
Advisor
Advisor

No, there is no such API. You should provide placement type in PromptForFamilyInstancePlacementOptions.FaceBasedPlacementType parametr of UIDocument method:

public void PromptForFamilyInstancePlacement(
	FamilySymbol familySymbol,
	PromptForFamilyInstancePlacementOptions options
)
0 Likes
Message 5 of 5

aignatovich
Advisor
Advisor

I'm a liar, sorry. Yep, I found a workaround.

 

It is suitable to place user families.

 

First of all, you need to set default family symbol using Document.SetDefaultFamilyTypeId method.

 

Then get the command:

var revitCommand = RevitCommandId.LookupCommandId("ID_OBJECTS_FAMSYM");

Then check if it can be posted using UIApplication.CanPostCommand method. If it is true, then call:

uiApp.PostCommand(revitCommand);

 

 
0 Likes