selection elements without filter

selection elements without filter

Shai.Nguyen
Advocate Advocate
548 Views
1 Reply
Message 1 of 2

selection elements without filter

Shai.Nguyen
Advocate
Advocate

 

I want to create a task dialog show like this

element information.JPG

Here is my code:

element information1.JPG

Why "elements" is red under line, where i miss?

 

 

0 Likes
Accepted solutions (1)
549 Views
1 Reply
Reply (1)
Message 2 of 2

jeremytammik
Autodesk
Autodesk
Accepted solution

Look at the warning message in the Visual Studio build output console window and you will see the explanation (deprecated API usage) including a suggestion on how to fix it.

 

Or, if it is an error and not just a warning, then that API call is not just deprecated but actually obsolete and has been removed, replaced by something more modern, e.g., the GetElementIds method:

 

http://www.revitapidocs.com/2017/4af3bdc7-e69c-8aa6-406d-865d7f036927.htm

 

Introduced in Revit 2012:

 

Selection.GetElementIds() method

 

Returns a collection containing the ids of the selected elements. This collection can be used directly with FilteredElementCollector.

 

http://thebuildingcoder.typepad.com/blog/2013/02/whats-new-in-the-revit-2012-api.html

 

Cheers,

 

Jeremy



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes