PDA

View Full Version : how to select an entity through program



sudhakary_infotech
2005-06-17, 06:11 AM
hello all,

can any one help me.
i didn't find any command to select an entity in RevitAPI..
As in AutoCAD we use "entsel" (autolisp) to select an entity. like this any particular command is there to select an entity through program.

thanks in advance
sudha

FK
2005-06-17, 06:47 PM
As far as I know, there is no way to make something selected from the API in this release. You simply look up an element and work with it. What are you trying to accomplish?

valamar2005-site
2005-06-18, 01:07 PM
Fedor,
That means that we ALWAYS have to select elements BEFORE executing a command?
I noticed those two lines (not an expert) within samples :

Dim rvtDoc As Document = application.ActiveDocument
Dim selSet As ElementSet = rvtDoc.Selection.Elements

only IF there is a already a selection...

FK
2005-06-18, 01:35 PM
Once again, you don't have to select anything, you can pull elements directly from the document.

On the other hand, if the user should indicate what elements the program should work on, selecting them is the natural UI.

Note that as of this release there is no interactive going back-and-forth between Revit and the API program.