Preview Graphics for Objects created by Add-In
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I want to create preview graphics, both 2D and 3D, for an add-in I am putting together for objects. The idea is that when a user starts the routine, they will be presented with some sort of dialog with dimensions for objects. There will be a preview of that object in the Project space and when the user modifies something in the dialog, the preview solid updates accordingly.
Maybe something like the Duct routines in vanilla Revit. When you start the routine to draw straight ductwork in Revit, the routine starts by having you pick a start point and then picking an endpoint. Between the start and end point selection, you are given a greyed out, preview representation of the duct you are about to draw based on the dimensions of the duct that is entered in the Width/Height textboxes along with snapping to the users cursor. As far as the Revit API is concerned, what kind of object is this? Because that kind of object would be perfect.
I've tried to look at the DirectContext3D APIs and the DirectShape APIs but the DirectContext3D does not give you any 2D graphics, as cool as the DC3D APIs are, and the DirectShape APIs leave elements that the user can mouse over, select, and interact with. I do not want the user to be able to interact with the preview in any capacity, I want my dialog/add-in to handle creating, updating, and deleting the preview when necessary.
Any suggestions? Thanks.