Keynote creation within API - still not possible?

Keynote creation within API - still not possible?

Anonymous
Not applicable
1,621 Views
13 Replies
Message 1 of 14

Keynote creation within API - still not possible?

Anonymous
Not applicable

As of summer 2013, the Revit API did not support keynote creation:

http://forums.autodesk.com/t5/revit-api/how-to-create-element-keynote-for-a-wall-and-material-keynot...

 

As I now have an application for API-based keynote creation, I'm curious if the situation has changed. I didn't have success recreating the demo in the link above within Revit 2014, and could not find new keynote-related API calls in the Revit API documentation. Can anyone confirm that keynote creation within the Revit API remains impossible?

 

Thank you.

1,622 Views
13 Replies
Replies (13)
Message 2 of 14

Aaron.Lu
Autodesk
Autodesk
Hi Klanea, may I know how did you create the keynote in UI?


Aaron Lu
Developer Technical Services
Autodesk Developer Network
0 Likes
Message 3 of 14

Aaron.Lu
Autodesk
Autodesk
I looked at the old thread, joe said: "Even via Revit UI, we cannot change a normal tag to keynote's type", is it still true now?


Aaron Lu
Developer Technical Services
Autodesk Developer Network
0 Likes
Message 4 of 14

Anonymous
Not applicable

Hi Aaron,

 

Thanks for the follow-up. You've raised exactly the question I'd like to answer: since Joe's original post, has the API team included/invented any workarounds to permit keynote creation within the API? All of my experiments to this end have failed.

 

0 Likes
Message 5 of 14

Aaron.Lu
Autodesk
Autodesk
Dear, klanea, if UI doesn't have the ability to do that, then API should have no way either.
you probably want the feature in both API and UI?


Aaron Lu
Developer Technical Services
Autodesk Developer Network
0 Likes
Message 6 of 14

jeremytammik
Autodesk
Autodesk

Dear Klanea,

 

Maybe... 

 

Please take a look at What's New in the Revit 2015 API, specifically the new

 

Keynote and Assembly Code API

 

http://thebuildingcoder.typepad.com/blog/2014/04/whats-new-in-the-revit-2015-api.html#3.11

 

It would be very nice indeed to hear exactly how you can make use of it, preferably with some minimal generic sample source code.

 

Thank you!

 

Best regards,

 

Jeremy



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

0 Likes
Message 7 of 14

Anonymous
Not applicable

Hi Jeremy,

 

The new API calls in 2015 look interesting. I'll have to investigate further.

 

The origin of this request came from the need to generate non-standard spot coordinates. Rather than placing spot coordinates showing Easting and Northing data on the leader line, I needed spot coordinates to show a integer (an index to a row in an accompanying schedule) and to enclose this integer with a black circular border. Because these coordinates needed to be generated as part of an automated pipeline, I needed a way to customize the spot coordinate text and style within the API. Based on the available API documentation (http://revitapisearch.com/html/5d70c697-396a-cc67-2caf-5608f556a456.htm), it looked as thought it *might* be possible to manipulate the style and content of a SpotDimension after creation, but I couldn't find a precedent example, and a tight deadline led me to seek an alternative implementation. This led me to try manipulating User Keynotes. This gave the appearance/style I needed, but the approach was stopped in its tracks when I found I couldn't change the type of a newly generated keynote to my modified keynote family. In the end, I wrote some routines to fake the appearance by adding additional detail annotations on top of pregenerated text tags.

 

Two lessons came out of this efforts:

- Keynote type changes in the Revit API appeared, as of 2014, to be limited, and the whole effort to use keynote tags for custom spot coordinates was probably a red herring from the start.

- Flexible, custom SpotDimensions are what I really needed, but the constraints of deliverable schedules didn't afford the time to discover the "right" way to match requirements.

 

Thanks for your assistance. 

 

 

0 Likes
Message 8 of 14

Aaron.Lu
Autodesk
Autodesk
I can confirm that there is no API to create keynote,
I tried SpotDimensions API, the content can't be changed either, so I don't think drawback of SpotDimension is not only unscheduable, but has the same problem of keynote. do you think so?

if that is the case, then we might need to expose new ways to do tagging.


Aaron Lu
Developer Technical Services
Autodesk Developer Network
0 Likes
Message 9 of 14

Aaron.Lu
Autodesk
Autodesk
issue logged:
CF-3296 - API ability to create keynote


Aaron Lu
Developer Technical Services
Autodesk Developer Network
Message 10 of 14

Anonymous
Not applicable

It seems you still can't create keynotes through the API in 2017. 

 

I have a project where I wanted to replace all the material tags with material keynotes.  I was thinking about this, and I did manage to find a workaround.  While it works with material keynotes it may not work with element keynotes.

 

Rather than trying to create a keynote, you could simply copy a single keynote around the model using the ElementTransformUtils.CopyElements method.  That method will allow you to copy a tag from one view to another. 

 

You can only copy keynotes when the reference planes are the same, so I created a keynote on a north/south section and east/west section.  That allowed me to paste one of those two keynotes to any other view.  If your building has any angled facades you may need more seed keynotes.

0 Likes
Message 11 of 14

jeremytammik
Autodesk
Autodesk

Dear Dennis,

 

I'm checking with the development team for you...

 

Cheers,

 

Jeremy



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

Message 12 of 14

Anonymous
Not applicable

Hello,

 

I'm writing an addin that helps me search through my keynote table, using Revit 2018.3. I've implemented the keynote tree and the search functions, all that is left is to "Insert" the keynote into the project. I've looked through the great https://github.com/akseidel/RevitAddinKeyNoteSystem but that simply posts a PostableCommand, which in turn brings up the built-in Revit keynote browser.

 

This is the only relevant thread I found while searching. Is it possible to create a keynote given it's unique key value or directly from KeynoteEntry object? Seems like a strange limitation since the command is available via the UI, just in multiple clicks.

0 Likes
Message 13 of 14

jeremytammik
Autodesk
Autodesk

Check out the pyRevit keynote manager by Ehsan Iran-Nejad:

 

https://twitter.com/eirannejad/status/1090051118363594752

 

It probably shows what is possible and what not, and how as well.

 

In fact, maybe it already does what you are trying to achieve.

 

Cheers,

 

Jeremy

 



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

0 Likes
Message 14 of 14

Anonymous
Not applicable

Thanks Jeremy, I will go through what's available in pyRevit. Hopefully get some hints on the implementation as well!

 

Cheers,

Alex

0 Likes