Projecting Text onto a view through an enabler

Projecting Text onto a view through an enabler

mhillis
Advocate Advocate
534 Views
6 Replies
Message 1 of 7

Projecting Text onto a view through an enabler

mhillis
Advocate
Advocate

Is it possible to create an enabler that I could load into Revit and have that enabler display text based on the objects visible in that view?  I am looking to create a system that will see Duct/Duct Fitting objects, look at either Parameters/ExtensibleStorage, and then display the text based on that.  The idea is to be able to create my own annotations as I find Revit annotations fairly limiting out of the box.

 

I have looked into the AVF; unfortunately I do not think that is suitable for my use-case.  Any suggestions?

 

Thanks! 

0 Likes
535 Views
6 Replies
Replies (6)
Message 2 of 7

jeremytammik
Autodesk
Autodesk

Dear Michael,

 

Thank you for your query.

 

When you say 'enabler', does that mean you are coming from the AutoCAD environment and thinking of an object enabler?

 

An object enabler implements a custom AutoCAD entity.

 

In Revit, the closest correspondence to that would be a family definition – obviously not what you are asking for in this case.

 

I have a hard time imagining what you might be imagining.

 

At the moment, the closest I can think of to what you describe is a tooltip.

 

You can implement a tooltip that displays information about underlying model elements when you hover over them.

 

In fact, I already did:

 

http://thebuildingcoder.typepad.com/blog/2017/01/uiview-windows-coordinate-referenceintersector-tool...

 

I hope this helps.

 

Best regards,

 

Jeremy

 



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes
Message 3 of 7

jeremytammik
Autodesk
Autodesk

Another modeless tool came to mind as well:

 

http://thebuildingcoder.typepad.com/blog/2009/10/modeless-pressure-drop-tool.html

 



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes
Message 4 of 7

mhillis
Advocate
Advocate

@jeremytammik wrote:

Dear Michael,

 

Thank you for your query.

 

When you say 'enabler', does that mean you are coming from the AutoCAD environment and thinking of an object enabler?

 

An object enabler implements a custom AutoCAD entity.

 

In Revit, the closest correspondence to that would be a family definition – obviously not what you are asking for in this case.

 

I have a hard time imagining what you might be imagining.

 

At the moment, the closest I can think of to what you describe is a tooltip.

 

You can implement a tooltip that displays information about underlying model elements when you hover over them.

 

In fact, I already did:

 

http://thebuildingcoder.typepad.com/blog/2017/01/uiview-windows-coordinate-referenceintersector-tool...

 

I hope this helps.

 

Best regards,

 

Jeremy

 


Jeremy,

Not quite what I was looking for.  Allow me to better elaborate.  See the attached screenshot, the text on screen is displayed on screen through an enabler in AutoCAD.  The text is not in the DWG but merely projected onto the screen in real time, based on information in the object that it is referencing without actually putting that text/annotation into the file.  Think DirectContext3D, but with text.  The reason for this is because, as mentioned in my original post, the OTB Revit annotation has some limitations.  Being able to create my own annotation in this fashion where I can create and project my own text and BASIC geometry on screen would allow me to completely bypass those limitations.

 

If I could use something like DirectContext3D, but with text for 2D views instead of being strictly 3D objects, that'd be fantastic. 

0 Likes
Message 5 of 7

jeremytammik
Autodesk
Autodesk

I still see no difference between this and a tooltip.

 

If you want it to look fancy or crazy, that can probably be achieved with a tooltip as well.

 

Cheers,

 

Jeremy

 



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes
Message 6 of 7

mhillis
Advocate
Advocate

@jeremytammik wrote:

I still see no difference between this and a tooltip.

 

If you want it to look fancy or crazy, that can probably be achieved with a tooltip as well.

 

Cheers,

 

Jeremy

 


Thanks for the prompt reply.   Looking at tooltips further, I do not know if they will be suitable for me.  If I am correct, the Tooltip system you demoed in your Building Coder post simply uses the UIView class to tell Windows where the mouse cursor is within a given View in the Revit window and then create a Winform instance within the Revit window, not so much the View.

 

The elements that I am looking to create need to meet these requirements. 

- Must be printable in a Sheet.

- Must be able to create grips that will allow me to modify the position of the label.

- Must be persistent in the View, regardless of whether or not it is being moused over (though I assume this can be made possible)

 

 

 

 

 

 

0 Likes
Message 7 of 7

jeremytammik
Autodesk
Autodesk

Dear Michael,

 

Thank you for your clarification.

 

I do not think that what the features you require can be achieved without making use of a Revit database element.

 

Now it sounds more like a tag to me.

 

Cheers,

 

Jeremy

 



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes