Quantcast
Channel: All Revit API Forum posts
Viewing all articles
Browse latest Browse all 66719

Re: How to copy element from view to another view ??

$
0
0

From the SDK Revit API.chm, copyelements needs an Icollection of elements ID's (Icollection<ElementIds>).

 

Revit has mutliple ways to refer to an element.  You can refer directly to the element, you can get a reference to the element, or you can get the ElementId.

 

In this case, I beleive you need to get the elementid, and put it in a collection of Element Id's.

 

Here is the best example I can find offhand, but its in C#, and is doing something different.   But it does have a collection of element ID's:

 

https://knowledge.autodesk.com/search-result/caas/CloudHelp/cloudhelp/2016/ENU/Revit-API/files/GUID-541141C8-F390-424E-88BD-54F667C823F8-htm.html


To convert to python, you have to omit the ; at the end of each line, and when you declare a variable, you don't declare the type.

 

I suggest starting with the simplest example possible and building on it until you get what you want.


Viewing all articles
Browse latest Browse all 66719

Trending Articles