Results 1 to 3 of 3

Thread: Controlling worksets in a link with Dynamo

  1. #1
    Join Date
    August 31, 2011
    Current Local Time
    08:06 AM

    Not allowed! Not allowed!

    Controlling worksets in a link with Dynamo

    I have a model with 8 large revit link files and would like to be able to change the visibility of the worksets in each link. I can do this via manage links but was wondering can it be done in a quick and easier way with dynamo. Thanks

  2. #2
    Forum Addict josephpeel's Avatar
    Join Date
    May 3, 2012
    Current Local Time
    09:06 AM

    Not allowed! Not allowed!
    To the question "Is XXX possible in Dynamo?" The answer is always; "Look in the API manual."

    Did a search for linked models and worksets and found this;
    LoadFrom Method (ModelPath, WorksetConfiguration)

    So, yes it looks like it is possible to reload a linked model with a specified set of worksets.
    But how you can actually do that in a python script in dynamo I dont know. You should ask about this method on the Dynamo forum.

  3. #3
    Senior Member amoursol's Avatar
    Join Date
    November 21, 2012
    Boston, MA (USA)
    Current Local Time
    09:06 AM

    Not allowed! Not allowed!
    Hello Joe,

    To get you started, the following does a similar thing for Batch Reloading Families. You'll also need to create a Class for your LoadFrom method as Joseph has mentioned.

    Below is the code which follows a similar format:

    import clr
    from Autodesk.DesignScript.Geometry import *
    import Revit
    import RevitServices
    from RevitServices.Persistence import DocumentManager
    from RevitServices.Transactions import TransactionManager
    doc = DocumentManager.Instance.CurrentDBDocument
    uiapp = DocumentManager.Instance.CurrentUIApplication
    app = uiapp.Application
    import Autodesk
    from Autodesk.Revit.DB import *
    import System
    import sys
    pyt_path = r'C:\Program Files (x86)\IronPython 2.7\Lib'
    dirPath = IN[0]
    overWrite = IN[1]
    class famOptions(IFamilyLoadOptions):
        def __init__(self) : pass
        def OnFamilyFound(self,familyInUse,overwriteParameterValues) : return ooverWrite[0]
        def OnSharedFamilyFound(self,familyInUse,source,overwriteParameterValues) : return overWrite[0]
        errorReport = None
        outValue = []
        for i in dirPath:
            if ".rfa" in i:
                famDoc = app.OpenDocumentFile(i)
        import traceback
        errorReport = traceback.format_exc()
    if errorReport == None:
        OUT = outValue
        OUT = errorReport
    This is still a little beyond me (Shoutout to Dimitar Venkov!) but may point you in the right direction.
    Last edited by amoursol; January 17th, 2018 at 02:10 PM.

Similar Threads

  1. Can I use Dynamo to create Worksets?
    By ryntau in forum Dynamo BIM
    Replies: 4
    Last Post: November 5th, 2015, 01:37 PM
  2. Revit Link Controlled by two Worksets
    By Nakmonadon in forum Architecture and General Revit Questions
    Replies: 7
    Last Post: July 17th, 2015, 08:27 AM
  3. Replies: 0
    Last Post: September 8th, 2014, 12:45 PM
  4. Group to Link and Preserve Worksets?
    By Versiamo01 in forum Architecture and General Revit Questions
    Replies: 6
    Last Post: May 22nd, 2014, 08:33 PM
  5. Managed Worksets with a RVT Link
    By Alex Cunningham in forum Architecture and General Revit Questions
    Replies: 4
    Last Post: May 20th, 2011, 03:44 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