Results 1 to 10 of 26

Thread: Saved Selection Sets

Hybrid View

  1. #1
    AUGI Addict sfaust's Avatar
    Join Date
    2004-01
    Location
    Littleton, CO (Denver Metro)
    Posts
    1,532

    Default Saved Selection Sets

    Just messing around with the API some more, here is a little utility to save and retrieve selection sets. It stores them in a text file located in the same location as the project file. The text file has to be the same name as the project file with " SelSets" added to the end. It will create that way automatically, but if you move or rename the file you will have to do the same with the txt file to retain your selection sets.

    In the case of a worksets project it will store the txt file at the central file location.

    The only small bug is that if you rename a selection set, you have to exit out of the dialog box and restart before you can select that set. I'm not sure why that is yet, but it's a minor thing in my mind, so I left it for now. If I get time later I'll come back and see if I can fix it.

    Let me know what you think!
    Attached Files Attached Files
    Steve

  2. #2
    I could stop if I wanted to Kevin Janik's Avatar
    Join Date
    2003-05
    Location
    Portland, OR
    Posts
    383

    Default Re: Saved Selection Sets

    When I add this to my Revit.ini it shows up on the menu but does nothing with or without picking. What am I suppose to see?

    Kevin

  3. #3
    AUGI Addict sfaust's Avatar
    Join Date
    2004-01
    Location
    Littleton, CO (Denver Metro)
    Posts
    1,532

    Default Re: Saved Selection Sets

    you should select elements, then go to Tools->External Tools-> Selection Sets. It should pop up a dialog box with the existing selection sets listed (which will be none the first time). There is a place at the bottom to type in a name and create a selection set from the elements you currently have selected. After that, it should show up in the list of selection sets at the top and you can select it and hit "select elements".

    Does this not work for you? It's working correctly in 2008 and 2009 for me...
    Steve

  4. #4
    I could stop if I wanted to Kevin Janik's Avatar
    Join Date
    2003-05
    Location
    Portland, OR
    Posts
    383

    Default Re: Saved Selection Sets

    Quote Originally Posted by sfaust View Post
    you should select elements, then go to Tools->External Tools-> Selection Sets. It should pop up a dialog box with the existing selection sets listed (which will be none the first time). There is a place at the bottom to type in a name and create a selection set from the elements you currently have selected. After that, it should show up in the list of selection sets at the top and you can select it and hit "select elements".

    Does this not work for you? It's working correctly in 2008 and 2009 for me...
    Steve,

    I can see the Tools->External Tools-> Selection Sets and when I click it with or without items selected I get nothing.

    What do you think is the problem.

    Here is what I pasted into my Revit.ini file:

    [ExternalCommands]

    ECCount=5

    ECName1= Selected Element Count
    ECClassName1= ReD.Example.NumElements.Command
    ECAssembly1= "C:\Program Files\Revit Architecture 2008\Program\NumElements\NumElements.dll"

    ECDescription1= "Number of Selected Elements"
    ECClassName2=FindReplace.Startup
    ECName2="Find and Replace"
    ECDescription2="Find and Replace in text notes"
    ECAssembly2=C:\Program Files\Revit Architecture 2008\Program\FindReplace.dll

    ECName3= Selected Element Count
    ECClassName3= ReD.Example.NumElements.Command
    ECAssembly3= "C:\Program Files\Revit Architecture 2008\Program\NumElements\Dlls_And_Ini_0.6\NumElements.dll"
    ECDescription3= "Number of Selected Elements"

    ECName4=RunJournal
    ECClassName4=Redbolts.RunJournal.Command
    ECAssembly4=C:\V10Commands\RunJournal.dll

    ECName10 = Selection Sets
    ECClassName10 = sfaust.Revit.SelectionSets.Command
    ECAssembly10 = C:\Program Files\Revit Architecture 2008\Selection Sets\SelectionSets.dll
    ECDescription10 = Saves and Retrieves Selection Sets

    Any ideas?

    Kevin

  5. #5
    NavisWorks Moderator david.kingham's Avatar
    Join Date
    2004-07
    Location
    Fort Collins, CO
    Posts
    1,329

    Default Re: Saved Selection Sets

    Change the 10's in the last lines to 5's

    ECName5 = Selection Sets
    ECClassName5 = sfaust.Revit.SelectionSets.Command
    ECAssembly5 = C:\Program Files\Revit Architecture 2008\Selection Sets\SelectionSets.dll
    ECDescription5 = Saves and Retrieves Selection Sets

  6. #6
    I could stop if I wanted to Kevin Janik's Avatar
    Join Date
    2003-05
    Location
    Portland, OR
    Posts
    383

    Default Re: Saved Selection Sets

    David,

    I did that before and tried it again without it working with or without selecting a bunch of walls.

    I even changed the syntax with quotes in places where some of my other External Commands have them. The Revit.ini file syntax must be very loose since some people have " marks around the ECAssembly and ECDescription while others don't. I think something is not referencing the .ddl correct.

    ECName5=Selection Sets
    ECClassName5=sfaust.Revit.SelectionSets.Command
    ECAssembly5="C:\Program Files\Revit Architecture 2008\Selection Sets\SelectionSets.dll"
    ECDescription5="Saves and Retrieves Selection Sets"

    Here is a cut for Windows Explorer for the location of the .dll.

    C:\Program Files\Revit Architecture 2008\Program\Selection Sets

    Now I see why! I put the .dll in the wrong place. I was right but it was my goof! I was sure it said under the Program directory. Now it works!

    Even so what about the Revit.ini file syntax.

    Another one for debugging taking longer than writing the program!

    Thanks for the help!

    Kevin

Similar Threads

  1. Selection Sets
    By beamer in forum AutoCAD General
    Replies: 7
    Last Post: 2008-08-11, 12:04 PM
  2. Selection Sets
    By MikeJarosz in forum VBA/COM Interop
    Replies: 3
    Last Post: 2008-07-11, 07:56 PM
  3. ...Selection sets...
    By davidmatyas in forum VBA/COM Interop
    Replies: 15
    Last Post: 2008-04-02, 07:14 PM
  4. Help relating to selection and selection sets
    By csgohjmj in forum AutoLISP
    Replies: 3
    Last Post: 2004-09-17, 03:35 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •