Page 1 of 2 12 LastLast
Results 1 to 10 of 16
Like Tree8Likes

Thread: Get the parameter "Workset"

  1. #1
    Member
    Join Date
    April 30, 2015
    Location
    Michigan
    Posts
    174
    Current Local Time
    10:42 AM

    Get the parameter "Workset"

    I'm having trouble getting the workset parameter in this script to work. I'm running this as part of a script meant for project startup so there shouldn't be any elements to get the parameter name from. I don't need the value of the parameter only the parameter itself. The FilterRule.ByRuleType is using parameter as an input.

    The reason I'm using dynamo for this is because I can't add filters that use worksets in template files.

    And yes, I know I should use worksets for visibility. Blame Autodesk. Fix MEP demo!

    Attached Thumbnails Attached Thumbnails Get the parameter "Workset"-worksetparamet01.png  

  2. #2
    Forum Addict josephpeel's Avatar
    Join Date
    May 3, 2012
    Posts
    1,393
    Current Local Time
    03:42 PM
    The 'Clockwork' package has a Document.Worksets node that can get all worksets in the project

  3. #3
    Member
    Join Date
    April 30, 2015
    Location
    Michigan
    Posts
    174
    Current Local Time
    10:42 AM
    That gets the worksets. I don't need the value. I need the container itself.

  4. #4
    Member Bjorn_K's Avatar
    Join Date
    April 8, 2011
    Location
    Rotterdam, Netherlands
    Posts
    297
    Current Local Time
    03:42 PM
    CRapai likes this.

  5. #5
    Moderator snowyweston's Avatar
    Join Date
    December 21, 2010
    Location
    C.LONDON
    Posts
    4,343
    Current Local Time
    02:42 PM
    Not near Dynamo, but something similar last week - try:

    Find your elements (by category), use GetParameterValue ("Workset") then filter results using StringContains, push that value into an SP (so you can maintain models on the fly) and set your filters in your VT to look at your hammy-workaround SP instead (forever) - rather than have Dynamo do the colouring in.
    josephpeel likes this.

  6. #6
    Forum Addict elton williams's Avatar
    Join Date
    December 7, 2010
    Location
    Gold Coast
    Posts
    2,502
    Current Local Time
    12:42 AM
    Unless I'm totally missing the point of the OP...either the workset element "id" or workset "parameter" is being looked for in a non- workshared project. Pretty sure that's never gonna be possible for something that doesn't exist.
    snowyweston likes this.

  7. #7
    Member Bjorn_K's Avatar
    Join Date
    April 8, 2011
    Location
    Rotterdam, Netherlands
    Posts
    297
    Current Local Time
    03:42 PM
    Been struggling to find the Built In container for the Workset as well. The screenshot of OP gives the V/G override tab for Worksets, not the actual workset parameter.

    Small work-around, find the parameter from the elements in your projects, just use a Category that always has elements depending on your Discipline/Scope of work.

    Get the parameter "Workset"-2019-01-21_1228.png

    Just set the lacing of the FilterRule.ByRuleType to Shortest so you don't end up with as many FilterRules as you have elements of Category "X".
    Last edited by Bjorn_K; January 21st, 2019 at 11:37 AM.
    CRapai likes this.

  8. #8
    Member
    Join Date
    April 30, 2015
    Location
    Michigan
    Posts
    174
    Current Local Time
    10:42 AM
    Quote Originally Posted by elton williams View Post
    Unless I'm totally missing the point of the OP...either the workset element "id" or workset "parameter" is being looked for in a non- workshared project. Pretty sure that's never gonna be possible for something that doesn't exist.
    This script would be ran after worksharing is enabled. The same script adds all the worksets to the project.

    To Bjorn_K:

    I'll take a look at that and get back to you. Does this require elements to be in the project though? Maybe I could use an annotation in our front page drafting view?

    EDIT:
    Well it worked. Not sure why but literally as I type this sentence it all seems really silly and easy now how could I not just do this before this is weird terrible run on sentence thank you I'm dumb.

    Attached Thumbnails Attached Thumbnails Get the parameter "Workset"-worksetparameter02.png  
    Last edited by CRapai; January 22nd, 2019 at 03:37 PM.

  9. #9
    Moderator snowyweston's Avatar
    Join Date
    December 21, 2010
    Location
    C.LONDON
    Posts
    4,343
    Current Local Time
    02:42 PM
    Aw no .dyf? Booooo!

  10. #10
    Member
    Join Date
    April 30, 2015
    Location
    Michigan
    Posts
    174
    Current Local Time
    10:42 AM
    Quote Originally Posted by snowyweston View Post
    Aw no .dyf? Booooo!
    What .dyf? Are you looking for a node? I'm confused.

    BTW I'm terrible at keeping track of what packages I'm using in each script. I wonder if theres a way to make a readout of "Packages in Script"?

Page 1 of 2 12 LastLast

Similar Threads

  1. how do i change a component on workset "View XXXX" to another one (its greyed out)
    By shanetuai in forum Architecture and General Revit Questions
    Replies: 3
    Last Post: February 5th, 2014, 03:52 PM
  2. "caused deletion of non-editable workset..."
    By mfrietze in forum Architecture and General Revit Questions
    Replies: 7
    Last Post: December 13th, 2013, 10:53 PM
  3. Family Shared Parameter "Group Parameter Under" in a Project
    By Aretap in forum Architecture and General Revit Questions
    Replies: 7
    Last Post: August 10th, 2012, 10:18 PM
  4. MEP Elements on Workset "Project Info"
    By troygates in forum Worksharing, Revit Server & C4R
    Replies: 5
    Last Post: June 14th, 2012, 10:26 PM
  5. "Title on Sheet" parameter field" ?
    By Dave Jones in forum Architecture and General Revit Questions
    Replies: 2
    Last Post: October 17th, 2011, 12:17 AM

Posting Permissions

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