Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Load family using APIs

2 REPLIES 2
Reply
Message 1 of 3
Anonymous
541 Views, 2 Replies

Load family using APIs

Hi all,

I need to know how could I load a family using APIs and this specific family should be active when ever I move the cursor. I have already managed to load a family and it is already loaded, but it is not active while moving the cursor. here is the code:

public class LoadFamily: IExternalCommand
{
public IExternalCommand.Result Execute(
ExternalCommandData commandData,
ref string message,
ElementSet elements )
{
Document doc = commandData.Application.ActiveDocument;

doc.LoadFamily( "Path to the rfa file");
2 REPLIES 2
Message 2 of 3
Anonymous
in reply to: Anonymous

When you say "but it is not active..." what do you really mean? Do you want to create an instance of one of the family types under it using API?
Message 3 of 3
sgermano
in reply to: Anonymous

You need to use the PromptForFamilyInstancePlacement method. Research that as you will have user GUI placed families 🙂

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Rail Community