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: 

Ask user to select insertion point with an illustration of the result

1 REPLY 1
SOLVED
Reply
Message 1 of 2
atir5UTNF
137 Views, 1 Reply

Ask user to select insertion point with an illustration of the result

I've created some detail items from the API, and I want to ask user to select an insertion point.

I want the draw a box or the the element I've created when the user moves the cursor, like Revit does when moving or adding a new element.

How can I achieve this behavior?

 

atir5UTNF_1-1719215644204.png

 

 

 

1 REPLY 1
Message 2 of 2
jeremy_tammik
in reply to: atir5UTNF

That is a good idea. The Revit API does not add full support for this functionality, unfortunately. You can achieve something similar in two ways that I am aware of:

  

  • Prompt for family instance placement
  • Simulate a jig

  

The PromptForFamilyInstancePlacement and PostRequestForElementTypePlacement methods prompt the user to place instances of a specified FamilySymbol and display a preview of the placement using the built-in Revit family placement functionality:

  

  

However, they are asynchronous, so not wholly integrated into the add-in code.

  

A sketchier preview can be achieved by drawing some transient graphics of your own to simulate what is known in AutoCAD as a jig:

   

    

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open

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

Post to forums  

Rail Community


Autodesk Design & Make Report