Displaying 3d points in the Revit interface

Displaying 3d points in the Revit interface

Anonymous
Not applicable
856 Views
4 Replies
Message 1 of 5

Displaying 3d points in the Revit interface

Anonymous
Not applicable

I'm trying to make a plugin that lets the user pick multiple points in the model space (actually vectors, but let's start with baby steps), then store those points in extensible storage and display those points back to the user, letting them review the points that have been picked, move and delete them as needed. The point are not supposed to be any kind of elements in the model but rather like locations that the plugin has to keep track of.

 

I can understand the first part about picking points (Selection.PickPoint > XYZ) and storing them in ES, but how can I display those point in the Revit UI and make them editable for the user?

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

dragos.turmac
Autodesk
Autodesk
Accepted solution

Hi,

 

There are two ways you can go, either a small custom generic model family or a model line. Given that you want to display a vector, the second option might seem better (but it would not have an orientation, at least not an obvious one).

Please be aware the picking a point in ModelSpace is linked directly to the working plane.

"Prompts the user to pick a point on the active work plane."

 

The Point class that you might find in API is a geometry object and does not have a true element representation.

 

What type of manipulation/editing by user you expect?



Turmac Dragos
Pr. SW. Engineer
0 Likes
Message 3 of 5

aignatovich
Advisor
Advisor

Hi!

 

Hi, I think, the easiest way is to use some special families as @dragos.turmac pointed, but there is a third way to do it in Revit 2018.

 

It is a DirectContext3D. Look at http://thebuildingcoder.typepad.com/blog/2017/04/whats-new-in-the-revit-2018-api.html#3.26 for details.

 

 

0 Likes
Message 4 of 5

Revitalizer
Advisor
Advisor

Hi,

 

additionally, you can use the Analysis Visualization Framework:

http://thebuildingcoder.typepad.com/blog/2015/07/intersect-solid-filter-avf-and-directshape-for-debu...

 

 

Revitalizer




Rudolf Honke
Software Developer
Mensch und Maschine





0 Likes
Message 5 of 5

Anonymous
Not applicable

Thanks, all the ideas were good. For early prototyping the generic model family seems to be the easiest way to go. I even found that since family instances have a rotation component, I can essentially get the vector functionality that I need, not 3D but just the XY-plane is good enough already.

 

Just for clarification, is it correct that all selectable elements in Revit have to belong to one of the BuiltInCategories? It seems that even DirectShape objects have to be assigned a category. Maybe there's a way to get around that with DirectContext3D, but I'm wondering if it is selectable/snappable in the Revit UI or just ghost object that can be see but not interacted with.

 

 

0 Likes