Announcement

Collapse
No announcement yet.

"disallow join" via dynamo

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    "disallow join" via dynamo


    Hello,

    It seems to be so simple...!

    I would like to put all my start and endpoints of my walls to "disallow Join"

    How the hell get I fixed that? It is easy to select the walls. How can I catch the properties via dynamo to change it.
    Manually it is just a right-click to a menu...

    ...how can I catch it with dynamo?

    I am glad about any advise, or a small .dyn script

    KR

    Andreas
    Attached Files
    Last edited by andreasdraxl; July 22, 2017, 01:35 PM.

    #2
    Hello Andreas,

    The following graph will do what you require



    They Python code is as follows:

    [Allow Joins]



    [Disallow Joins]

    Attached Files

    Sol Amour

    Architectural Explorer, Digital warrior, Affectual adventurer and Curious Human Being
    Portfolio Website @ Cargo Collective

    Comment


      #3
      Errors

      Hello,

      Thank you very much! for this straigt help!

      In spite of that, I have still some trouble:

      I rebuilt your Tree and the pyton script, but I get errors

      Script:

      import
      clr
      clr.AddReference('RevitServices')
      import RevitServices
      from RevitServices.Persistence import DocumentManager
      from RevitServices.Transactions import TransactionManager
      clr.AddReference('RevitAPI')
      from Autodesk.Revit.DB import WallUtils
      doc = DocumentManager.Instance.CurrentDBDocument
      Walls = UnwrapElement(IN[0])
      success, failure = [],[]
      for wall in walls:
      try:
      TransactionManager.Instance.EnsureInTransaction(do c)
      WallUtils.AllowWallJoinAtEnd(wall,0)
      WallUtils.AllowWallJoinAtEnd(wall,1)
      TransactionManager.Instance.TransactuinTaskDone()
      success.append(wall)
      except:
      Failure.append("Failure: Element category" +str
      (wall.Category.Name))
      OUT = (Success,failure)
      Attached Files
      Last edited by andreasdraxl; July 23, 2017, 09:57 AM.

      Comment


        #4
        Use 'l' (The letter), not '1' (The number) in the Count

        When you are doing the code, you need to pay a lot of attention to Capitalisation and indentation.

        The error is because you have capitalised one 'Walls' and not the one in the following line:

        for wall in walls:

        If you go back and uncapitalise one - or capitalise the other - it should work. Please go over my code line by line and it should be fine!
        Last edited by amoursol; July 23, 2017, 10:29 AM.

        Sol Amour

        Architectural Explorer, Digital warrior, Affectual adventurer and Curious Human Being
        Portfolio Website @ Cargo Collective

        Comment


          #5
          it worked

          Thank you! So it worked!

          in both directions

          Comment


            #6
            API list

            Is there a list of all API utils

            Can I import everthing f.e. floor.utils ... door.utils...

            Is there a forum for API programming?

            Is there maybe literature?

            I did just the "Code Academy" regarding Python

            KR

            Andreas

            Comment


              #7
              Not that I've found yet sorry, but you can use

              revitapidocs.com
              and search for things If you simply use the keyword 'utils' it should pop up things.

              Download the Revit SDK (Software Development Kit) and use that in conjunction with the website above.

              There is a Revit API forum, but I don't really use it (As my focus is upon Dynamo right now), so I use a lot of the Developers section of the Dynamo Forums.

              Sol Amour

              Architectural Explorer, Digital warrior, Affectual adventurer and Curious Human Being
              Portfolio Website @ Cargo Collective

              Comment


                #8
                Further Q:
                Hello,

                Thank you for your scripts.
                I notice that the function only works when there is a corner. What I want is to turn off the "wall" join status using Dynamo, so that I can draw separated walls continuously following a line.

                Thanks,

                Kemp

                Comment


                  #9
                  Hi amoursol,
                  i have tried the scrip but i got the following warning:




                  import clr

                  clr.AddReference('RevitServices')

                  import RevitServices

                  from RevitServices.Persistence import DocumentManager
                  from RevitServices.Transactions import TransactionManager

                  clr.AddReference('RevitAPI')
                  from Autodesk.Revit.DB import WallUtils

                  doc = DocumentManager.Instance.CurrentDBDocument

                  walls = UnwrapElement(IN[0])

                  success,failure = [],[]

                  for wall in walls:
                  try:
                  TransactionManager.Instance.EnsureInTransaction(doc)
                  WallUtils.DisallowWallJoinAtEnd(wall,0)
                  WallUtils.DisallowWallJoinAtEnd(wall,1)
                  TransactionManager.Instance.TransactionTaskDone()
                  success.append(wall)
                  except:
                  failure.append("Failure: Element category" +str
                  (wall.Category.Name))


                  OUT = (success,failure)
                  Attached Files

                  Comment


                    #10
                    Hello Mjkayali,

                    Please go over my post higher up in the graph - indentation matters a lot in Python, so double check the code inside your node matches mine

                    Sol Amour

                    Architectural Explorer, Digital warrior, Affectual adventurer and Curious Human Being
                    Portfolio Website @ Cargo Collective

                    Comment

                    Related Topics

                    Collapse

                    Working...
                    X