Point boundary condition - hosted

Hi there,
A similar issue is been raised a while ago elsewhere in the forum, no solution founded, so i thought to summarize it here under developers, since it probably requires some python coding.

Using Dynamo, after selecting multiple analytical nodes (i.e. base of analytical columns) id like to be able to create hosted point boundary condition at those nodes (pinned).
Something similar can be done using a node made available from steamnodes - unfortunately that only works for line boundary conditions.
Below it’s my attempt to edit that python script but im definitely doing something wrong.
I’m copying the script i’m trying to adapt from “steamnodes” (this is not the original but my attempt, ive only changed line 37: “a=doc.Create.NewPointBoundaryConditions(e,s,R,s,R,s,R,s,R,s,R,s,R)”

This is the link to the revitapidocs regarding point boundary conditions insted.
http://www.revitapidocs.com/2019/db4e68f0-d06c-8207-98fb-83e84b3cb2d1.htm.

Any help would be much appreciated

Damo

#python nodes in dynamo 1.0
#proposed by Julien Benoit @jbenoit44
#http://aecuandme.wordpress.com/
import clr
clr.AddReference(‘ProtoGeometry’)
from Autodesk.DesignScript.Geometry import *
#Import ToDSType(bool) extension method
clr.AddReference(“RevitNodes”)
import Revit
clr.ImportExtensions(Revit.Elements)
#Import geometry conversion extension methods
clr.ImportExtensions(Revit.GeometryConversion)
#Import DocumentManager and TransactionManager
clr.AddReference(“RevitServices”)
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
from System.Collections.Generic import *
#Import RevitAPI
clr.AddReference(“RevitAPI”)
import Autodesk
from Autodesk.Revit.DB import *
from System.Collections.Generic import *

doc = DocumentManager.Instance.CurrentDBDocument

elt=UnwrapElement(IN[0])

R=float(IN[1])

bc=[ ]
#Start Transaction
TransactionManager.Instance.EnsureInTransaction(doc)

for e in elt:
s=Autodesk.Revit.DB.Structure.TranslationRotationValue.Fixed
a=doc.Create.NewPointBoundaryConditions(e,s,R,s,R,s,R,s,R,s,R,s,R)
bc.append(a)

#End Transaction
TransactionManager.Instance.TransactionTaskDone()

OUT =bc

Hi Damiano,

I was exactly looking for the same thing as you and I tried the same change as you did. I realised then that the first input of the API function for Point boundary need to be a “Reference” (and cannot be an “Element” as it could be for line boundary function). So I tried to change the first input into an element and it seems to work!

(I used it for Analytical Isolated Foundation though, not for Analytical Columns but I guess it should work as well)

However I still have no idea what a “Reference” is and if someone could help me explaining what it is exactly it would be great :slight_smile:

Thanks,

Arthur

import clr
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *
# Import ToDSType(bool) extension method
clr.AddReference("RevitNodes")
import Revit
clr.ImportExtensions(Revit.Elements)
# Import geometry conversion extension methods
clr.ImportExtensions(Revit.GeometryConversion)
# Import DocumentManager and TransactionManager
clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
from System.Collections.Generic import *
# Import RevitAPI
clr.AddReference("RevitAPI")
import Autodesk
from Autodesk.Revit.DB import *
from System.Collections.Generic import *

doc = DocumentManager.Instance.CurrentDBDocument

elt=UnwrapElement(IN[0])
R=float(IN[1])

bc = []

# Start Transaction
TransactionManager.Instance.EnsureInTransaction(doc)

for e in elt:
	ref = Autodesk.Revit.DB.Reference(e)
	s=Autodesk.Revit.DB.Structure.TranslationRotationValue.Fixed
	a=doc.Create.NewPointBoundaryConditions(ref,s,R,s,R,s,R,s,R,s,R,s,R)
	bc.append(a)

# End Transaction
TransactionManager.Instance.TransactionTaskDone()

OUT = bc

Thanks for your reply!

Arthur1

Thanks for the provided solution.
However when i try to use the code i always get an error saying:

Parameter name: Boundary Condition is already created on the selected reference. It is not allow to duplicate Boundary Conditions.

Even though i have not specified any boundary conditions on the nodes.
Do es anyone happen to know what the problem could be here? Thanks for your answers!

Hi @LukasF ,

As far as I know, this happens only when there already is a boundary condition at the selected reference points in input. Therefore you cannot run this script twice in a row and you need to check there aren’t boundary condition already applied to the point you re looking at.

Make sure your visibility setting (VV) allows boundary conditions in the current view
You can also make a small script to delete all boundary condition before running this one

Hope I answered your question :slight_smile:

Arthur