Revit Architecture Forum
Welcome to Autodesk’s Revit Architecture Forums. Share your knowledge, ask questions, and explore popular Revit Architecture topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to change Revit 2014 element name by API C#

0 REPLIES 0
Reply
Message 1 of 1
ggarnik
406 Views, 0 Replies

How to change Revit 2014 element name by API C#

Hi everyone

 

I want to change element name by API and I have the following code.

 

Reference r = docUI.Selection.PickObject(ObjectType.Element, "Please pick an element");
Element element = doc.GetElement(r.ElementId);

 

element.Name = "MyElement";

 

But why occured this error ? 'This element does not support assignment of a user-specified name.' 

Or should I change the name by another way ?

 

Please help!

 

 

 

Tags (1)
0 REPLIES 0

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report


Autodesk Design & Make Report