Annotation Symbol Preview

Annotation Symbol Preview

Anonymous
Not applicable
1,177 Views
6 Replies
Message 1 of 7

Annotation Symbol Preview

Anonymous
Not applicable

Hello again Revit API forum!

 

I finished my most recent task, and was on the hunt for something else that would better the lives of our technologists. Recently I had the (dis?)pleasure  of creating a bunch of heating and cooling schematics for a project. I was adding annotative symbols to the schematics which I found rather clumsy. My main complaint is that Revit has no visual preview for the available symbols. I ended up placing every single symbol in the project into a big array and taking it with me from drawing to drawing so I could quickly grab the symbol I needed.

 

So, that brings me to the following:

 

1.) Why isn't this in Revit natively? With tonnes of symbols, it's really hard to remember by name, which one you are looking for.

 

2.) Can we easily get around this issue? My high level thought process was along the lines of

  • Spawn a form with a picture
  • Grab the highlighted symbol family
  • Generate a preview image using the GeneratePreview method which I believe is available for all elements?
  • Update the picture on the form periodically

Using the Revit lookup tool, I see that Annotative Symbols belong to the OST_Generic_Annotation Built In Category, my main question is how do you get the relevant family from the highlighted element of the Annotation pull down? I can get all family types, or the selected family instance, but not sure about inside a UI pull down. I searched for a similar tool, but couldn't find anything. If anyone has a better suggestion, I'm happy to hear it.

 

Thanks for this,

0 Likes
1,178 Views
6 Replies
Replies (6)
Message 2 of 7

Anonymous
Not applicable

Bump. Anyone ever try generating family previews? It would be really great to have a gallery style panel from which you could grab and place symbols.

 

I'm curious how to even get started with getting info on what option the user is highlighting when he/she pulls down the menu in the properties tab. Thoughts?

0 Likes
Message 3 of 7

jtomko8NDFL
Participant
Participant

Did you get anywhere with this? 

0 Likes
Message 4 of 7

longt61
Advocate
Advocate

You have a very interesting idea about the builtin preview image for family. A lot of people I work with would love to have this feature for their families/ symbols ... Ans that is something that I myself, as a developer, would love to have so that the burden can be lifted off. 

Now, back to the original question, I am not sure what you mean by "Annotation pull down". Did you mean a selected instance of your annotation, or something else? And you want to get the family from which the selected instance/ symbol is created from?

I really appreciate if you could explain further.

0 Likes
Message 5 of 7

RPTHOMAS108
Mentor
Mentor

ElementType.GetPreviewImage can be used for some ElementTypes but this doesn't work for annotation symbols these days it seems. I do remember there being an image for these types of object in the past within the properties type selector (so would have had a preview image back then whatever Revit version that was).

0 Likes
Message 6 of 7

jtomko8NDFL
Participant
Participant

To determine if you can use ElementType.GetPreviewImage click on the item and if there is no preview image in the properties dialog, you will get null from can ElementType.GetPreviewImage. This has been reported in other posts.

 

The two work arounds that I have found is file->export->image and placing the 2d annotation symbol and creating a view and image as discussed here:https://forums.autodesk.com/t5/revit-api-forum/how-to-export-an-image-from-a-specific-view-using-rev...

 

This seems like a lot of work, given we are asking customers to create their own annotation symbol I think asking them to provide a png is not a stretch.

 

 

 

0 Likes
Message 7 of 7

jtomko8NDFL
Participant
Participant

I ended up making images of the 2d symbols by creating a view, then set the crop of  view to the element's bounding box, then create a png of the view.

 

0 Likes