Using C# to make changes

Using C# to make changes

Anonymous
Not applicable
379 Views
1 Reply
Message 1 of 2

Using C# to make changes

Anonymous
Not applicable
Hello All,
How can i change the properties of an element in Revit using c#. For example, what i want to do is to write a code in c# to interface Revit so that if i can change the size of a door from 2" X 4'' to 6'' X 8" and i can view the change in revit. Pls reply all.
0 Likes
380 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable
Yes you can. The process takes a bit of a learning curve, but the Revit API is very capable of doing it. Steps to learn are:

Create a command for revit (public class that implements IExternalCommand)
In that command select the object to change (revit.document.selection.elements)
Get the family symbol of the element (element.symbol, element.objecttype, familyinstance.symbol)
change it to the other symbol
return command has succeeded (IExternalCommand.Result.Succeeded)

thats it in a nutshell...
get your hands on the revit developer's guide at autodesk's website.

jvj
0 Likes