Message 1 of 3
Simple code crashes Revit
Not applicable
05-25-2012
07:49 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm trying to get code from this sample: http://thebuildingcoder.typepad.com/blog/2010/05/duplicate-legend-component.html to run.
I am using Revit 2013 so I had to make some changes:
ICollection<ElementId> SelectedIds = m_UIDoc.Selection.GetElementIds(); Group group = m_doc.Create.NewGroup(SelectedIds);
Revit died on the NewGroup call. There was one ElementId in the selection.
I put an exception handler around it and got this message:
"External component has thrown an exception."
Any ideas?
Also, is there any other way to clone/copy an Element?
Thanks