Creating a legend programmatically

Creating a legend programmatically

Anonymous
Not applicable
5,840 Views
3 Replies
Message 1 of 4

Creating a legend programmatically

Anonymous
Not applicable

Hello everyone

I was wondering if it is possible to create a legend in the Revit API programmatically and then put legend components in it.  I would like the same result as if I would choose View->Legends->Legend in the Revit user interface.  I can't find any information about this in the documentation.  I am using Revit API 2015.  Does anyone know how to do this?

Greetings, Ari

0 Likes
5,841 Views
3 Replies
Replies (3)
Message 2 of 4

Joe.Ye
Alumni
Alumni
Revit didn't expose the API to create legend in the legend view so far. The workaround is let your user to create one legend manually using Revit command, then your command can duplicate this existing legend by CopyElement() method, and assign target family to the newly created legend's component type parameter. There is already an API wish logged for this feature. The ticket is : CF-759.


Joe Ye
Contractor
Developer Technical Services
Autodesk Developer Network
Message 3 of 4

harrymattison
Advocate
Advocate
Hi Autodesk,

Has there been any progress made on implementing the API for Legend creation?

Thanks
Harry
Message 4 of 4

zefreestijl
Advocate
Advocate

Hi, I've been searched for hours but only found this wish post,

https://forums.autodesk.com/t5/revit-ideas/api-for-creating-legend-views-and-legend-components/idi-p...

 

Anyone knows the work-around to create a new legend view?

 

Thanks

0 Likes