
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi everyone,
To expose my problem, i'm trying to recreate in a personal windows Form i created, the same founctions 'duplicate' and 'set the element type' that we can be found in ''Edit Type'' for the selected element.
First Step, I tried to recreate the Button "Duplicate".
I follow the TBC article (http://thebuildingcoder.typepad.com/blog/2008/11/creating-a-new-family-symbol.html) but I have problems.
I use the fonction ElementType.Duplicate(NewTypeName). But i didn't arrive to get the selected ElementType.
This is my code :
Dim newName As String = "new" & GlobalVariables.ElementName Dim elstype As ElementType = e.XXXXXXXXXXXXXXX Dim newType As ElementType = elstype.Duplicate(newName) e.elstype = newType
e is the selected element
Dim e As Element = uidoc.Document.GetElement(id)
>> I think I miss a small part of code in place of the XXXXXXX.
I don't know the way to get the elementtype and there is nothing related to this in the SDK revit 2016 package. I can get element, element id, type, type id, familly.... but nothing about an ElementType Class.
Thanks for your help !
Best Regards ,
Sylvain
Solved! Go to Solution.